Method, apparatus, device, and storage medium for updating topological information

By receiving and processing the modification event log of topology information, the topology information is directly updated, which solves the problem of low update efficiency in the existing technology and achieves more efficient topology information update.

CN119906641BActive Publication Date: 2025-05-30INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510392086.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-05-30
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

In the prior art, when the topological information is updated in this cycle, the complete topological information needs to be reacquired in the next cycle, resulting in reducing the efficiency of the topological information update.

Method used

By receiving the modification event log of the topology information sent by the array controller, we judge whether the topology information needs to be updated, and update the topology information based on the modification event log to avoid re-acquisition of the complete topology information in the next cycle.

Benefits of technology

Improve the efficiency of updating topological information and realize timely update of modification events without re-acquisition of complete topological information in the next cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906641B_ABST
    Figure CN119906641B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device and storage medium for updating topological information, relating to the technical field of servers, including: receiving a modification event log of topological information sent by an array controller; determining whether the topological information needs to be updated according to the modification event log; if the topological information needs to be updated, updating the topological information according to the modification event log to obtain updated topological information; outputting the updated topological information to a client, and timely updating the modification event of the topological information through the modification event log, so as to improve the updating efficiency of the topological information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of servers, and particularly to a method, device, equipment, and storage medium for updating and processing topology information. Background Art

[0002] Topology information refers to the connection relationships between a server and other devices in a network, as well as the physical or logical layout. It can help administrators better understand the server architecture, manage the server more effectively, and solve potential problems more quickly. Therefore, when a server has different operating requirements, its topology information needs to be updated in a timely manner.

[0003] In related technologies, topology information is mainly obtained through periodic polling. When the topology information is updated in the current period, it is necessary to re-obtain the complete topology information in the next period to complete the update and display of the topology information. However, in related technologies, when the topology information is updated in the current period, it is necessary to re-obtain the complete topology information in the next period, which reduces the update efficiency of the topology information. Summary of the Invention

[0004] This application provides a method, device, equipment, and storage medium for updating and processing topology information, so as to at least solve the problem in related technologies that when the topology information is updated in the current period, it is necessary to re-obtain the complete topology information in the next period, which reduces the update efficiency of the topology information.

[0005] This application provides a method for updating and processing topology information, including:

[0006] Receiving a modification event log of topology information sent by an array controller, where the modification event log is configured by the array controller for the modification event log, and the modification event is obtained by the array controller modifying the topology information according to a received modification instruction, and the modification instruction is generated by a user terminal;

[0007] Judging whether the topology information needs to be updated according to the modification event log;

[0008] If the topology information needs to be updated, updating the topology information according to the modification event log to obtain updated topology information;

[0009] Outputting the updated topology information to the user terminal.

[0010] This application also provides a method for updating and processing topology information, including:

[0011] Receiving a modification instruction sent by a user terminal, and modifying the topology information according to the modification instruction to obtain a modification event;

[0012] Configure the log for the modification event to obtain the modification event log;

[0013] Send the modification event log to the controller. The modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log. If the topology information needs to be updated, update the topology information according to the modification event log to obtain the updated topology information, and output the updated topology information to the user terminal.

[0014] This application also provides an update processing device for topology information, including:

[0015] A receiving module, configured to receive the modification event log of the topology information sent by the array controller, where the modification event log is obtained by the array controller configuring the modification event log, and the modification event is obtained by the array controller modifying the topology information according to the received modification instruction, and the modification instruction is generated by the user terminal;

[0016] A judging module, configured to judge whether the topology information needs to be updated according to the modification event log;

[0017] An updating module, configured to update the topology information according to the modification event log if the topology information needs to be updated to obtain the updated topology information;

[0018] An output module, configured to output the updated topology information to the user terminal.

[0019] This application also provides an update processing device for topology information, including:

[0020] A receiving module, configured to receive the modification instruction sent by the user terminal, and modify the topology information according to the modification instruction to obtain a modification event;

[0021] A configuration module, configured to configure the log for the modification event to obtain the modification event log;

[0022] A sending module, configured to send the modification event log to the controller. The modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log. If the topology information needs to be updated, update the topology information according to the modification event log to obtain the updated topology information, and output the updated topology information to the user terminal.

[0023] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above update processing methods for topology information when executing the computer program.

[0024] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned topology information update processing methods are implemented.

