Data query method and device, electronic equipment and storage medium

By receiving query instructions in the storage area network and encoding the original data entry based on the preset encoding format, generating candidate data entry and storing it in volatile and nonvolatile memory, the problem of low SAN data query efficiency is solved, and the problem of low SAN data query is realized Quick response and efficient query.

CN119311728APending Publication Date: 2025-01-14STRONTIUM SILICON (SHANGHAI) NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411267018.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In storage area networks (SANs), data query efficiency is low, and data is needed to be retrieved from multiple network element devices, resulting in slow response speed and affecting user experience and operation and maintenance efficiency.

Method used

By receiving query instructions, the original data entry is encoded based on the preset encoding format, candidate data entry is generated, and stored in volatile and nonvolatile memory, achieving rapid query and data synchronization and improving query efficiency.

Benefits of technology

It realizes the rapid query of target data entries, improves data query efficiency, can respond to user operations in seconds, and improves user experience and operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311728A_ABST
    Figure CN119311728A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data query method and device, electronic equipment and a storage medium, and relates to the technical field of storage. The data query method comprises the following steps: receiving a query instruction for querying storage area network (SAN) data; wherein the SAN comprises a plurality of network element devices, and each network element device comprises a server, an optical fiber switch and a storage device; according to query parameters in the query instruction, obtaining a target data entry corresponding to the query instruction from a first data set stored in a first memory; wherein the first memory is a volatile memory, the first data set comprises a plurality of candidate data entries, the candidate data entries are obtained by encoding original data entries of the network element equipment based on a preset encoding format, and different candidate data entries contain data of the same or different network element equipment; sending the target data entry to the target device; wherein the target device comprises a device for displaying the target data item, and / or a device for sending a query instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a data query method, device, electronic device, and storage medium. Background Art

[0002] With advances in computer technology, storage area networks (SANs) have become a network architecture that provides high-speed data storage services. A SAN connects multiple servers, storage devices (such as disk arrays and tape libraries), and switches to form a data network. This network is connected through dedicated interconnects, creating a high-speed, dedicated, centrally managed, and secure storage system architecture.

[0003] Since a SAN generally includes several network elements such as servers, storage devices, and switches, when querying SAN data, it is usually necessary to obtain corresponding data from multiple network elements separately, resulting in low data query efficiency. Summary of the Invention

[0004] One purpose of the present disclosure is to provide a new technical solution for data query.

[0005] According to a first aspect of an embodiment of the present disclosure, a data query method is provided, the method comprising:

[0006] Receiving a query instruction for querying data of a storage area network (SAN); wherein the SAN includes a plurality of network element devices, and the network element devices include servers, fiber switches, and storage devices;

[0007] Retrieving, based on a query parameter in the query instruction, a target data entry corresponding to the query instruction from a first data set stored in a first memory; wherein the first memory is a volatile memory, and the first data set includes a plurality of candidate data entries, each of the candidate data entries being obtained by encoding original data entries of the network element device based on a preset encoding format, and different candidate data entries contain data of the same or different network element devices;

[0008] The target data entry is sent to a target device; wherein the target device includes a device for displaying the target data entry and / or a device for sending the query instruction.

[0009] Optionally, obtaining, based on the query parameters in the query instruction, a target data entry corresponding to the query instruction from a first data set stored in a first memory includes:

[0010] Encoding the query parameter according to the preset encoding format to obtain filtering code information;

[0011] The first data set is filtered according to the filtering code information, and one or more candidate data entries containing the filtering code information are used as the target data entries.

[0012] Optionally, the first data set is pre-generated in the following manner:

[0013] Collecting original data entries of multiple network element devices of the SAN;

[0014] Encoding the original data entries of the plurality of network element devices based on the preset encoding format to obtain a plurality of candidate data entries;

[0015] The plurality of candidate data entries are stored in the first memory to generate the first data set.

[0016] Optionally, encoding the original data entries of the plurality of network element devices based on the preset encoding format to obtain a plurality of candidate data entries includes:

[0017] For each of the original data entries, determine the filtering keyword corresponding to the original data entry based on the first network element device corresponding to the original data entry and other network element devices associated with the first network element device; generate candidate data entries that meet the requirements based on the original data entry and the filtering keyword corresponding to the original data entry.

[0018] Optionally, the method further includes:

[0019] The plurality of candidate data entries are stored in a second memory to obtain a second data set; wherein the second memory is a non-volatile memory, and the first data set and the second data set achieve data synchronization based on an event or periodic manner.

[0020] Optionally, both the candidate data entry and the original data include configuration data of the network element device; and the method further includes:

