Network topology information management method and system, terminal and storage medium
By using quantum authentication algorithm to authenticate query requests in the network topology information management system, the problem of insufficient security of network topology information in traditional methods is solved, and refined management and security guarantee of network topology information is realized.
Patent Information
- Application Number
- CN202411873314.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional network topology information management methods cannot effectively ensure the security of network topology information, resulting in all users being able to view network topology information, which may lead to information leakage and security risks.
The first preset algorithm is used to authenticate the received query request information, generate a quantum authentication code, and obtain the authentication result by comparing the authentication code, and respond to the query request information based on the authentication result, thereby controlling the user's access to network topology information.
Through the authentication mechanism, unauthorized viewing requests are prevented, the security of network topology information is improved, and the network topology information can be accessed and managed by only users with permissions.
Smart Images

Figure CN119652518A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer network topology management, and more specifically, to a network topology information management method, system, terminal and storage medium. Background Art
[0002] The traditional network topology information management method only provides a simple viewing function. Specifically, refer to the Chinese patent application publication with the publication number CN111988176A, which discloses the traditional network topology information management method including visualization and interactive management of network topology structure, extracting the original topology data, processing the extracted data into Json data format, calling the visualization tool Echarts to generate a network topology diagram, setting event functions, and managing the network by operating the network topology diagram. The visualization tool Echarts generates a network topology diagram, which can be understood as viewing network topology information. However, in this method, all users can use this method to view the network topology information, resulting in the security of the network topology information not being guaranteed. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a network topology information management method, system, terminal and storage medium, which can improve the security of network topology information. The embodiments of the present application are mainly implemented through the following technical solutions:
[0004] A first aspect of an embodiment of the present application provides a network topology information management method, including:
[0005] Receiving query request information, where the query request information is used to query one or more network topology elements in the network topology information;
[0006] Using a first preset algorithm to perform authentication processing on the query request information to obtain a first authentication result;
[0007] The query request information is responded to based on the first authentication result.
[0008] According to an embodiment of the present application, the step of using a first preset algorithm to authenticate the query request information to obtain a first authentication result includes:
[0009] Parsing the query request information to obtain a first quantum authentication code, a first timestamp, a query parameter, and a first quantum random number;
[0010] Searching in the advanced hash chain based on the first timestamp to obtain a first hash value;
[0011] Obtain quantum keys;
[0012] Generate a second quantum authentication code based on the first timestamp, the query parameter, the first quantum random number, the first hash value and the quantum key;
[0013] The first quantum authentication code and the second quantum authentication code are compared to obtain the first authentication result.
[0014] According to an embodiment of the present application, after the step of responding to the query request information based on the first authentication result, the network topology information management method further includes:
[0015] Receiving modification request information, where the modification request information is used to modify one or more network topology elements in the network topology information;
[0016] Using a second preset algorithm to perform authentication processing on the modification request information to obtain a second authentication result;
[0017] Respond to the modification request information based on the second authentication result.
[0018] According to an embodiment of the present application, before the step of responding to the modification request information based on the second authentication result, the network topology information management method further includes:
[0019] Parse the modification request information to obtain first device ID information, first network card information, first SONIC interface information connected to the network card, first IP address, first VLAN information and first remark information;
[0020] Data formatting is performed on the first device ID information, the first network card information, the first SONIC interface information, the first IP address, the first VLAN information, and the first remark information.
[0021] According to an embodiment of the present application, after the step of responding to the query request information based on the first authentication result, the network topology information management method further includes:
[0022] receiving an adding request message, wherein the adding request message is used to add one or more network topology elements to the network topology information;
[0023] Using a third preset algorithm to perform authentication processing on the adding request information to obtain a third authentication result;
[0024] The adding request information is responded to based on the third authentication result.
[0025] According to an embodiment of the present application, after the step of responding to the query request information based on the first authentication result, the network topology information management method further includes:
[0026] Receiving deletion request information, where the deletion request information is used to delete one or more network topology elements in the network topology information;
[0027] Using a fourth preset algorithm to authenticate the deletion request information to obtain a fourth authentication result;
[0028] The deletion request information is responded to based on the fourth authentication result.
[0029] According to an embodiment of the present application, before the step of receiving query request information, the network topology information management method includes:
[0030] Obtaining the network topology information of the SONIC operating system;
[0031] The network topology information is stored in a database.
[0032] A second aspect of an embodiment of the present application provides a network topology information management system, including:
[0033] A receiving module, used to receive query request information, where the query request information is used to query one or more network topology elements in the network topology information;
[0034] An authentication module, configured to perform authentication processing on the query request information using a first preset algorithm to obtain a first authentication result;
[0035] A response module is used to respond to the query request information based on the first authentication result.
[0036] The third aspect of the embodiments of the present application provides a terminal device, including: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute the steps of the network topology information management method provided in the first aspect of the embodiments of the present application.
[0037] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program enables a computer to execute the steps of the network topology information management method provided in the first aspect of the embodiment of the present application.
[0038] The beneficial effects of the embodiments of the present application include:
[0039] The embodiment of the present application designs a first preset algorithm, and uses the first preset algorithm to authenticate the received query request information to obtain a first authentication result; and responds to the query request information based on the first authentication result. Therefore, the embodiment of the present application can grant the user the right to view the network topology information corresponding to the query request information based on the first authentication result. Therefore, the authentication operation of the embodiment of the present application can prevent unauthorized viewing requests, thereby achieving the function of improving the security of the network topology information. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A flowchart of the network topology information management method of the present application in some embodiments;
[0042] Figure 2 A principle block diagram of the network topology information management system of the present application in some embodiments;
[0043] Figure 3 This is a functional block diagram of the terminal device of the present application in some embodiments. DETAILED DESCRIPTION
[0044] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0045] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0046] The terms "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0047] The terms "comprises," "includes," or any other variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or elements is not necessarily limited to those steps or elements explicitly listed but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0048] Unless otherwise defined, all technical and scientific terms used in the specification of this application have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in the specification of this application includes any and all combinations of one or more related listed items.
[0049] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0050] like Figure 1 FIG. 1 is a flowchart of a network topology information management method provided by the first aspect of the embodiment of the present application. Figure 1 In the method, the network topology information management method comprises:
[0051] S1. Receive query request information, where the query request information is used to query one or more network topology elements in network topology information.
[0052] The network topology information is stored in a database. The network topology information is the network topology information of the SONIC (Software for Open Networking in the Cloud, open network software in the cloud) operating system, and each network topology element in the network topology information includes the second device ID information, the second network card information, the second SONIC interface information connected to the network card, the second IP address, the second VLAN information and the second remark information. The second device ID information, the second network card information, the second SONIC interface information, the second IP address, the second VLAN information and the second remark information are all character strings. Exemplary, such as the second device ID information is S2, the second network card information is ens5f0np0, the second SONIC interface information is Ethernet72, the second IP address is 192.168.104.22, the second VLAN information is 103, and the second remark information is S2-S4. In other embodiments, each network topology element may also include device name, device type, MAC address, physical link, logical link, link status, interface name, interface status, interface speed, routing protocol and network protocol information, which may be set by a technician in this field according to actual needs.
[0053] S2. Use a first preset algorithm to perform authentication processing on the query request information to obtain a first authentication result.
[0054] Furthermore, the S2 step includes:
[0055] S21. parse the query request information to obtain a first quantum authentication code, a first timestamp, a query parameter, and a first quantum random number.
[0056] The first timestamp is time information, and illustratively, it may be 12:13:01 on December 16, 2024.
[0057] The query parameter is the third device ID information, the third network card information, the third SONIC interface information connected to the network card, the third IP address, the third VLAN information and / or the third remark information. In other embodiments, the query parameter may also be other information, which may be specifically set by those skilled in the art according to actual needs.
[0058] The data structure and data format of the third device ID information are the same as the data structure and data format of the second device ID information. The data structure and data format of the third network card information are the same as the data structure and data format of the second network card information. The data structure and data format of the third SONIC interface information are the same as the data structure and data format of the second SONIC interface information. The data structure and data format of the third IP address are the same as the data structure and data format of the second IP address. The data structure and data format of the third VLAN information are the same as the data structure and data format of the second VLAN information. The data structure and data format of the third remark information are the same as the data structure and data format of the second remark information.
[0059] In other implementations, user ID (Identity Document) information or other information may also be parsed from the query request information, which may be determined by those skilled in the art according to actual needs.
[0060] S22: Search in an advanced hash chain based on the first timestamp to obtain a first hash value.
[0061] In the advanced hash chain, there is a one-to-one correspondence between the first timestamp and the first hash value.
[0062] S23. Obtain the quantum key.
[0063] The quantum key is generated through a quantum key distribution (QKD) protocol.
[0064] S24. Generate a second quantum authentication code based on the first timestamp, the query parameter, the first quantum random number, the first hash value, and the quantum key.
[0065] Furthermore, the step S24 includes:
[0066] S241. Combine the first timestamp, the query parameter, the first quantum random number, and the first Hash value to obtain first combined data.
[0067] S242: Use a hash function to calculate the first combined data to obtain a second hash value.
[0068] The hash function is selected from MD5 (Message-Digest algorithm 5), SHA-1 (Secure Hash Algorithm 1), SHA-3 (Secure Hash Algorithm 3) or CRC32 (Cyclic Redundancy Check 32). In other implementations, the hash function may also be other functions, which may be specifically set by those skilled in the art according to actual needs.
[0069] S243. Use the quantum key to encrypt the second hash value to obtain the second quantum authentication code.
[0070] Furthermore, the generation process of the first quantum random number includes:
[0071] S244. Obtaining quantum states based on discrete quantum sources.
[0072] S245, converting the quantum state into a string of original random sequences.
[0073] S246. Perform bias processing on the random sequence to obtain the first quantum random number.
[0074] The bias processing can be implemented using the Von Neumann bias correction method (also known as the Von Neumann bias correction method). The core idea of the Von Neumann bias correction method is to reduce or eliminate the bias in the sequence by performing specific operations on the random sequence, so as to make it closer to the ideal random distribution.
[0075] S25. Compare the first quantum authentication code with the second quantum authentication code to obtain the first authentication result.
[0076] Further, when the first quantum authentication code and the second quantum authentication code are the same, the first authentication result is authentication passed; when the first quantum authentication code and the second quantum authentication code are different, the first authentication result is authentication failed.
[0077] S3. Respond to the query request information based on the first authentication result.
[0078] Specifically, when the first authentication result is that the authentication is passed, the network topology element corresponding to the query request information can be fed back to the smart terminal that sends the query request information, so that the smart terminal can display the network topology element corresponding to the query request information on the web page; when the first authentication result is that the authentication is failed, "no permission to view information" can be fed back to the smart terminal.
[0079] In the above implementation, the embodiment of the present application designs a first preset algorithm, and uses the first preset algorithm to authenticate the received query request information to obtain a first authentication result; and responds to the query request information based on the first authentication result. Therefore, the embodiment of the present application can grant the user the right to view the network topology information corresponding to the query request information based on the first authentication result. Therefore, the authentication operation of the embodiment of the present application can prevent unauthorized viewing requests, thereby achieving the function of improving the security of the network topology information.
[0080] In some implementations, after the S3 step, the network topology information management method further includes:
[0081] S41. Receive modification request information, where the modification request information is used to modify one or more network topology elements in the network topology information.
[0082] S42: Use a second preset algorithm to perform authentication processing on the modification request information to obtain a second authentication result.
[0083] Furthermore, the step S42 includes:
[0084] S421. Analyze the modification request information to obtain a third quantum authentication code, a second timestamp, a modification parameter, and a second quantum random number.
[0085] The second timestamp is also time information, and its data format and data structure are the same as those of the first timestamp.
[0086] The modification parameters are the fourth device ID information, the fourth network card information, the fourth SONIC interface information connected to the network card, the fourth IP address, the fourth VLAN information and / or the fourth remark information. In other embodiments, the modification parameters may also be other information, which may be specifically set by those skilled in the art according to actual needs.
[0087] The data structure and data format of the fourth device ID information are the same as the data structure and data format of the second device ID information. The data structure and data format of the fourth network card information are the same as the data structure and data format of the second network card information. The data structure and data format of the fourth SONIC interface information are the same as the data structure and data format of the second SONIC interface information. The data structure and data format of the fourth IP address are the same as the data structure and data format of the second IP address. The data structure and data format of the fourth VLAN information are the same as the data structure and data format of the second VLAN information. The data structure and data format of the fourth remark information are the same as the data structure and data format of the second remark information.
[0088] The generation process of the second quantum random number is the same as the generation process of the first quantum random number, which will not be repeated here.
[0089] S422: Search the advanced hash chain based on the second timestamp to obtain a third hash value.
[0090] In the advanced hash chain, there is a one-to-one correspondence between the second timestamp and the third hash value.
[0091] S423. Generate a fourth quantum authentication code based on the second timestamp, the modification parameter, the second quantum random number, the third hash value and the quantum key.
[0092] Furthermore, the step S423 includes:
[0093] S4231. Combine the second timestamp, the modification parameter, the second quantum random number and the third Hash value to obtain second combined data.
[0094] S4232. Use the Hash function to calculate the second combined data to obtain a fourth Hash value.
[0095] S4233. Use the quantum key to encrypt the fourth hash value to obtain the fourth quantum authentication code.
[0096] S424. Compare the third quantum authentication code with the fourth quantum authentication code to obtain the second authentication result.
[0097] Further, when the third quantum authentication code and the fourth quantum authentication code are the same, the second authentication result is authentication passed; when the third quantum authentication code and the fourth quantum authentication code are different, the second authentication result is authentication failed.
[0098] S43. Respond to the modification request information based on the second authentication result.
[0099] When the second authentication result is that the authentication is passed, the network topology element corresponding to the modification request information is modified in the database, and the "modification successful" information is fed back to the smart terminal; when the second authentication result is that the authentication is not passed, the "no authority to modify information" is fed back to the smart terminal.
[0100] In some implementations, before the step S43, the network topology information management method further includes:
[0101] S45, parsing the modification request information to obtain first device ID information, first network card information, first SONIC interface information connected to the network card, first IP address, first VLAN information and first remark information.
[0102] The data structure and data format of the first device ID information are the same as the data structure and data format of the second device ID information. The data structure and data format of the first network card information are the same as the data structure and data format of the second network card information. The data structure and data format of the first SONIC interface information are the same as the data structure and data format of the second SONIC interface information. The data structure and data format of the first IP address are the same as the data structure and data format of the second IP address. The data structure and data format of the first VLAN information are the same as the data structure and data format of the second VLAN information. The data structure and data format of the first remark information are the same as the data structure and data format of the second remark information.
[0103] S46. Perform data formatting processing on the first device ID information, the first network card information, the first SONIC interface information, the first IP address, the first VLAN information, and the first remark information.
[0104] Further, after the step S45, the network topology information management method further includes:
[0105] S47: Verify the first device ID information, the first network card information, the first SONIC interface information of the connected network card, and the first IP address to obtain a verification result.
[0106] S48. Execute the step S43 based on the verification result.
[0107] Specifically, when the verification result is that the verification is passed and the second authentication result is that the authentication is passed, the network topology element corresponding to the modification request information is modified in the database, and the "modification successful" information is fed back to the smart terminal; when the verification result is that the verification fails and the second authentication result is that the authentication is passed, the "modification operation will cause network conflicts and modification is not allowed" is fed back to the smart terminal; when the verification result is that the verification is passed and the second authentication result is that the authentication fails, the "no permission to modify the information" is fed back to the smart terminal; when the verification result is that the verification fails and the second authentication result is that the authentication fails, the "no permission to modify the information" is fed back to the smart terminal.
[0108] The step S47 can be used to avoid the risk of network conflict caused by the modification request information.
[0109] In some implementations, after the S3 step, the network topology information management method further includes:
[0110] S51. Receive adding request information, where the adding request information is used to add one or more network topology elements to the network topology information.
[0111] S52: Use a third preset algorithm to perform authentication processing on the adding request information to obtain a third authentication result.
[0112] Furthermore, the step S52 includes:
[0113] S521. parse the addition request information to obtain a fifth quantum authentication code, a third timestamp, an addition parameter, and a third quantum random number.
[0114] The third timestamp is also time information, and its data format and data structure are the same as those of the first timestamp.
[0115] The added parameters are the fifth device ID information, the fifth network card information, the fifth SONIC interface information connected to the network card, the fifth IP address, the fifth VLAN information and the fifth remark information. In other implementations, the added parameters may also be other information, which may be specifically set by those skilled in the art according to actual needs.
[0116] The data structure and data format of the fifth device ID information are the same as the data structure and data format of the second device ID information. The data structure and data format of the fifth network card information are the same as the data structure and data format of the second network card information. The data structure and data format of the fifth SONIC interface information are the same as the data structure and data format of the second SONIC interface information. The data structure and data format of the fifth IP address are the same as the data structure and data format of the second IP address. The data structure and data format of the fifth VLAN information are the same as the data structure and data format of the second VLAN information. The data structure and data format of the fifth remark information are the same as the data structure and data format of the second remark information.
[0117] The generation process of the third quantum random number is the same as the generation process of the first quantum random number, which will not be repeated here.
[0118] S522: Search the advanced hash chain based on the third timestamp to obtain a fifth hash value.
[0119] In the advanced hash chain, there is a one-to-one correspondence between the third timestamp and the fifth hash value.
[0120] S523. Generate a sixth quantum authentication code based on the third timestamp, the added parameter, the third quantum random number, the fifth hash value and the quantum key.
[0121] Furthermore, the step S523 includes:
[0122] S5231. Combine the third timestamp, the added parameter, the third quantum random number and the fifth Hash value to obtain third combined data.
[0123] S5232. Use the hash function to calculate the third combined data to obtain a sixth hash value.
[0124] S5233. Use the quantum key to encrypt the sixth hash value to obtain the sixth quantum authentication code.
[0125] S524. Compare the fifth quantum authentication code with the sixth quantum authentication code to obtain the third authentication result.
[0126] Further, when the fifth quantum authentication code and the sixth quantum authentication code are the same, the third authentication result is authentication passed; when the fifth quantum authentication code and the sixth quantum authentication code are different, the third authentication result is authentication failed.
[0127] S53. Respond to the adding request information based on the third authentication result.
[0128] When the third authentication result is that the authentication is passed, the network topology element corresponding to the addition request information is added to the database, and the "addition success" information is fed back to the smart terminal; when the third authentication result is that the authentication is not passed, the "no authority to add information" is fed back to the smart terminal.
[0129] In some implementations, after the S3 step, the network topology information management method further includes:
[0130] S61. Receive deletion request information, where the deletion request information is used to delete one or more network topology elements in the network topology information.
[0131] S62: Use a fourth preset algorithm to authenticate the deletion request information to obtain a fourth authentication result.
[0132] Furthermore, the step S62 includes:
[0133] S621. parse the deletion request information to obtain a seventh quantum authentication code, a fourth timestamp, a deletion parameter, and a fourth quantum random number.
[0134] The fourth timestamp is also time information, and its data format and data structure are the same as those of the first timestamp.
[0135] The deletion parameters are the sixth device ID information, the sixth network card information, the sixth SONIC interface information connected to the network card, the sixth IP address, the sixth VLAN information and the sixth remark information. In other implementations, the deletion parameters may also be other information, which may be specifically set by those skilled in the art according to actual needs.
[0136] The data structure and data format of the sixth device ID information are the same as the data structure and data format of the second device ID information. The data structure and data format of the sixth network card information are the same as the data structure and data format of the second network card information. The data structure and data format of the sixth SONIC interface information are the same as the data structure and data format of the second SONIC interface information. The data structure and data format of the sixth IP address are the same as the data structure and data format of the second IP address. The data structure and data format of the sixth VLAN information are the same as the data structure and data format of the second VLAN information. The data structure and data format of the sixth remark information are the same as the data structure and data format of the second remark information.
[0137] The generation process of the fourth quantum random number is the same as the generation process of the first quantum random number, which will not be repeated here.
[0138] S622: Search the advanced hash chain based on the fourth timestamp to obtain a seventh hash value.
[0139] In the advanced hash chain, there is a one-to-one correspondence between the fourth timestamp and the seventh hash value.
[0140] S623. Generate an eighth quantum authentication code based on the fourth timestamp, the deletion parameter, the fourth quantum random number, the seventh hash value and the quantum key.
[0141] Furthermore, the step S623 includes:
[0142] S6231. Combine the fourth timestamp, the deletion parameter, the fourth quantum random number and the seventh Hash value to obtain fourth combined data.
[0143] S6232. Use the hash function to calculate the fourth combined data to obtain an eighth hash value.
[0144] S6233. Use the quantum key to encrypt the eighth hash value to obtain the eighth quantum authentication code.
[0145] S624. Compare the seventh quantum authentication code with the eighth quantum authentication code to obtain the fourth authentication result.
[0146] Further, when the seventh quantum authentication code and the eighth quantum authentication code are the same, the fourth authentication result is authentication passed; when the seventh quantum authentication code and the eighth quantum authentication code are different, the fourth authentication result is authentication failed.
[0147] S63. Respond to the deletion request information based on the fourth authentication result.
[0148] When the fourth authentication result is that the authentication is passed, the network topology element corresponding to the deletion request information is deleted in the database, and the "deletion success" information is fed back to the smart terminal; when the fourth authentication result is that the authentication is not passed, the "no authority to delete information" is fed back to the smart terminal.
[0149] Through the above implementation, the network topology information management method realizes the refined management of adding, deleting, modifying and checking the network topology information.
[0150] In some implementations, before the step of receiving the query request information, the network topology information management method includes:
[0151] S71. Obtain the network topology information of the SONIC operating system.
[0152] The embodiment of the present application can accurately collect the network device information of the SONIC network operating system through a Shell command script dedicated to the SONIC operating system as the network topology information.
[0153] The network topology information can reflect the actual connection relationship between the network devices and provide a reliable basis for network administrators to observe the network topology.
[0154] Further, after obtaining the network topology information, a communication test within a VLAN or an isolation test across VLANs may be performed. Exemplarily, regarding the communication test within a VLAN, the interface IP of the test target device is pinged from other devices in the same VLAN to ensure reachability; regarding the isolation test across VLANs, the interface IP of the target device is pinged from devices in different VLANs to ensure unreachability.
[0155] The test results of the communication test or isolation test are compared with the topology configuration. If the test results are consistent with the topology configuration, it means that the data collection is accurate. In this way, the network topology information can be basically consistent with the actual network status, and the phenomenon of topology information deviation caused by data errors can be avoided to a certain extent.
[0156] S72. Store the network topology information in a database.
[0157] In the embodiment of the present application, phpMyAdmin is used to store relevant workstation information collected in the SONIC operating system in a unified format and divided according to key attributes such as device name, interface name and VLAN, such as interface name, VLAN to which the interface is divided, interface IP, etc. The design of the database focuses on relevance to ensure data integrity and consistency.
[0158] In other embodiments, a link table of the database is set, and the link table contains information with connection relationships in the management system, and provides device ID, network card information, and SONIC interface information connected to the network card. The link table establishes an association relationship through necessary information such as device ID and interface name to ensure the accuracy and completeness of network topology information in the SONIC operating system and the quality of network topology information in the database.
[0159] In some implementations, the network topology information management method further includes:
[0160] S81. Displaying the network topology information on a web page on a display screen.
[0161] The webpage uses modern web technologies such as HTML5, CSS or JavaScript to complete interactive work, supports the real-time viewing and modification needs of network administrators, and the webpage can dynamically respond to the operations of network administrators and provide real-time configuration feedback to ensure timely response to the network administrator's operations.
[0162] The webpage realizes the visual display of the network topology information.
[0163] refer to Figure 2 FIG. 1 is a block diagram of a network topology information management system provided in accordance with the second aspect of the present application. Figure 2 In the embodiment, the network topology information management system 100 includes:
[0164] The receiving module 101 is used to receive query request information, where the query request information is used to query one or more network topology elements in the network topology information;
[0165] An authentication module 102 is used to perform authentication processing on the query request information using a first preset algorithm to obtain a first authentication result;
[0166] The response module 103 is used to respond to the query request information based on the first authentication result.
[0167] The network topology information management system 100 is a system with the SONIC operating system as its core.
[0168] The network topology information management system 100 can effectively manage and monitor the communication and interaction modules of the software architecture layer in the SONIC network structure, including device status and connection relationships. The design of the network topology information management system 100 is intended to provide support for network operation and maintenance to meet the complex and diverse network environments caused by the application of the SONIC operating system in data centers and cloud computing.
[0169] The network topology information management system 100 can provide real-time network topology information display and relatively comprehensive management functions, and provide an intuitive and efficient management platform for the network administrator of the SONIC operating system.
[0170] The network topology information management system 100 can provide an interface for the network administrator to query, modify, add and delete information such as network interfaces, IP addresses, VLANs, etc. of the devices of the SONIC operating system in the database. The network topology information management system 100 can also provide the network administrator with real-time feedback on the results of the query operation, modification operation, addition operation or deletion operation.
[0171] In addition, the network topology information management system 100 occupies reasonable server resources during operation. The network topology information management system 100 can remove redundant data during the data collection phase and retain only key device data, and not only use the index mechanism to optimize the database query time, but also reduce the database operation frequency through batch processing operations.
[0172] Regarding the back-end calling module of the network topology information management system 100, the embodiment of the present application uses JavaScript to write back-end scripts to ensure the atomicity of database operations. All operations of the database are either all successful or all failed. In addition, the back-end calling module must also avoid conflicts caused by network configuration errors to ensure the accuracy and integrity of the data in the database after addition, deletion, modification and query. At the same time, the back-end calling module must also meet the two-to-two communication characteristics of the network topology after VLAN division.
[0173] A third aspect of the embodiments of the present application provides a terminal device. The principle block diagram of the terminal device can be as follows: Figure 3 As shown. The terminal device includes a processor, a memory, a network interface, a display screen and a temperature sensor connected via a system bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a network topology information management method is implemented. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor is pre-set inside the terminal device to detect the operating temperature of the internal device.
[0174] Those skilled in the art will understand that Figure 3 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0175] In some embodiments, an embodiment of the present application provides a terminal device, which includes a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the steps of the network topology information management method provided in the first aspect of the above-mentioned embodiment of the present application.
[0176] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program enables a computer to execute the steps of the network topology information management method provided in the first aspect of the embodiment of the present application.
[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0178] The technical features of the above embodiments can be combined without changing the basic principles of the present application. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0179] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of patent protection of the present application shall be subject to the attached claims.
Claims
1. A network topology information management method, characterized in that: include: Receiving query request information, where the query request information is used to query one or more network topology elements in the network topology information; Using a first preset algorithm to perform authentication processing on the query request information to obtain a first authentication result; The query request information is responded to based on the first authentication result.
2. The network topology information management method according to claim 1, characterized in that: The step of using a first preset algorithm to authenticate the query request information to obtain a first authentication result includes: Parsing the query request information to obtain a first quantum authentication code, a first timestamp, a query parameter, and a first quantum random number; Searching in the advanced hash chain based on the first timestamp to obtain a first hash value; Obtain quantum keys; Generate a second quantum authentication code based on the first timestamp, the query parameter, the first quantum random number, the first hash value and the quantum key; The first quantum authentication code and the second quantum authentication code are compared to obtain the first authentication result.
3. The network topology information management method according to claim 1, characterized in that: After the step of responding to the query request information based on the first authentication result, the network topology information management method further includes: Receiving modification request information, where the modification request information is used to modify one or more network topology elements in the network topology information; Using a second preset algorithm to perform authentication processing on the modification request information to obtain a second authentication result; Respond to the modification request information based on the second authentication result.
4. The network topology information management method according to claim 3, characterized in that: Before the step of responding to the modification request information based on the second authentication result, the network topology information management method further includes: Parse the modification request information to obtain first device ID information, first network card information, first SONIC interface information connected to the network card, first IP address, first VLAN information and first remark information; Data formatting is performed on the first device ID information, the first network card information, the first SONIC interface information, the first IP address, the first VLAN information, and the first remark information.
5. The network topology information management method according to claim 1, characterized in that: After the step of responding to the query request information based on the first authentication result, the network topology information management method further includes: receiving an adding request message, wherein the adding request message is used to add one or more network topology elements to the network topology information; Using a third preset algorithm to perform authentication processing on the adding request information to obtain a third authentication result; The adding request information is responded to based on the third authentication result.
6. The network topology information management method according to claim 1, characterized in that: After the step of responding to the query request information based on the first authentication result, the network topology information management method further includes: Receiving deletion request information, where the deletion request information is used to delete one or more network topology elements in the network topology information; Using a fourth preset algorithm to authenticate the deletion request information to obtain a fourth authentication result; The deletion request information is responded to based on the fourth authentication result.
7. The network topology information management method according to claim 1, characterized in that: Before the step of receiving the query request information, the network topology information management method includes: Obtaining the network topology information of the SONIC operating system; The network topology information is stored in a database.
8. A network topology information management system, characterized in that: include: A receiving module, used to receive query request information, where the query request information is used to query one or more network topology elements in the network topology information; An authentication module, configured to perform authentication processing on the query request information using a first preset algorithm to obtain a first authentication result; A response module is used to respond to the query request information based on the first authentication result.
9. A terminal device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the steps of the network topology information management method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the steps of the network topology information management method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Fault positioning system visualization method based on simulation topological structure
CN111988176A