[0025] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned topology information update processing methods are implemented.

[0026] The topology information update processing method, device, equipment and storage medium provided by the present application receive a modification event log of topology information sent by an array controller, where the modification event log is configured by the array controller for the modification event log, and the modification event is obtained by the array controller modifying the topology information according to a received modification instruction, and the modification instruction is generated by a user terminal; determine whether the topology information needs to be updated according to the modification event log; if the topology information needs to be updated, update the topology information according to the modification event log to obtain updated topology information; output the updated topology information to the user terminal, and only perform timely modification event updates on the topology information through the modification event log, without re-obtaining the complete topology information in the next cycle, so as to improve the update efficiency of the topology information. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a schematic diagram of the application scenario of the topology information update processing method provided by the embodiment of the present application;

[0029] Figure 2 It is a flowchart of the topology information update processing method provided by the embodiment of the present application Figure 1 ;

[0030] Figure 3 It is a schematic diagram of adding and deleting logical disks provided by the embodiment of the present application;

[0031] Figure 4 It is a flowchart of the topology information update processing method provided by the embodiment of the present application Figure 2 ;

[0032] Figure 5 It is a flowchart of the topology information update processing method provided by the embodiment of the present application Figure 3 ;

[0033] Figure 6 Structural schematic diagram of the topology information update processing device provided by the embodiment of the present application Figure 1 ;

[0034] Figure 7 Structural schematic diagram of the topology information update processing device provided by the embodiment of the present application Figure 2 ;

[0035] Figure 8 Hardware structure schematic diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners

[0036] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the protection scope of the present application.

[0037] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0038] Topology information refers to the connection relationship between a server and other devices in a network, as well as the physical or logical layout, which can be a star topology, a bus topology, a ring topology, a tree topology, a mesh topology, etc. It can help administrators better understand the architecture of the server, manage the server more effectively, and solve possible problems more quickly. Therefore, when the server has different operating requirements, its topology information needs to be updated in a timely manner. In the related art, the topology information is mainly obtained through a periodic polling method. When the topology information is updated in this period, the complete topology information needs to be re-obtained in the next period to complete the update display of the topology information. However, in the related art, when the topology information is updated in this period, the complete topology information needs to be re-obtained in the next period, which reduces the update efficiency of the topology information.

[0039] To solve the above technical problems, the embodiments of the present application propose the following technical concepts: The inventor considers the received modification event log. After determining that the topology information needs to be updated using the modification event log, the topology information is updated according to the modification event log to obtain the updated topology information, and the updated topology information is output to the user terminal. The modification event update of the topology information is performed in a timely manner through the modification event log, thereby improving the update efficiency of the topology information.

[0040] To enable those skilled in the art of this technology to better understand the solution of the present application, the following further detailed description of the present application will be given in conjunction with the accompanying drawings and specific embodiments.

[0041] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the topology information update processing method depends, the specific application environment architecture or specific hardware architecture will be described herein. Refer to Figure 1 , Figure 1 is a schematic diagram of the application scenario of the topology information update processing method.

[0042] As Figure 1 shown, the electronic devices in this scenario include: server 10 and user terminal 20.

[0043] Server 10 includes a controller 101 and an array controller 102.

[0044] User terminal 20 can be a display terminal or other user terminals.

[0045] Controller 101 receives the modification event log of the topology information sent by the array controller 102 through a wireless network, and determines whether the topology information needs to be updated according to the modification event log; if the topology information needs to be updated, the topology information is updated according to the modification event log to obtain the updated topology information; the updated topology information is output to the user terminal 20.

[0046] Figure 2 is a schematic flow chart of the topology information update processing method provided by the embodiments of the present application Figure 1 As Figure 2 shown, the embodiments of the present application provide a topology information update processing method, and the method will be described in detail as follows:

[0047] S201: Receive the modification event log of the topology information sent by the array controller, where the modification event log is configured by the array controller for the modification event log, and the modification event is obtained by the array controller modifying the topology information according to the received modification instruction, and the modification instruction is generated by the user terminal.

[0048] In this embodiment, the array controller can be a disk redundant array card or other controllers.

[0049] Among them, the redundant array of independent disks (RAID) card, also known as the RAID card, is a technology used to improve storage performance, data redundancy, and system reliability, and has a wide range of applications in servers. Servers generally manage storage resources through the RAID card.