[0021] When the configuration data of the network element device is changed, updating the second data set according to the changed configuration data, and synchronizing the candidate data entries of the updated second data set to the first data set;

[0022] When the current time is a preset scheduled synchronization time, the candidate data entries of the second data set are synchronized to the first data set.

[0023] Optionally, synchronizing the candidate data entries of the second data set to the first data set includes at least one of the following:

[0024] If the configuration data of the network element device is in a steady state, synchronizing the candidate data entries of the second data set to the first data set; the steady state is used to indicate that the configuration data of the network element device is not in the process of being changed;

[0025] If the configuration data of the network element device is in a non-steady state, wait until the configuration data of the network element device enters a steady state, update the second data set according to the configuration data after entering the steady state, and synchronize the candidate data entries of the updated second data set to the first data set;

[0026] The network element device is prohibited from executing new configuration data changes. After determining that the configuration data of the network element device is in a steady state, the second data set is updated according to the configuration data of the network element device, and the candidate data entries of the updated second data set are synchronized to the first data set. After completing the synchronization of the first data set, the network element device is allowed to execute new configuration data changes.

[0027] According to a second aspect of an embodiment of the present disclosure, a data query device is provided, the device comprising:

[0028] A receiving module, configured to receive a query instruction for querying data in a storage area network (SAN); wherein the SAN includes a plurality of network element devices, including servers, fiber switches, and storage devices;

[0029] a processing module, configured to obtain, based on a query parameter in the query instruction, a target data entry corresponding to the query instruction from a first data set stored in a first memory; wherein the first memory is a volatile memory, the first data set includes a plurality of candidate data entries, the candidate data entries being obtained by encoding original data entries of the network element device based on a preset encoding format, and different candidate data entries containing data of the same or different network element devices;

[0030] A sending module is used to send the target data entry to a target device; wherein the target device includes a device for displaying the target data entry and / or a device for sending the query instruction.

[0031] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute a method as described in any one of the first aspects.

[0032] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0033] The disclosed embodiment provides a data query method, which includes: receiving a query instruction for querying storage area network (SAN) data; wherein the SAN includes multiple network element devices, including servers, fiber switches, and storage devices; obtaining a target data entry corresponding to the query instruction from a first data set stored in a first memory according to query parameters in the query instruction; wherein the first memory is a volatile memory, and the first data set includes multiple candidate data entries, which are obtained by encoding the original data entries of the network element device based on a preset encoding format, and different candidate data entries contain data of the same or different network element devices; sending the target data entry to a target device; wherein the target device includes a device for displaying the target data entry and / or a device for sending the query instruction. In this way, the target data entry corresponding to the query instruction can be quickly queried, thereby improving query efficiency, quickly responding to user query operations, and improving user experience and operation and maintenance efficiency.

[0034] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0036] Figure 1 It is a structural diagram of a storage system provided according to an embodiment of the present disclosure.

[0037] Figure 2 It is a flowchart of a data query method provided by an embodiment of the present disclosure.

[0038] Figure 3 It is a flowchart of a method for generating a first data set provided by an embodiment of the present disclosure.

[0039] Figure 4 It is a structural diagram of a data query device provided by an embodiment of the present disclosure.

[0040] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions, and numerical values ​​described in these embodiments do not limit the scope of the present disclosure. The following description of at least one exemplary embodiment is merely illustrative in nature and is not intended to limit the present disclosure, its application, or uses.

[0042] Figure 1 FIG. 1 is a schematic diagram of a storage system according to an embodiment of the present disclosure. Figure 1 As shown, the storage system 100 may include one or more of a storage area network SAN 150 , a network management device 160 , and a client 170 .

[0043] The SAN 150 may include multiple network element devices. For example, the SAN 150 may include a server 151, a switch 152, and a storage device 153. The server 151 may include a physical server and / or a virtual server. The server 151 is connected to the storage device 153 via the switch 152 and can quickly access data on the storage device 153. The server 151 may also be connected to the client 170 to receive and process client data requests or execute applications. The storage device 153 may include a disk array, a tape library, or other types of storage media, and may provide high-capacity, high-performance storage capabilities to meet the needs of enterprise-level data storage. The switch may provide high-speed data transmission capabilities. For example, the switch may be a fiber optic switch or other switch that supports high-speed data transmission. The above-mentioned servers, switches, and storage devices may be one or more.

[0044] The network management device 160 can be connected to the SAN and used to manage the network element devices of the SAN. For example, the network management device 160 can perform maintenance and management functions such as data configuration management, fault management, resource management, performance management, and security management on the network element devices of the SAN. There can be one or more network management devices, and each network management device can also be called a network management system (NMS).