[0050] In this embodiment, the topology information includes one or more of the following information: the list of controller names, the list of logical disk names, the list of physical disk names, the detailed controller information, the detailed logical disk information, the detailed physical disk information, and the topology table.

[0051] Among them, the detailed controller information includes the manufacturer, model, serial number, version number, speed, temperature, and health status, etc.

[0052] Among them, the detailed logical disk information includes the name, capacity, RAID type, read / write policy, and health status, etc.

[0053] Among them, the detailed physical disk information includes the manufacturer, model, serial number, capacity, interface type, temperature, software version, and health status, etc.

[0054] Among them, the topology table includes at least the following multiple information: the list of logical disk names, the list of physical disk names, logical disk nodes, and physical disk nodes.

[0055] Exemplarily, read the list of logical disk names, the list of physical disk names, and the corresponding logical disk nodes and physical disk nodes in the topology table collected by the RAID card.

[0056] In this embodiment, the topology information is obtained according to topology units, and the topology units include array controllers, logical disks, and physical disks.

[0057] In this embodiment, the modification event can be an asynchronous event or other events.

[0058] In this embodiment, the modification instruction can be a logical disk creation, a logical disk deletion, and other instructions.

[0059] In this embodiment, the client is a display terminal, and a corresponding browsing interface is displayed on the display terminal.

[0060] Among them, the browsing interface is obtained according to the Web UI service, and the Web UI service refers to the service in the design of network product interfaces, mainly involving the user interface design of websites and software.

[0061] Specifically, step S201 is specifically: receiving the modification event log sent by the array controller through a pre-configured event receiving tool.

[0062] In this embodiment, the event receiving tool can be an asynchronous event receiving tool or other receiving tools.

[0063] Among them, the configuration process of the event receiving tool includes steps a to b:

[0064] Step a: Obtain the corresponding target code according to the preset code repository.

[0065] In this embodiment, the preset code repository can be the Storelib library or other repositories.

[0066] Step b: Configure the event receiving tool according to the target code.

[0067] S202: Determine whether the topology information needs to be updated according to the modified event log.

[0068] Specifically, determine whether it belongs to the modification type according to the modified event log to determine whether the topology information needs to be updated.

[0069] S203: If the topology information needs to be updated, update the topology information according to the modified event log to obtain the updated topology information.

[0070] In this embodiment, the modified event log includes multiple event codes; correspondingly, step S203 specifically includes:

[0071] S2031: If the topology information needs to be updated, extract multiple event codes from the modified event log.

[0072] In this embodiment, each event code corresponds to each modification event one by one.

[0073] S2032: Determine one or more event codes from multiple event codes according to the preset update rule comparison table.

[0074] In this embodiment, the preset update rule comparison table is shown in Table 1:

[0075] Table 1 Preset update rule comparison table

[0076]

[0077] Among them, the computer languages corresponding to the modification events are: logical disk creation is LD_CREATE, logical disk deletion is LD_DELETE, physical disk access is PD_INSERTED, physical disk deletion is PD_REMOVED, and configuration clearing is CFG_CLEARED.

[0078] Exemplarily, according to the above preset update rule comparison table, determine one or more event codes corresponding to 0x008A, 0x008B, 0x005B, 0x0070, or 0x0004 from multiple event codes.

[0079] S2033: Update the topology information according to one or more event codes to obtain the updated topology information.

[0080] Specifically, step S2033 specifically includes:

[0081] S20331: Divide the update range of the topology information according to one or more event codes.

[0082] In this embodiment, the update range is the topology update range shown in Table 1.

[0083] Exemplarily, divide the update range of the topology information according to 0x008A and 0x008B to update the logical disk topology.

[0084] S20332: Read multiple first device name lists in the update range.

[0085] Exemplarily, read the first logical disk name list in the update range through SL_GET_LD_LIST; read the first physical disk name list in the update range through SL_GET_PD_LIST.

[0086] S20333: Obtain multiple second device name lists in the pre-stored topology information.

[0087] In this embodiment, the storage process of the topology information is: store the topology information in the local memory.

[0088] S20334: Compare the multiple first device name lists with the multiple second device name lists to obtain one or more newly added first device names and / or one or more deleted second device names.

[0089] Exemplarily, taking the logical disk list as an example, compare the first logical disk name list with the second logical disk name list to obtain the newly added first logical disk name and the deleted second logical disk name.

[0090] Among them, the first logical disk name list can be 0x10000, 0x10001, and 0x10003; the second logical disk name list can be 0x10000, 0x10001, and 0x10002.

[0091] Among them, the newly added first logical disk name is 0x10003, and the deleted second logical disk name is 0x10002.

[0092] S20335: Update the topology information according to the one or more newly added first device names and / or the one or more deleted second device names to obtain the updated topology information.

[0093] In this embodiment, the first device name includes a first logical disk name and a first physical disk name, and the second device name includes at least a second logical disk name; correspondingly, step S20335 specifically includes:

[0094] S203351: Obtain the corresponding first physical disk name according to each newly added first logical disk name.

[0095] Specifically, obtain the detailed information of the corresponding logical disk according to each newly added first logical disk name, and obtain the corresponding first physical disk name.

[0096] Exemplarily, taking any logical disk as an example, when the newly added first logical disk name is 0x10003, it is necessary to obtain the detailed information of the logical disk corresponding to 0x10003.

[0097] S203352: Add the corresponding first topology node to the topology information according to each first physical disk name to obtain the updated topology information; and / or,

[0098] Specifically, add the corresponding first topology node to the topology information according to each first physical disk name and each first logical disk name, and write the detailed information into the topology information to obtain the updated topology information.

[0099] Exemplarily, according to physical disk 5 and the first logical disk 0x10003, add the corresponding first topology node to the topology information, and write the detailed information corresponding to 0x10003 into the topology information to obtain the updated topology information.

[0100] S203353: Determine the corresponding second topology node in the topology information according to each deleted second logical disk name.

[0101] Exemplarily, when the deleted second logical disk name is 0x10002, determine the corresponding second topology node in the topology information according to 0x10002.

[0102] S203354: Delete each second topology node in the topology information to obtain the updated topology information.

[0103] Exemplarily, delete the second topology node corresponding to the second logical disk 0x10002 in the topology information to obtain the updated topology information, where the updated topology information is as Figure 3 shown in the schematic diagram of logical disk addition and deletion.

[0104] In addition, if a physical disk is added, the steps are the same as those for adding a logical disk above; if a physical disk is deleted, after deleting the physical disk, check whether there are still physical disks under the associated logical disk in the topology information; if there are physical disks, retain the associated logical disk; if there are no physical disks, the associated logical disk should also be deleted to obtain the updated topology information.

[0105] S204: Output the updated topology information to the client.

[0106] Exemplarily, output the updated topology information to the browsing interface of the display terminal.

[0107] In summary, for the topology information update processing method provided in this embodiment, by receiving the modification event log of the topology information sent by the array controller, where the modification event log is configured by the array controller for the modification event log, and the modification event is obtained by the array controller modifying the topology information according to the received modification instruction, and the modification instruction is generated by the client; determine whether the topology information needs to be updated according to the modification event log; if the topology information needs to be updated, update the topology information according to the modification event log to obtain the updated topology information; output the updated topology information to the client, and only perform timely modification event updates on the topology information through the modification event log, without re-obtaining the complete topology information in the next cycle, which improves the update efficiency of the topology information.

[0108] Figure 4 This is the flowchart of the topology information update processing method provided by the embodiment of the present application Figure 2 。In the embodiment of the present application, on the basis of the Figure 2 embodiment provided, a detailed description is given of the specific implementation method for determining whether the topology information needs to be updated in step S202. As Figure 4 shown, this method includes:

[0109] S401: Parse the modification event log to obtain the log content.

[0110] S402: Identify the key event content in the log content.

[0111] In this embodiment, the modification event log includes multiple event codes; correspondingly, step S402 is specifically: identify the key event content in the log content according to one or more event codes and event descriptions.

[0112] In this embodiment, the event code is EventCode, and the event description is Description.

[0113] S403: Compare the key event content with the preset key events to determine whether the topology information needs to be updated.

[0114] In this embodiment, one or more key events are included in the key event content; correspondingly, step S403 specifically includes:

[0115] S4031: Compare each key event in the key event content with the preset key events.

[0116] In this embodiment, the preset key events are one or more of the following events: logical disk creation, logical disk deletion, configuration clearing, physical disk access, and physical disk deletion.