[0045] The client 170 can be connected to a server of the SAN, can send data requests to the server, and receive data returned by the server. There can be one or more clients.

[0046] In some embodiments, the client 170 can also connect to the network management device 160 to send instructions to the network management device or receive management data to perform corresponding maintenance and management of the SAN. In one implementation, the client connected to the network management device 160 and the client connected to the server 151 can be the same client, which can facilitate client operations. In another implementation, the client connected to the network management device 160 and the client connected to the server 151 can be different clients. In other words, the same client is not allowed to connect to both the network management device and the server. In this way, management and business operations can be separated to improve the security of the storage system.

[0047] The disclosed embodiments can be applied to the data query scenario of the storage system. In the storage system, each network element of the SAN can be configured independently, and the relevant configuration data can be stored in a dispersed manner according to the network element type. For example, the data of the SAN can be distributed in multiple data tables, for example, they can be distributed in data tables such as the server information class table, the switch service class table, and the storage information class table. The association between the data tables can be associated through the globally unique identification number of the hardware (such as the World Wide Name, WWN). In order to query the data of the SAN, multiple steps can be performed according to the association between them, and queries and integration can be performed from multiple dispersedly stored data tables. Since multiple steps are required for the query, the query efficiency is low and the response speed is slow, which affects the user experience and operation and maintenance efficiency.

[0048] Figure 2 FIG. 1 is a flow chart of a data query method provided by an embodiment of the present disclosure. The method can be executed by the network management device in the above storage system. Figure 2 As shown, the data query method of this embodiment may include one or more of the following steps S210 to S230.

[0049] Step S210: receiving a query instruction for querying storage area network (SAN) data.

[0050] The SAN includes multiple network element devices, which include at least one server, at least one fiber optic switch and at least one storage device.

[0051] In some embodiments, the query instruction can be an instruction sent by the client to the network management device. For example, when the client needs to query SAN data based on user operations or scheduled tasks, the client can send the query instruction to the network management device, and the network management device can receive the query instruction.

[0052] In other embodiments, the network management device may receive the query command input by the user via an input component. The input component may include at least one of a keyboard, a mouse, a camera, and a microphone. For example, the network management device may receive the query command input by the user via a keyboard and / or a mouse. In another example, the network management device may capture user gestures via a camera and determine the query command based on the gestures. In another example, the network management device may capture user voice information via a microphone and determine the query command based on the voice information. This improves user convenience.

[0053] Step S220 : acquiring target data entries corresponding to the query instruction from a first data set stored in a first memory according to the query parameters in the query instruction.

[0054] In some embodiments, the first memory storing the first data set may be a volatile memory. For example, the first memory may be a volatile memory that supports fast read and write operations, such as a random access memory (RAM) or cache memory. Thus, by storing the first data set in a volatile memory that supports fast read and write operations, data query efficiency can be improved and data query response time can be reduced. Alternatively, the first data set may be a data structure stored in the RAM memory of the network management device.

[0055] In some embodiments, the first data set may include multiple candidate data entries, which may be obtained by encoding original data entries of the network element device based on a preset encoding format, and different candidate data entries may contain data of the same or different network element devices.

[0056] In one implementation, the multiple candidate data entries in the first data set may include the original data entries of all network element devices of the SAN. For example, the configuration data, performance data, maintenance data, etc. of all network element devices of the SAN can all be used as data content in the candidate data entries in the first data set, that is, the data content in each candidate data entry can be specific information of a network element device corresponding to the SAN, and the specific information can be configuration parameters in the configuration data, performance indicators in the performance data, or maintenance information in the maintenance data, etc.

[0057] In one implementation, to achieve network element device association, each candidate data entry may further include a filtering keyword. Using the filtering keyword and query parameters, the target data entry corresponding to the query instruction can be filtered from the first data set. The filtering keyword may include the device identifier of the first network element device (e.g., a server, switch, or storage device) to which the data entry corresponds, as well as the device identifiers of other network element devices associated with the first network element device.

[0058] Furthermore, the filtering keyword may also include a filtering identifier obtained by encoding all or part of the original data entry, such as the configuration time of the original data entry, the geographical location of the network element device, hardware configuration, storage capacity, link identifier, service identifier, etc.

[0059] Optionally, the above-mentioned query instruction may include query parameters, which may include at least one of parameters such as device identification, time range, geographical range, storage capacity range, etc. The query parameters can be used to filter and screen multiple candidate data entries in the first data set to obtain one or more target data entries.

[0060] In some embodiments, the above-mentioned preset coding format can be used to characterize that the content of each candidate data entry includes a filter keyword and data content, and the data content may include the content in the original data entry, such as the configuration information of the server, the configuration information of the switch, or the configuration information of the storage device; the filter keyword can be used to filter the target data entry that matches the query from the first data set. Furthermore, the preset coding format can also be used to characterize the content and coding form included in the filter keyword. For example, the preset coding format can characterize that the filter keyword includes one or more network element device identifiers, and each network element device identifier can occupy N bits, where N is a pre-set positive integer. The number of bits occupied by the filter keyword can be determined based on the maximum number of network element devices in the SAN. Through this preset coding format, the integrity and comprehensiveness of the data can be ensured, and a basis for efficient query is provided.

[0061] In some embodiments, an implementation of step S220 may include encoding the query parameter according to a preset encoding format to obtain filter code information, filtering the first data set according to the filter code information, and selecting one or more candidate data entries containing the filter code information as target data entries. For example, one or more candidate data entries containing the filter code information in the filtering keyword may be selected as target data entries.

[0062] In this way, target data items can be obtained by filtering the first data set based on the query parameters, thereby improving data query efficiency.

[0063] Step S230: Send the target data entry to the target device.

[0064] The target device includes a device for displaying target data items and / or a device for sending query instructions.

[0065] In some embodiments, if the above-mentioned query instruction is an instruction sent by the client to the network management device, the target device may be the client that sends the query instruction, and the network management device may send the target data entry to the client so that the client can display the target data entry to the user as needed.

[0066] In other embodiments, if the query command is input by a user via an input component of a network management device, the target device may include a device for displaying the target data item, such as a display screen of the network management device. In this way, the network management device can display the retrieved target data item to the user via the display screen. Furthermore, the network management device can also play relevant information related to the retrieved target data item, such as the number of retrieved target data items, to the user via an audio output device such as a speaker.

[0067] Thus, using Figure 2 The method shown, based on the first data set pre-generated and stored in the first memory, can quickly query and obtain the target data entries corresponding to the query instructions. In typical scenarios (for example, a network scale of 500,000 optical fiber ports), the query results can be fed back in seconds. Compared with the query result feedback in minutes in related technologies, the data query efficiency has been greatly improved, and the user's query operations can be responded to quickly, thereby improving the user experience and operation and maintenance efficiency.

[0068] Figure 3 This is a flow chart of a method for generating a first data set provided by an embodiment of the present disclosure. The method can be executed by the network management device in the above storage system, for example, the method can be executed in Figure 2 The data query method shown is executed before to pre-generate the first data set. Figure 3 As shown, the method for generating the first data set in this embodiment may include one or more of the following steps S310 to S340.

[0069] Step S310: collecting original data entries of multiple network element devices of the SAN.

[0070] In some embodiments, the original data entry may be distributedly stored data, for example, distributedly stored on various network element devices, with each network element device only storing its own original data entry.

[0071] In some embodiments, the original data entry may include configuration information of the network element device. In this way, the configuration information of each network element device of the SAN can be obtained, and the candidate data entries in the first data set can be generated based on the configuration information.

[0072] Step S320 : Encode the original data entries of the plurality of network element devices based on a preset encoding format to obtain a plurality of candidate data entries.

[0073] In some embodiments, for each original data entry, the filtering keyword corresponding to the original data entry can be determined based on the first network element device corresponding to the original data entry and other network element devices associated with the first network element device; and a candidate data entry can be generated based on the original data entry and the filtering keyword corresponding to the original data entry.

[0074] It should be noted that the first network element device corresponding to the original data entry may be the network element device configured by the original data entry, that is, the network element device that generated the original data entry. For example, if an original data entry contains configuration information of a server and is also generated by the configuration of the server, the first network element device corresponding to the original data entry may be the first server.

[0075] The candidate data entries generated in the above manner include filtering keywords and data content. The data content may be the original data entry, and the filtering keywords may include the device identifier of the first network element device corresponding to the original data entry, as well as the device identifiers of other network element devices associated with the first network element device. The device identifiers of the network element devices may be uniformly numbered. In one or more SANs connected to the network management device, different network element devices correspond to different device identifiers, and any network element device can be identified based on the device identifier. For example, if a SAN includes two servers, the device identifiers of the two servers may be different.

[0076] Furthermore, the filtering keyword may also include a filtering identifier obtained by encoding all or part of the content of the original data entry, such as the configuration time of the original data entry, the geographical location of the network element device, the hardware configuration, the storage capacity, the link identifier, the service identifier, etc. For example, if the original data entry includes the storage capacity of a storage device, the storage capacity may be encoded to obtain a storage capacity identifier. The filtering keyword may include the device identifier and the storage capacity identifier. In this way, SAN data may be queried based on storage capacity. For example, relevant configuration data of all storage devices with storage capacity greater than or equal to a specific value, as well as relevant configuration data of switches and servers associated with (e.g., connected to) the storage device, may be queried.