[0117] S4032: If any key event hits the preset key event, it is determined that the topology information needs to be updated.

[0118] S4033: If each key event does not hit the preset key event, it is determined that the topology information does not need to be updated.

[0119] In summary, in the topology information update processing method provided in this embodiment, by parsing the modified event log, the log content is obtained; the key event content in the log content is identified; the key event content is compared with the preset key events to determine whether the topology information needs to be updated. Through the above method of comparing the key event content with the preset key events, the modified event is determined, making the update of the topology information more accurate.

[0120] Figure 5 is a flowchart of the topology information update processing method provided in an embodiment of the present application Figure 3 , as Figure 5 shown, an embodiment of the present application provides another topology information update processing method, and the method is described in detail as follows:

[0121] S501: Receive a modification instruction sent by the user terminal, and modify the topology information according to the modification instruction to obtain a modification event.

[0122] In this embodiment, the discussion about the topology information and the modification instruction has been described in detail in step S201, and will not be repeated here.

[0123] S502: Perform log configuration on the modification event to obtain a modified event log.

[0124] Specifically, step S502 specifically includes:

[0125] S5021: Perform event code configuration on the modification event to obtain a modification event with a component code.

[0126] In this embodiment, the discussion about the event code has been described in detail in step S203, and will not be repeated here.

[0127] S5022: Configure a log for the modification event with the accessory code to obtain the modification event log.

[0128] S503: Send the modification event log to the controller. The modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log. If the topology information needs to be updated, update the topology information according to the modification event log to obtain the updated topology information, and output the updated topology information to the user terminal.

[0129] In this embodiment, the controller can be a base management controller or other controllers.

[0130] In summary, the topology information update processing method provided in this embodiment receives a modification instruction sent by the user terminal, modifies the topology information according to the modification instruction to obtain a modification event, configures a log for the modification event to obtain a modification event log, and sends the modification event log to the controller. The modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log. If the topology information needs to be updated, update the topology information according to the modification event log to obtain the updated topology information, and output the updated topology information to the user terminal. By using the modification event log, only the timely modification event update of the topology information is performed, and there is no need to re-obtain the complete topology information in the next cycle, thus improving the update efficiency of the topology information.

[0131] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0132] Figure 6 Structural schematic of the topology information update processing device provided in the embodiment of the present application Figure 1 . As Figure 6 shown, the embodiment of the present application also provides a topology information update processing device, including: a receiving module 601, a judging module 602, an updating module 603, and an output module 604.

[0133] The receiving module 601 is used to receive the modification event log of the topology information sent by the array controller, where the modification event log is configured by the array controller for the modification event log, and the modification event is obtained by the array controller modifying the topology information according to the received modification instruction, and the modification instruction is generated by the user terminal;

[0134] The judging module 602 is used to judge whether the topology information needs to be updated according to the modification event log;

[0135] An update module 603, configured to update the topology information according to the modification event log if the topology information needs to be updated, so as to obtain the updated topology information;

[0136] An output module 604, configured to output the updated topology information to the client.

[0137] In a possible implementation manner, the judgment module 602 specifically includes:

[0138] A parsing unit, configured to parse the modification event log to obtain the log content;

[0139] An identification unit, configured to identify the key event content in the log content;

[0140] A comparison unit, configured to compare the key event content with a preset key event to determine whether the topology information needs to be updated.

[0141] In a possible implementation manner, one or more key events are included in the key event content; correspondingly, the comparison unit specifically includes:

[0142] A comparison unit, configured to compare each key event in the key event content with the preset key event;

[0143] A first determination unit, configured to determine that the topology information needs to be updated if any key event hits the preset key event;

[0144] A second determination unit, configured to determine that the topology information does not need to be updated if each key event does not hit the preset key event.

[0145] In a possible implementation manner, the preset key event includes one or more of the following events: logical disk creation, logical disk deletion, configuration clearing, physical disk access, and physical disk deletion.

[0146] In a possible implementation manner, a plurality of event codes are included in the modification event log; correspondingly, the identification unit is specifically configured to: identify the key event content in the log content according to one or more event codes and event descriptions.

[0147] In a possible implementation manner, a plurality of event codes are included in the modification event log; correspondingly, the update module 603 specifically includes:

[0148] An extraction unit, configured to extract a plurality of event codes in the modification event log if the topology information needs to be updated;