[0077] Step S330: Store the plurality of candidate data entries in a first memory to generate a first data set.

[0078] The first memory may be a volatile memory, and the first data set may be a data structure stored in the volatile memory, for example, a data structure stored in the form of a database or a data list.

[0079] Step S340: Store the plurality of candidate data entries in a second memory to obtain a second data set.

[0080] The second memory is a non-volatile memory, which may include a disk array, etc. For example, the second memory may be a disk array of a network management device, and the first memory may be a RAM of the network management device.

[0081] In some embodiments, the second memory may be multiple. For example, the second data set may be stored in a primary memory and a backup memory. Both the primary memory and the backup memory may be non-volatile memories. The second data set in the primary memory is used first. If the primary memory fails, the second data set in the backup memory is used. This allows for backup of the second data set and improves data reliability. Furthermore, the second data set may be stored on a cloud server to further improve data reliability.

[0082] It should be noted that the above steps S330 and S340 can be executed in parallel or sequentially, and the order is not limited. For example, step S330 can be executed first, and then when step S340 is executed, the first data set stored in the first memory can be copied or transferred to the second memory to obtain the second data set. For another example, step S340 can be executed first, and then when step S330 is executed, the second data set stored in the second memory can be copied or transferred to the first memory to obtain the first data set.

[0083] Thus, using Figure 3 The method shown can generate a first data set based on original data entries of multiple network element devices and store it in a first memory, so as to quickly query target data entries based on the first data set, thereby improving query efficiency.

[0084] In some embodiments, the first data set and the second data set may be synchronized based on an event or periodic manner.

[0085] For example, synchronization of the first data set and the second data set may be achieved by at least one of the following methods:

[0086] Method 1: When the configuration data of the network element device is changed, the second data set is updated according to the changed configuration data, and the candidate data entries of the updated second data set are synchronized to the first data set.

[0087] Optionally, based on this first method, the candidate data entries that have changed in the second data set can be determined based on the configuration data of the network element device that has changed, and only the candidate data entries that have changed in the second data set can be synchronized to the first data set. In this way, full data synchronization is not required, which can improve the efficiency of data synchronization. The candidate data entries can be synchronized by copying and replacing. For example, the candidate data entries that have changed in the second data set can be copied to the first data set and replace the corresponding candidate data entries; for another example, all the candidate data entries in the second data set can be copied to the first data set and replace all the candidate data entries in the first data set.

[0088] Method 2: When the current time is a preset scheduled synchronization time, the candidate data entries of the second data set are synchronized to the first data set.

[0089] The current time is the current time of the network management device, and the pre-set scheduled synchronization time may be a user-set or system-default scheduled synchronization time, such as a specific time of each hour, each day, each week, or each month. For example, if the scheduled synchronization time is 3:00 a.m. every day, when the current time of the network management device is 3:00 a.m., scheduled synchronization may be performed to synchronize the candidate data entries of the second data set to the first data set.

[0090] In one implementation, based on the second approach, full data synchronization may be performed to synchronize all candidate data entries in the second data set to the first data set, so as to ensure the accuracy of the first data set.

[0091] In another implementation, the candidate data entries in the second data set and the first data set may be compared to determine whether they are identical. For different candidate data entries, the candidate data entries in the second data set may be updated to the first data set. This may improve the efficiency of data synchronization.

[0092] In the second approach, the specific approach of synchronizing the candidate data entries of the second data set to the first data set may also include at least one of the following implementations:

[0093] In one implementation, if the configuration data of the network element device is in a steady state, the candidate data entries of the second data set are synchronized to the first data set; the steady state can be used to indicate that the configuration data of the network element device is not in the process of being changed.

[0094] In another implementation, if the configuration data of a network element device is in a non-stable state, the system waits until the configuration data of the network element device enters a stable state, then updates the second data set based on the stable configuration data, and synchronizes the candidate data entries of the updated second data set with the first data set. This prevents data anomalies in the synchronized first data set caused by the non-stable configuration data. Furthermore, while waiting for the configuration data of the network element device to enter a stable state, the network device can be prohibited from executing new configuration data changes. In this way, the network element device only needs to complete the currently executing configuration data change before entering a stable state, reducing the waiting time for data synchronization.

[0095] In another implementation, when the current time is a pre-set scheduled synchronization time, the network element device may be prohibited from executing new configuration data changes. After determining that the configuration data of the network element device is in a steady state, the second data set is updated according to the configuration data of the network element device, and the candidate data entries of the updated second data set are synchronized to the first data set. After completing the synchronization of the first data set, the network element device is allowed to execute new configuration data changes.

[0096] For example, the network management device may implement timed data synchronization based on the following steps:

[0097] First, when the current time is a preset scheduled synchronization time, the network management device sends a data synchronization indication message to each network element device of the SAN.

[0098] This data synchronization indication message can be used to instruct a network element device to prohibit executing new configuration data changes. After receiving this data synchronization indication message, each network element device can send a data synchronization response message to the network management device after its configuration data is in a steady state or after completing a current configuration data change and entering a steady state. Furthermore, after receiving this data synchronization indication message, the network element device can prohibit executing new configuration data changes.

[0099] Secondly, after receiving the data synchronization response messages sent by all network element devices, the network management device updates the second data set according to the configuration data of each network element device, and synchronizes the candidate data entries of the updated second data set to the first data set.

[0100] Finally, after completing the synchronization of the first data set, the network management device sends a data synchronization completion message to each network element device of the SAN.

[0101] The data synchronization completion message can be used to indicate that the network element device can execute the new configuration data change. In this way, the network element device can start executing the new configuration data change after receiving the data synchronization completion message.

[0102] In this way, it is possible to avoid the configuration data being in an unsteady state during the scheduled synchronization, which may result in abnormal data in the synchronized first data set, thereby improving the accuracy of the first data set.

[0103] In some embodiments, after receiving a data synchronization indication message, the network element device prohibits executing new configuration data changes. Instead, the network element device can cache received configuration data change commands in chronological order. Upon receiving a data synchronization completion message, the network element device can execute the cached configuration data change commands in chronological order. This can avoid the problem of configuration data change command execution failure during scheduled synchronization.

[0104] In other embodiments, after receiving a data synchronization indication message and sending a data synchronization response message, the network element device may start a timer. If the timer reaches a preset time duration and still does not receive a data synchronization completion message, the execution of new configuration data changes may no longer be prohibited. The preset time duration may be any pre-configured time duration, such as 1 minute, 5 minutes, or 10 minutes.

[0105] This can avoid the problem of configuration data changes being unable to execute for a long time, especially when the data synchronization completion message is lost, and can improve the reliability of the SAN configuration.

[0106] Figure 4 This is a structural diagram of a data query device provided by an embodiment of the present disclosure. Figure 4 As shown, the device may include:

[0107] The receiving module 401 is configured to receive a query instruction for querying data of a storage area network (SAN); wherein the SAN includes a plurality of network element devices, including servers, fiber switches, and storage devices;

[0108] A processing module 402 is configured to obtain, based on query parameters in the query instruction, a target data entry corresponding to the query instruction from a first data set stored in a first memory; wherein the first memory is a volatile memory, and the first data set includes a plurality of candidate data entries, each of which is obtained by encoding original data entries of the network element device based on a preset encoding format, and different candidate data entries include data of the same or different network element devices;

[0109] The sending module 403 is configured to send the target data entry to a target device; wherein the target device includes a device for displaying the target data entry and / or a device for sending the query instruction.

[0110] Optionally, the processing module 402 is configured to encode the query parameter according to the preset encoding format to obtain filter code information; filter the first data set according to the filter code information, and use one or more candidate data entries containing the filter code information as the target data entries.

[0111] Optionally, the data query device further includes:

[0112] The generation module 404 is also used to collect original data entries of multiple network element devices of the SAN; encode the original data entries of the multiple network element devices based on the preset encoding format to obtain multiple candidate data entries; store the multiple candidate data entries in the first memory to generate the first data set.

[0113] Optionally, the generation module 404 is used to determine, for each of the original data entries, a filtering keyword corresponding to the original data entry based on the first network element device corresponding to the original data entry and other network element devices associated with the first network element device; and generate a candidate data entry that meets the requirements based on the original data entry and the filtering keyword corresponding to the original data entry.

[0114] Optionally, the generation module 404 is further used to store the multiple candidate data entries in a second memory to obtain a second data set; wherein, the second memory is a non-volatile memory, and the first data set and the second data set achieve data synchronization based on events or cycles.

[0115] Optionally, both the candidate data entry and the original data include configuration data of the network element device; and the data query device further includes:

[0116] The synchronization module 405 is also used to update the second data set according to the changed configuration data when the configuration data of the network element device changes, and synchronize the candidate data entries of the updated second data set to the first data set; when the current time is a pre-set scheduled synchronization time, synchronize the candidate data entries of the second data set to the first data set.