[0149] A determination unit, configured to determine one or more event codes from the plurality of event codes according to a preset update rule look-up table;

[0150] An update unit, configured to update topology information according to one or more event codes to obtain updated topology information.

[0151] In a possible implementation, the update unit specifically includes:

[0152] A partitioning unit, configured to partition the update range of the topology information according to one or more event codes;

[0153] A reading unit, configured to read multiple first device name lists in the update range;

[0154] An obtaining unit, configured to obtain multiple second device name lists in the pre-stored topology information;

[0155] A comparison unit, configured to compare the multiple first device name lists with the multiple second device name lists to obtain one or more newly added first device names and / or one or more deleted second device names;

[0156] An update unit, configured to update the topology information according to one or more newly added first device names and / or one or more deleted second device names to obtain updated topology information.

[0157] In a possible implementation, the first device name includes a first logical disk name and a first physical disk name, and the second device name includes at least a second logical disk name; correspondingly, the update unit specifically includes:

[0158] An obtaining unit, configured to obtain the corresponding first physical disk name according to each newly added first logical disk name;

[0159] An adding unit, configured to add corresponding first topology nodes to the topology information according to each first physical disk name to obtain updated topology information; and / or,

[0160] A determining unit, configured to determine corresponding second topology nodes in the topology information according to each deleted second logical disk name;

[0161] A deleting unit, configured to delete each second topology node in the topology information to obtain updated topology information.

[0162] In a possible implementation, the storage process of the topology information includes: storing the topology information in the local memory.

[0163] In a possible implementation, the receiving module 601 is specifically configured to: receive the modified event log sent by the array controller through a pre-configured event receiving tool.

[0164] In a possible implementation, the apparatus further includes:

[0165] An acquisition module, configured to acquire a corresponding target code according to a preset code repository;

[0166] A configuration module, configured to configure an event receiving tool according to the target code.

[0167] In a possible implementation, the topology unit includes one or more of the following devices: a controller, a logical disk, and a physical disk.

[0168] In a possible implementation, the topology information includes one or more of the following information: a list of controller names, a list of logical disk names, a list of physical disk names, controller details, logical disk details, physical disk details, and a topology table.

[0169] In a possible implementation, the topology table includes at least the following multiple information: a list of logical disk names, a list of physical disk names, logical disk nodes, and physical disk nodes.

[0170] For the description of the features in the corresponding embodiments of the topology information update processing device, reference can be made to the relevant descriptions in the corresponding embodiments of the topology information update processing method, which will not be elaborated here one by one.

[0171] Figure 7 The structural schematic of the topology information update processing device provided by the embodiments of the present application Figure 2 . As Figure 7 shown, the embodiments of the present application further provide a topology information update processing device, including: a receiving module 701, a configuration module 702, and a sending module 703.

[0172] The receiving module 701 is configured to receive a modification instruction sent by a user terminal, and modify the topology information according to the modification instruction to obtain a modification event;

[0173] The configuration module 702 is configured to perform log configuration on the modification event to obtain a modification event log;

[0174] The sending module 703 is configured to send the modification event log to a controller. The modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log. If the topology information needs to be updated, the topology information is updated according to the modification event log to obtain updated topology information, and the updated topology information is output to the user terminal.

[0175] In a possible implementation, the configuration module 702 specifically includes:

[0176] A first configuration unit, configured to perform event code configuration on the modification event to obtain a modification event with a fitting code;

[0177] A second configuration unit for logging the modification event with the accessory code to obtain a modification event log.

[0178] For the description of the features in the corresponding embodiment of the topology information update processing device, reference can be made to the relevant description in the corresponding embodiment of the topology information update processing method, which will not be elaborated here one by one.

[0179] Figure 8 It is a schematic structural diagram of the electronic device provided by this application. As Figure 8 shown, the electronic device provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the electronic device further includes a communication component 803. Among them, the processor 801, the memory 802, and the communication component 803 are connected through a bus.

[0180] In the specific implementation process, at least one processor 801 executes the computer-executable instructions stored in the memory 802, so that at least one processor 801 executes the above-mentioned topology information update processing method embodiment.

[0181] For the specific implementation process of the processor 801, reference can be made to the above method embodiment. The implementation principle and technical effect are similar, and will not be elaborated here in this embodiment.