[0117] Optionally, the synchronization module 405 is also used to synchronize the candidate data entries of the second data set to the first data set if the configuration data of the network element device is in a steady state; the steady state is used to characterize that the configuration data of the network element device is not in the process of changing; if the configuration data of the network element device is in a non-steady state, then wait for the configuration data of the network element device to enter a steady state, update the second data set according to the configuration data after entering the steady state, and synchronize the candidate data entries of the updated second data set to the first data set; prohibit the network element device from executing new configuration data changes, and after determining that the configuration data of the network element device is in a steady state, update the second data set according to the configuration data of the network element device, and synchronize the candidate data entries of the updated second data set to the first data set; after completing the synchronization of the first data set, allow the network element device to execute new configuration data changes.

[0118] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0119] Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 As shown, the electronic device 900 may include a memory 910 and a processor 920. The memory 910 may be used to store computer instructions, and the processor 920 may be used to call computer instructions from the memory 910 to execute any of the methods in the aforementioned embodiments of the present disclosure. It should be noted that the processor 920 may include one or more processors to execute instructions, and the memory 910 may also include one or more memories to store computer instructions. In some embodiments, the electronic device may be Figure 1 A network management device or other device in the illustrated embodiment.

[0120] In some embodiments, the processor 920 can be used to control the overall operation of the electronic device 900. For example, the processor 920 can execute instructions to implement all or part of the steps of the method in any of the foregoing embodiments of the present disclosure, thereby realizing one or more operations such as voice communication, data communication, database operation, display control, component control, multimedia processing, etc., wherein the above-mentioned components may include sensors, cameras, headphones, input and output devices, etc., and the component may be an internal component of the electronic device itself, or an external component connected to the electronic device wirelessly or wired. The above-mentioned multimedia may include one or more of voice, image, video, and text.

[0121] In some embodiments, the memory 910 may include one or more memories, and the contents stored in different memories may be the same or different. The memory 910 may be configured to store various types of data to support operations on the electronic device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 910 may be implemented by any type of temporary or non-temporary storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0122] In some embodiments, the memory 910 may include a first memory, which is a volatile memory and can be used to store the first data set in the aforementioned embodiments of the present disclosure. Furthermore, the memory may also include a second memory, which is a non-volatile memory and can be used to store the second data set in the aforementioned embodiments of the present disclosure.

[0123] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements any of the methods described in the foregoing embodiments of the present disclosure. Optionally, the computer-readable storage medium may be a non-transitory storage medium, but is not limited thereto and may also be a transient storage medium.

[0124] An embodiment of the present disclosure further provides a computer program product, which may include a computer program. When the computer program is executed by a processor, any method in the aforementioned embodiments of the present disclosure may be implemented.

[0125] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement any of the methods in the aforementioned embodiments of the present disclosure.

[0126] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0127] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0128] The computer program instructions for performing the operation of the present disclosure can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, which can include object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions can be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0129] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0130] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0131] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0132] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions. It should be noted that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.

[0133] Technologies, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment may be considered part of the specification.

[0134] It should be noted that like reference numerals and letters denote like items in the drawings of the embodiments of the present disclosure, and thus, once an item is defined in one drawing, it may not need to be further discussed in subsequent drawings.

[0135] Although operations or steps are described in a particular order in the drawings in the embodiments of the present disclosure, this should not be understood as requiring that these operations or steps be performed in the particular order shown or in a serial order, or that all of the operations or steps shown be performed to obtain a desired result. In the embodiments of the present disclosure, these operations or steps may be performed serially; these operations or steps may also be performed in parallel; or some of these operations or steps may be performed.

[0136] In the description of the embodiments of the present disclosure, unless otherwise specified, prefixes such as "first" and "second" are only used to distinguish different description objects and do not constitute any restrictions on the position, order, priority, quantity or content of the description objects. For the statement of the description objects, please refer to the description in the context of the claims or embodiments, and no unnecessary restrictions should be constituted due to the use of prefixes.

[0137] In the description of the embodiments of the present disclosure, unless otherwise specified, "multiple" refers to two or more than two, and other quantifiers are similar thereto; "at least one item(s)", "one item(s) or multiple items(s)" or similar expressions refer to any combination of these items(s), including any combination of single items(s) or plural items(s). For example, at least one a can represent any number of a; for another example, one or more items of a, b and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple; "and / or" is a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " indicates that the related objects before and after are in an "or" relationship.

[0138] In the description of the embodiments of the present disclosure, unless otherwise specified, elements expressed in the singular may be understood as singular or plural. For example, "a," "an," "the," "above," "said," "the," etc. may mean "one and only one," "one or more," "at least one," etc.