[0182] In the above embodiment, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0183] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0184] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0185] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in the embodiment of any of the above topology information update processing methods when running.

[0186] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as a USB flash drive, a read-only memory (ROM for short), a random access memory (RAM for short), a mobile hard disk, a magnetic disk, or an optical disc.

[0187] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in the embodiment of any of the above topology information update processing methods.

[0188] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in the embodiment of any of the above topology information update processing methods.

[0189] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0190] The above has introduced in detail a method, apparatus, device, and storage medium for updating topological information provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for updating topology information, characterized in that: include: Receive a modification event log of topology information sent by an array controller, wherein the modification event log is obtained by configuring the modification event log by the array controller, the modification event is obtained by modifying the topology information by the array controller according to a received modification instruction, and the modification instruction is generated by a user terminal; Determine whether the topology information needs to be updated according to the modification event log; If the topology information needs to be updated, the topology information is updated according to the modification event log to obtain updated topology information; The modification event log includes a plurality of event codes; Correspondingly, if the topology information needs to be updated, the topology information is updated according to the modification event log to obtain the updated topology information, including: if the topology information needs to be updated, multiple event codes in the modification event log are extracted; one or more event codes are determined from the multiple event codes according to a preset update rule comparison table; the update range of the topology information is divided according to the one or more event codes; multiple first device name lists in the update range are read; multiple second device name lists in the pre-stored topology information are obtained; the multiple first device name lists are compared with the multiple second device name lists to obtain one or more newly added first device names, and / or one or more deleted second device names; the topology information is updated according to the one or more newly added first device names, and / or the one or more deleted second device names to obtain the updated topology information; The updated topology information is output to the user terminal.

2. The method for updating topology information according to claim 1, characterized in that: The determining whether the topology information needs to be updated according to the modification event log includes: Parsing the modification event log to obtain log content; Identify key event content in the log content; The key event content is compared with the preset key event to determine whether the topology information needs to be updated.

3. The method for updating topology information according to claim 2, characterized in that: The key event content includes one or more key events; Accordingly, comparing the key event content with a preset key event to determine whether the topology information needs to be updated includes: Comparing each key event in the key event content with the preset key event; If any key event hits the preset key event, it is determined that the topology information needs to be updated; If the key events do not match the preset key events, it is determined that the topology information does not need to be updated.

4. The method for updating topology information according to claim 3, characterized in that: The preset key events include one or more of the following events: logical disk creation, logical disk deletion, configuration clearing, physical disk access, and physical disk deletion.

5. The method for updating topology information according to claim 2, characterized in that: The modification event log includes a plurality of event codes; Accordingly, the identifying key event content in the log content includes: Key event content in the log content is identified according to one or more event codes and event descriptions.

6. The method for updating topology information according to claim 1, characterized in that: The first device name includes a first logical disk name and a first physical disk name, and the second device name includes at least a second logical disk name; Accordingly, the updating of the topology information according to the newly added one or more first device names and / or the deleted one or more second device names to obtain updated topology information includes: Obtain the corresponding first physical disk name according to each newly added first logical disk name; According to the names of the first physical disks, a corresponding first topological node is added to the topological information to obtain updated topological information; and / or, According to the names of the deleted second logical disks, determining corresponding second topological nodes in the topological information; Each second topological node is deleted from the topological information to obtain updated topological information.

7. The method for updating topology information according to claim 1, characterized in that: The storage process of the topology information includes: storing the topology information in a local memory.

8. The method for updating topology information according to claim 1, characterized in that: The receiving the modification event log of the topology information sent by the array controller includes: The preconfigured event receiving tool receives the topology information modification event log sent by the array controller.

9. The method for updating topology information according to claim 8, characterized in that: The configuration process of the event receiving tool includes: Obtain corresponding target code according to a preset code repository; The event receiving tool is configured according to the target code.

10. The method for updating topology information according to claim 1, characterized in that: The topology information includes one or more of the following information: Controller name list, logical disk name list, physical disk name list, controller detailed information, logical disk detailed information, physical disk detailed information, and topology table.

11. The method for updating topology information according to claim 10, characterized in that: The topology table includes at least the following information: Logical disk name list, physical disk name list, logical disk nodes, and physical disk nodes.

12. A method for updating topology information, characterized in that: include: Receive a modification instruction sent by a user terminal, and modify the topology information according to the modification instruction to obtain a modification event; Performing log configuration on the modification event to obtain a modification event log; Sending the modification event log to the controller, wherein the modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log, and if the topology information needs to be updated, updating the topology information according to the modification event log to obtain the updated topology information, and outputting the updated topology information to the user end; The modification event log includes a plurality of event codes; accordingly, if the topology information needs to be updated, the topology information is updated according to the modification event log to obtain the updated topology information, including: if the topology information needs to be updated, extracting a plurality of event codes from the modification event log; According to a preset update rule comparison table, one or more event codes are determined from the multiple event codes; the update range of the topology information is divided according to the one or more event codes; multiple first device name lists in the update range are read; multiple second device name lists in the pre-stored topology information are obtained; the multiple first device name lists are compared with the multiple second device name lists to obtain one or more newly added first device names, and / or one or more deleted second device names; the topology information is updated according to the one or more newly added first device names, and / or the one or more deleted second device names to obtain updated topology information.

13. The method for updating topology information according to claim 12, characterized in that: The step of performing log configuration on the modification event to obtain a modification event log includes: Performing event code configuration on the modification event to obtain a modification event with an accessory code; The modification event with the accessory code is configured to have a log, thereby obtaining a modification event log.

14. A topology information update processing device, characterized in that: include: A receiving module, configured to receive a modification event log of topology information sent by an array controller, wherein the modification event log is obtained by configuring the modification event log by the array controller, the modification event is obtained by modifying the topology information by the array controller according to a received modification instruction, and the modification instruction is generated by a user terminal; A judgment module, used to judge whether the topology information needs to be updated according to the modification event log; An updating module, configured to update the topology information according to the modification event log to obtain updated topology information if the topology information needs to be updated; The modification event log includes multiple event codes; Accordingly, the update module specifically includes: An extraction unit, used for extracting a plurality of event codes in a modification event log if the topology information needs to be updated; A determination unit, configured to determine one or more event codes from a plurality of event codes according to a preset update rule comparison table; A partitioning unit, used for partitioning the update range of the topology information according to one or more event codes; A reading unit, used for reading a plurality of first device name lists in an update range; An acquiring unit, configured to acquire a plurality of second device name lists in pre-stored topology information; A comparing unit, used to compare the multiple first device name lists with the multiple second device name lists to obtain one or more newly added first device names and / or one or more deleted second device names; An updating unit, configured to update the topology information according to one or more newly added first device names and / or one or more deleted second device names to obtain updated topology information; An output module is used to output the updated topology information to the user end.

15. A topology information update processing device, characterized in that: include: A receiving module, used for receiving a modification instruction sent by a user terminal, and modifying the topology information according to the modification instruction to obtain a modification event; A configuration module, used for performing log configuration on the modification event to obtain a modification event log; A sending module, used for sending the modification event log to the controller, wherein the modification event log is used to instruct the controller to determine whether the topology information needs to be updated according to the modification event log; if the topology information needs to be updated, the topology information is updated according to the modification event log to obtain the updated topology information, and the updated topology information is output to the user end; The modification event log includes a plurality of event codes; accordingly, if the topology information needs to be updated, the topology information is updated according to the modification event log to obtain the updated topology information, including: if the topology information needs to be updated, extracting a plurality of event codes from the modification event log; According to a preset update rule comparison table, one or more event codes are determined from the multiple event codes; the update range of the topology information is divided according to the one or more event codes; multiple first device name lists in the update range are read; multiple second device name lists in the pre-stored topology information are obtained; the multiple first device name lists are compared with the multiple second device name lists to obtain one or more newly added first device names, and / or one or more deleted second device names; the topology information is updated according to the one or more newly added first device names, and / or the one or more deleted second device names to obtain updated topology information.

16. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method for updating topology information as described in any one of claims 1 to 11, or the method for updating topology information as described in claim 12 or 13, when executing the computer program.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the method for updating topology information according to any one of claims 1 to 11, or the method for updating topology information according to claim 12 or 13.

18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for updating topology information according to any one of claims 1 to 11 or the method for updating topology information according to claim 12 or 13 is implemented.

Citation Information

Patent Citations

  • Full-flow-based industrial control network topological graph generation method

    CN111130859A

  • PCIE topology transmission method and device, electronic equipment and storage medium

    CN115640076A