[0139] In the description of the embodiments of the present disclosure, unless otherwise specified, terms such as "greater than", "greater than or equal to", "not less than", "more than", "more than or equal to", "not less than", "higher than", "higher than or equal to", "not less than", and "above" may be replaced with each other, and terms such as "less than", "less than or equal to", "not greater than", "less than", "less than or equal to", "not more than", "lower than", "lower than or equal to", "not higher than", and "below" may be replaced with each other.

[0140] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used herein are chosen to best explain the principles of the embodiments, practical applications, or technical improvements to technologies in the marketplace, or to enable other persons skilled in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A data query method, characterized in that: The method comprises: Receiving a query instruction for querying storage area network SAN data; wherein the SAN includes a plurality of network element devices, and the network element devices include a server, a fiber optic switch and a storage device; According to the query parameter in the query instruction, a target data entry corresponding to the query instruction is obtained from a first data set stored in a first memory; wherein the first memory is a volatile memory, the first data set includes a plurality of candidate data entries, the candidate data entries are obtained by encoding the original data entries of the network element device based on a preset encoding format, and different candidate data entries contain data of the same or different network element devices; The target data entry is sent to a target device; wherein the target device includes a device for displaying the target data entry and / or a device for sending the query instruction.

2. The method according to claim 1, characterized in that The acquiring, according to the query parameter in the query instruction, a target data entry corresponding to the query instruction from a first data set stored in a first memory includes: Encoding the query parameter according to the preset encoding format to obtain filtering code information; The first data set is filtered according to the filtering code information, and one or more candidate data items containing the filtering code information are used as the target data items.

3. The method according to claim 1, characterized in that The first data set is pre-generated in the following manner: Collecting original data entries of multiple network element devices of the SAN; Encoding the original data entries of the plurality of network element devices based on the preset encoding format to obtain a plurality of candidate data entries; The plurality of candidate data entries are stored in the first memory to generate the first data set.

4. The method according to claim 3, characterized in that The encoding of the original data entries of the plurality of network element devices based on the preset encoding format to obtain a plurality of candidate data entries includes: For each of the original data entries, determine the filtering keyword corresponding to the original data entry based on the first network element device corresponding to the original data entry and other network element devices associated with the first network element device; generate candidate data entries that meet the requirements based on the original data entry and the filtering keyword corresponding to the original data entry.

5. The method according to claim 3, characterized in that: The method further comprises: The multiple candidate data entries are stored in a second memory to obtain a second data set; wherein the second memory is a non-volatile memory, and the first data set and the second data set achieve data synchronization based on an event or periodic manner.

6. The method according to claim 5, characterized in that The candidate data entry and the original data both include configuration data of the network element device; the method further includes: When the configuration data of the network element device is changed, updating the second data set according to the changed configuration data, and synchronizing the candidate data entries of the updated second data set to the first data set; When the current time is a preset scheduled synchronization time, the candidate data entries of the second data set are synchronized to the first data set.

7. The method according to claim 6, characterized in that The step of synchronizing the candidate data entries of the second data set to the first data set includes at least one of the following: If the configuration data of the network element device is in a steady state, synchronizing the candidate data entries of the second data set to the first data set; the steady state is used to indicate that the configuration data of the network element device is not in the process of being changed; If the configuration data of the network element device is in a non-steady state, wait until the configuration data of the network element device enters a steady state, update the second data set according to the configuration data after entering the steady state, and synchronize the candidate data entries of the updated second data set to the first data set; The network element device is prohibited from executing new configuration data changes. After determining that the configuration data of the network element device is in a steady state, the second data set is updated according to the configuration data of the network element device, and the candidate data entries of the updated second data set are synchronized to the first data set. After completing the synchronization of the first data set, the network element device is allowed to execute new configuration data changes.

8. A data query device, characterized in that: The device comprises: A receiving module, used to receive a query instruction for querying storage area network SAN data; wherein the SAN includes a plurality of network element devices, and the network element devices include a server, a fiber optic switch and a storage device; A processing module, configured to obtain, according to a query parameter in the query instruction, a target data entry corresponding to the query instruction from a first data set stored in a first memory; wherein the first memory is a volatile memory, the first data set includes a plurality of candidate data entries, the candidate data entries are obtained by encoding the original data entries of the network element device based on a preset encoding format, and different candidate data entries contain data of the same or different network element devices; A sending module is used to send the target data entry to a target device; wherein the target device includes a device for displaying the target data entry and / or a device for sending the query instruction.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute the data query method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the computer program implements the data query method according to any one of claims 1 to 7.