Array card configuration data maintenance method, terminal and storage medium
The allocation of storage areas and tasks through the status identification management protocol solves the problem of extended waiting time for data management tasks under high load by disk array cards, and improves data processing efficiency and response speed.
Patent Information
- Application Number
- CN202411336175.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-27
Smart Images

Figure CN119200995A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of servers, and in particular relates to an array card configuration data maintenance method, a terminal and a storage medium. Background Art
[0002] Disk array cards, as the core control and management components of server hardware arrays, are of great importance. In order to promote seamless docking and rapid switching of array card products from different manufacturers, SNIA (Storage Network Industry Association) introduced DDF (Device Descriptor File), a standardized user configuration data structure. DDF not only standardizes the organizational logic and storage format of RAID configuration data, but also ensures that all key configuration information can be safely embedded in each disk in the array in a unified manner.
[0003] With the evolution of technology and the increasing functional requirements, the complexity of the tasks carried by disk array cards has increased significantly, accompanied by the natural growth of the number of running threads and the increasing complexity of the structure and content of DDF data itself. In this context, multiple concurrent threads frequently read and write DDF data, especially when modifying different fields, how to ensure the integrity and consistency of data has become an urgent problem to be solved.
[0004] To this end, the industry generally adopts an efficient data management mechanism, that is, to set up a dedicated configuration management task (CM for short). As the only authoritative channel for DDF data write operations, CM is responsible for centrally processing all DDF modification or read requests from other tasks. These requests are transmitted to CM through efficient communication mechanisms such as message queues, which centrally schedule and execute them, thus effectively avoiding data conflicts and inconsistencies.
[0005] In addition, to further enhance data security, CM also introduces a lock mechanism when modifying DDF copies to ensure that only one operation can access and modify data at any one time, thereby greatly reducing the risk of data corruption.
[0006] However, it is worth noting that when the system load is heavy and the number of tasks surges, this centralized processing method may lead to longer task waiting time and affect the overall performance. Therefore, in actual applications, the system architecture needs to be optimized according to specific scenarios, such as introducing more efficient concurrent processing strategies, optimizing lock mechanisms to reduce lock competition, etc., to balance the needs between data security and system performance. Summary of the invention
[0007] In view of the above-mentioned deficiencies in the prior art, the present invention provides an array card configuration data maintenance method, terminal and storage medium to solve the above-mentioned technical problems.
[0008] In a first aspect, the present invention provides an array card configuration data maintenance method, comprising: Setting a management protocol for the status identifier and maintaining a matching status identifier for the replica data of the configuration data based on the management protocol; Allocate valid replica data to the configuration data management task based on the state identifier of the replica data; The configuration data management task is performed based on the allocated replica data.
[0009] In an optional implementation, the status identifier includes: Modify the flag, exclusive flag, shared flag, and invalid flag.
[0010] In an optional embodiment, the management protocol includes: Update the status mark of the latest modified version of the copy data that is inconsistent with the solidified data in the disk to the modification mark; Update the status flag of the replica data that is consistent with the solidified data in the disk and is bound to only one task to an exclusive flag; Update the status identifier of the replica data that is consistent with the solidified data in the disk and bound to multiple tasks to a shared identifier; The status flag of the replica data bound to the completed task is updated to an invalid flag.
[0011] In an optional implementation, allocating valid replica data to the configuration data management task based on the state identifier of the replica data includes: receiving a configuration data management task, and applying for a storage area for the configuration data management task in a non-volatile memory; Traverse the copy data in the non-volatile memory to determine whether there is copy data in the non-volatile memory whose status identifier is a non-invalid identifier: If so, copy the duplicate data with the status marked as an exclusive mark or a shared mark into the storage area; If not, the configuration data solidified in the disk is copied to the storage area.
[0012] In an optional implementation, receiving a configuration data management task and applying for a storage area for the configuration data management task in a non-volatile memory includes: Determine whether the size of the free storage area of the non-volatile memory exceeds the size of the requested storage area: If yes, directly allocating a storage area for the configuration data management task from a free storage area; If not, the copy data with the invalidation mark stored in the non-volatile memory is cleared, and a storage area is allocated to the configuration data management task from the released free storage area.
[0013] In an optional implementation, before copying the replica data with a status identified as an exclusive identifier or a shared identifier into the storage area, the method further includes: Determine whether there is copy data with a status mark of a modification mark in the non-volatile memory, and if there is copy data with a modification mark, enter a waiting state and cyclically obtain the update status of the status mark of the copy data in the non-volatile memory; Based on the update status of the status identifier, it is confirmed that there is no copy data with a modification identifier in the non-volatile memory, and the copy data with a status identifier of an exclusive identifier or a shared identifier is copied into the storage area.
[0014] In an optional implementation, performing the configuration data management task based on the allocated replica data includes: If the configuration data management task is an access task, the copy data in the storage area is fed back to the initiating component of the configuration data management task, and the completion of the configuration data management task is recorded in the firmware log; If the configuration data management task is a modification task, the copy data in the storage area is updated based on the target data of the configuration data management task, and the updated copy data is solidified to the corresponding disk.
[0015] In an optional implementation, updating the copy data in the storage area based on the target data of the configuration data management task, and solidifying the updated copy data to the corresponding disk, includes: While updating the replica data, the status flag of the new replica data is changed to a modification flag; Synchronously refreshing the timer, and checking whether the status identifier of the new copy data is a modification identifier when the timer reaches a preset time threshold; If the status mark of the new copy data is a modification mark, the new copy data is solidified to the corresponding disk; If the status identifier of the new copy data is not a modification identifier, a prompt message indicating that the modification was unsuccessful is generated; The completion of the configuration data management task is recorded in the firmware log.
[0016] In a second aspect, the present invention provides an array card configuration data maintenance system, comprising: An identification setting module, used for setting a management protocol for a state identification, and maintaining a matching state identification for the copy data of the configuration data based on the management protocol; A data management module, used for allocating valid replica data to the configuration data management task based on the state identifier of the replica data; The task execution module is used to execute the configuration data management task based on the allocated replica data.
[0017] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0018] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0019] The beneficial effect of the present invention is that the array card configuration data maintenance method, terminal and storage medium provided by the present invention improve the efficiency of configuration data modification and reading by maintaining the status identification of multiple task data copies, while ensuring the legitimacy and validity of the configuration data copies held by different tasks, reduce the queuing waiting time caused by multiple tasks for configuration data operations, and improve the response execution speed of specific array card services.
[0020] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0023] Figure 2 It is a schematic flow chart of the change of the state identification when reading the configuration data of the method according to an embodiment of the present invention.
[0024] Figure 3 The present invention is a schematic flow chart of a state identification change when modifying configuration data according to a method of an embodiment of the present invention.
[0025] Figure 4 It is a schematic flow chart of configuration data change of a method according to an embodiment of the present invention.
[0026] Figure 5 is a schematic block diagram of a system according to an embodiment of the present invention.
[0027] Figure 6 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0030] The key terms appearing in the present invention are explained below.
[0031] RAID: Redundant Arrays of Independent Disks, which means "several independent disks form an array with redundancy". By placing data on multiple hard disks, input and output operations can be overlapped in a balanced manner, thereby achieving the purpose of improving performance and increasing the data fault tolerance of the entire system.
[0032] DDF: is the abbreviation of Disk Data Format, which is a standardized configuration data structure specification for RAID technology, making the implementation of RAID technology more unified and efficient. DDF defines a unified data structure to make products from different RAID technology suppliers compatible and collaborative. Due to the use of a unified data format, users can more conveniently migrate data when replacing RAID controllers or upgrading hardware, reducing the risk of data loss.
[0033] VD: Virtual Disk, which means "virtual disk". A virtual disk is an object provided to the host for user data storage. At least one physical disk is associated with a virtual disk.
[0034] DG: Abbreviation for Disk Grouping, which is a disk group composed of multiple physical disks. Its main feature is that all VDs created on this group cannot be extended to other physical disks that do not belong to this disk group. Disk grouping can ensure that the continuous address space of the disk group will not be extended outside the disk group.
[0035] NVM: is the abbreviation of Non-Volatile Memory.
[0036] The array card configuration data maintenance method provided by the embodiment of the present invention is executed by a computer device, and accordingly, the array card configuration data maintenance system runs in the computer device.
[0037] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be an array card configuration data maintenance system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0038] like Figure 1 As shown, the method [1] comprises: Step 110: Setting a management protocol for the status identifier, and maintaining a matching status identifier for the replica data of the configuration data based on the management protocol.
[0039] This protocol specifies in detail how to generate, update, and maintain a matching status identifier for each replica of the configuration data. The status identifier usually contains key metadata such as the creation time, last modification time, version information, and synchronization status (such as synchronized, pending synchronization, and synchronizing). Through these status identifiers, the system can clearly identify the current status of each replica, providing an accurate basis for subsequent management operations.
[0040] Step 120: Allocate valid replica data to the configuration data management task based on the status identifier of the replica data.
[0041] First, according to the specific requirements of the management task (such as reading, modifying, verifying, etc.) and the status mark of the replica data, select the valid replicas that meet the task requirements. For example, for tasks that need to read the latest configuration data, the replicas with the latest version marked as "synchronized" in the status mark are preferred; for tasks that need to modify configuration data, it is ensured that the selected replica is in a writable state and is not locked by other tasks.
[0042] Step 130: Execute the configuration data management task based on the allocated replica data.
[0043] Execute the corresponding management tasks according to the valid replica data assigned in the previous step. During the task execution, strictly abide by the management protocol to ensure that the operation of the replica data meets both business needs and data consistency and security requirements. For example, when executing a modification task, update the status mark of the replica after the modification is completed, and trigger the necessary synchronization mechanism to ensure that all related replicas can be updated in time. At the same time, record the detailed log of task execution for subsequent problem tracking and auditing.
[0044] To facilitate understanding of the present invention, the array card configuration data maintenance method provided by the present invention is further described below based on the principle of the array card configuration data maintenance method of the present invention and the process of maintaining the array card configuration data in the embodiment.
[0045] Specifically, the array card configuration data maintenance method includes: S1. Setting a management protocol for a status identifier, and maintaining a matching status identifier for a copy of the configuration data based on the management protocol.
[0046] The status flags include: modification flag, exclusive flag, shared flag and invalid flag.
[0047] Modify the logo: Definition: This flag indicates that the copy data is the latest modified version and is inconsistent with the solidified data on the disk.
[0048] Purpose: Prompt the system to note that the data has been modified and needs to be synchronized with the data on the disk as soon as possible to maintain data consistency.
[0049] Exclusive logo: Definition: This flag indicates that the replica data is not only consistent with the hardened data on the disk, but is also currently used exclusively by one task.
[0050] Purpose: To ensure that the data will not be accessed or modified by other tasks during task execution, thus ensuring the integrity and consistency of data processing.
[0051] Shared Identity: Definition: This flag indicates that the replica data is consistent with the hardened data on the disk and can be accessed and used by multiple tasks at the same time.
[0052] Purpose: Support efficient sharing of data, reduce unnecessary data duplication, and optimize the use of system resources.
[0053] Failure indicator: Definition: When a task is completed and the replica data bound to it is no longer needed, it is marked as invalid.
[0054] Purpose: Clean up data that is no longer needed, free up system resources, and prevent invalid data from occupying storage space.
[0055] The management protocol includes: updating the status identifier of the latest modified version of the replica data that is inconsistent with the solidified data in the disk to a modified identifier; updating the status identifier of the replica data that is consistent with the solidified data in the disk and is bound to only one task to an exclusive identifier; updating the status identifier of the replica data that is consistent with the solidified data in the disk and is bound to multiple tasks to a shared identifier; and updating the status identifier of the replica data bound to a completed task to an invalid identifier.
[0056] Status update strategy: Real-time update: For any operation that may cause a change in data status (such as data modification, task binding or unbinding), the system should immediately evaluate and update the status identifier of the relevant data.
[0057] Periodic checks: Even in the absence of explicit action triggers, the system should periodically check status to ensure the accuracy of all status identifiers.
[0058] Data synchronization protocol: When replica data with modification marks is detected, the system should start the data synchronization mechanism and write the latest version of the data back to the disk to ensure data consistency and reliability.
[0059] Task and data binding management: The system should maintain a binding relationship table between tasks and data copies so that the data can be bound at the beginning of the task, unbound at the end of the task, and the shared or exclusive status of the data can be updated accordingly.
[0060] When the task is completed, the system should automatically update the bound replica data status to invalid and trigger the cleanup mechanism to release resources.
[0061] Error handling and recovery: The management protocol should include an error handling mechanism to deal with abnormal situations such as status update failure and data synchronization conflicts.
[0062] When an error occurs, the system should be able to roll back to the last stable state and record error information for subsequent analysis and resolution.
[0063] Specifically, an independent data copy is provided for each task that needs to modify or access DDF data. Since the copy data will not be modified by other tasks, all operations on the DDF data do not require locking protection. At the same time, a corresponding status identifier is added to each DDF data copy and a set of data copy status identifier management protocols are agreed upon to ensure the consistency and accuracy of user configuration data in the entire system.
[0064] The data replica state transition protocol is mainly identified by the synchronization state field; the synchronization state includes modification, exclusive, sharing, and invalidation. The specific definitions are shown in Table 1: Table 1
[0065] S2. Receive configuration data management tasks.
[0066] S201. Receive a configuration data management task, and determine whether the size of the free storage area of the non-volatile memory exceeds the size of the applied storage area: if so, directly allocate the storage area to the configuration data management task from the free storage area; if not, clear the copy data with an invalidation mark stored in the non-volatile memory, and allocate the storage area to the configuration data management task from the released free storage area.
[0067] The specific process includes the following: Task reception and analysis: First, the system receives and analyzes the configuration data management task to clarify the specific requirements of the task, including key information such as the size of the required storage area, data type, operation type (such as read, write, update, etc.).
[0068] Free storage area assessment: Next, the system performs a comprehensive scan of the current state of non-volatile memory to assess the size of its free storage area. This step is critical because it determines whether the system has enough space to directly meet the storage needs of the current task.
[0069] Storage area allocation decisions: If the free storage area is sufficient: If the evaluation result shows that the size of the free storage area of the non-volatile memory exceeds or is equal to the size of the storage area requested by the task, the system will directly allocate the corresponding storage area for the configuration data management task from the free storage area. During the allocation process, the system will ensure that the allocated storage area is continuous and update the memory management table to record the allocation status of the area.
[0070] If there is not enough free storage area: If the size of the free storage area is not enough to meet the task requirements, the system will take further resource optimization measures. First, the system will traverse all the replica data stored in the non-volatile memory, identify and mark those with invalidation marks. These invalidation marks may indicate that the data is outdated, no longer needed, or has been replaced by other copies. The system will then clear the replica data with invalidation marks to free up the corresponding storage space. After the cleanup is completed, the system will evaluate the size of the free storage area again and allocate sufficient storage area for the configuration data management task from the newly released free storage area.
[0071] Task execution preparation: After successfully allocating the storage area, the system will prepare the necessary execution environment for the configuration data management task, including setting data access permissions, initializing data buffers, etc.
[0072] Through this process, the system can efficiently manage and allocate non-volatile memory resources, ensuring that configuration data management tasks can be performed smoothly while minimizing resource waste and data redundancy.
[0073] S202, applying for a storage area for the configuration data management task in the non-volatile memory; traversing the copy data in the non-volatile memory, and determining whether there is copy data with a status identifier of a non-invalid identifier in the non-volatile memory.
[0074] Specifically, applying for a storage area: the system sends a storage area application request to the non-volatile memory manager according to the requirements of the configuration data management task. The request should include key information such as the size and data type of the required storage area.
[0075] Traversing the replica data: After applying for the storage area, the system starts to traverse all the replica data stored in the non-volatile memory. The purpose of this step is to identify which data is currently valid, that is, its status is marked as non-expired.
[0076] S203. If there is copy data with a status identifier of a non-invalid identifier in the non-volatile memory, determine whether there is copy data with a status identifier of a modification identifier in the non-volatile memory; if there is copy data with a modification identifier, enter a waiting state and cyclically obtain the status identifier update status of the copy data in the non-volatile memory; based on the status identifier update status, confirm that there is no copy data with a modification identifier in the non-volatile memory, and copy the copy data with a status identifier of an exclusive identifier or a shared identifier into the storage area.
[0077] Check the non-invalidated replica data: If replica data with a status identifier of non-invalidated is found during the traversal process, further determine whether these data contain replicas with modified identifiers.
[0078] If there are modified copies, the system enters a waiting state and sets up a loop mechanism to periodically obtain the status update status of these copy data. Once it is confirmed that all copy data with modified flags have been updated to other states (such as exclusive flags, shared flags, or invalid flags), the subsequent operations will continue.
[0079] If there is no modification mark copy: the system directly processes the copy data with the status mark as exclusive mark or shared mark, and prepares to copy it to the storage area previously applied for.
[0080] S204: If the copy data with a status mark of a non-invalid mark does not exist in the non-volatile memory, the configuration data solidified in the disk is copied to the storage area.
[0081] If after traversing all the replica data in the non-volatile memory, it is found that there is no replica data with a status mark other than the invalid mark, the system needs to read the solidified configuration data from the disk.
[0082] Copy disk data: The system reads the fixed configuration data related to the current configuration data management task from the disk and copies it to the previously requested storage area.
[0083] S3. Execute the configuration data management task based on the allocated replica data.
[0084] S301: If the configuration data management task is an access task, the copy data in the storage area is fed back to the initiating component of the configuration data management task, and the completion of the configuration data management task is recorded in a firmware log.
[0085] Specifically, the process includes the following: Data retrieval: First locate the non-volatile memory area that has been previously requested and stored for the configuration data management task. Retrieve the configuration data copy that matches the access task request from the storage area.
[0086] Data verification: Before feeding the data back to the originating component, the system should verify the retrieved copy data to ensure its integrity and consistency. This may include checking the data's checksum, timestamp, or other metadata.
[0087] Data feedback: Once the data is verified, the system will feed back the replica data to the initiating component of the configuration data management task through appropriate interfaces (such as API calls, message queues, direct memory access, etc.). During the feedback process, the system should ensure the correct transmission of data, and may involve data serialization / deserialization operations to adapt to different data exchange formats and communication protocols.
[0088] Logging: After the configuration data management task is completed, the system should record detailed execution information in the firmware log. This includes but is not limited to the task type (access task), task start time, end time, execution result (success / failure), data ID or name involved, and any key error information or warnings. Logging should be in a standardized format to facilitate subsequent log analysis and problem tracking.
[0089] Flag update: Update the status flag of the completed configuration data copy to an invalid flag.
[0090] S302. If the configuration data management task is a modification task, the copy data in the storage area is updated based on the target data of the configuration data management task, and while updating the copy data, the status identifier of the new copy data is changed to a modification identifier; a timer is refreshed synchronously, and when the timer reaches a preset time threshold, it is checked whether the status identifier of the new copy data is a modification identifier; if the status identifier of the new copy data is a modification identifier, the new copy data is solidified to the corresponding disk; if the status identifier of the new copy data is not a modification identifier, a prompt message indicating that the modification was unsuccessful is generated; and the completion of the configuration data management task is recorded in the firmware log.
[0091] The specific process includes: Data update: Locate the corresponding replica data in the storage area according to the target data specified in the configuration data management task. Use the new data value provided in the task to update the replica data in the storage area.
[0092] Status flag change: When updating the replica data, the system changes the status flag of the new replica data to a modified flag. This means that the data has been modified but has not yet been synchronized with the solidified data on the disk.
[0093] Synchronous refresh timer setting: Set a synchronous refresh timer, which is used to trigger the verification of the new replica data status identifier after a preset time threshold. The time threshold can be adjusted according to system performance and data synchronization requirements.
[0094] Timer verification: When the timer reaches the preset time threshold, the verification operation is performed. The purpose of the verification is to confirm whether the status mark of the new copy data is still the modification mark. If the status mark is still the modification mark, it means that no other tasks or operations have changed the status of the data to other types (such as exclusive, shared, or invalid) during this period, so the data needs to be solidified to the disk. If the status mark is not the modification mark, it means that other operations have already processed the data (such as the data has been exclusively or shared by other tasks, or has been marked as invalid). At this time, the system should generate a prompt message that the modification was unsuccessful and record it in the log.
[0095] Data hardening: If the verification result shows that the status mark of the new copy data is still the modification mark, the system will perform data hardening operations, which include writing the new copy data to the corresponding location on the disk and updating the hardened data on the disk.
[0096] Logging: Regardless of whether data hardening is successful or not, the execution completion of the configuration data management task is recorded in the firmware log. This includes the task type (modification task), task start time, end time, execution result (success / failure), data ID or name involved, and any critical error information or warnings.
[0097] Flag update: Based on the task completion status recorded in the log, the status flag of the task's copy data is changed to an invalid flag.
[0098] In a specific embodiment of the present invention, taking task0 and task1 as examples, the following scenarios are included: System initialization - Scenario 1: 1. Perform initialization and reserve data copy space for all tasks that need to operate DDF data; 2. Mark the status of all data copies as invalid; 3. Task0 attempts to read the DDF data in the replica to restore the array card configuration, so the replica status is invalid. It first checks the replica status held by other tasks. Since all of them are invalid, task0 reads the solidified DDF data from the attached disk and copies it to the replica it holds, and changes the replica status to exclusive.
[0099] Operation phase - Scenario 2: Task1 tries to read the DDF data in the replica; Because the status of the copy it holds is invalid, it first checks the status of the remaining copies; There are other replicas that are not in an invalid state (in scenario 1, the state of task0 replica changes to exclusive), and task1 reads data from the non-invalid replica to its own replica; Change the status of the two data copies to shared.
[0100] The status identification switching process of the above two scenarios is as follows Figure 2 shown.
[0101] System initialization - Scenario 3: 1. According to the specification agreement, reserve data copy space for all tasks that need to operate DDF data; 2. Mark all data copies as invalid; 3. Task0 attempts to modify DDF data; 4. Check that the remaining copies are all invalid; 5. Modify the copy data you hold, and its status flag changes to the modification flag.
[0102] 6. Create a timer and check the status of the task0 copy after it times out. If it is still marked as modified, save the data copy to the attached disk and change the copy status to exclusive.
[0103] Operation phase - Scenario 4: 1. Task 1 attempts to modify DDF data, and task 1 has a higher priority than task 0; 2. Check the status of other replicas. There are data replicas that are not invalid (the status of the replica data of task0 in scenario 3 is marked as modified); 3. Change the status flag of the replica data of task0 to the invalid flag; 4. Modify the copy data that is consistent with the disk configuration data and change its status flag to a modification flag.
[0104] 5. Create a timer and check the status flag of task1 after it times out. If it is still the modification flag, save the updated copy data of task1 to the attached disk and change the status flag to the exclusive flag.
[0105] Operation phase - Scenario 5: 1. Task0 attempts to modify DDF data; 2. Check that the replica data it holds has an exclusive flag (the state flag of the task0 replica data in scenario 1 changes to an exclusive flag); 3. Modify the copy data you hold and change the status flag to the modification flag.
[0106] 4. Create a timer and check the task0 replica status after the timeout. If it is still marked as modified, save the updated replica data to the attached disk and change the replica status to exclusive.
[0107] The status identification change process of the above three scenarios is as follows Figure 3 shown.
[0108] Operation phase - Scenario 6: 1. Task 1 attempts to read DDF data; 2. Check that the status of the copy data it holds is marked as invalid; 3. Check the status flags of the remaining replica data. If there is replica data in a non-expired state (the status flag of the replica data of task0 in scenario 5 is a modification flag); 4. Wait for a while until the status flag of the replica data held by task0 changes to the exclusive flag, and copy the replica data held by task0 as its own replica data; 5. Change the status flags of the replica data of task0 and task1 to shared flags; 6. Task 1 uses its own copy data as the read result.
[0109] Taking task 1 as an example, the state transition of the data copy it holds is as follows: Figure 4 shown.
[0110] In some embodiments, the array card configuration data maintenance system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the array card configuration data maintenance system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Function to maintain array card configuration data.
[0111] In this embodiment, the array card configuration data maintenance system can be divided into multiple functional modules according to the functions it performs, such as Figure 5 As shown. The functional modules of the system 500 may include: an identification setting module 510, a data management module 520 and a task execution module 530. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0112] An identification setting module, used for setting a management protocol for a state identification, and maintaining a matching state identification for the copy data of the configuration data based on the management protocol; A data management module, used for allocating valid replica data to the configuration data management task based on the state identifier of the replica data; The task execution module is used to execute the configuration data management task based on the allocated replica data.
[0113] Optionally, as an embodiment of the present invention, the status identifier includes: Modify the flag, exclusive flag, shared flag, and invalid flag.
[0114] Optionally, as an embodiment of the present invention, the management protocol includes: Update the status mark of the latest modified version of the copy data that is inconsistent with the solidified data in the disk to the modification mark; Update the status flag of the replica data that is consistent with the solidified data in the disk and is bound to only one task to an exclusive flag; Update the status identifier of the replica data that is consistent with the solidified data in the disk and bound to multiple tasks to a shared identifier; The status flag of the replica data bound to the completed task is updated to an invalid flag.
[0115] Optionally, as an embodiment of the present invention, allocating valid replica data to the configuration data management task based on the state identifier of the replica data includes: receiving a configuration data management task, and applying for a storage area for the configuration data management task in a non-volatile memory; Traverse the copy data in the non-volatile memory to determine whether there is copy data in the non-volatile memory whose status identifier is a non-invalid identifier: If so, copy the duplicate data with the status marked as an exclusive mark or a shared mark into the storage area; If not, the configuration data solidified in the disk is copied to the storage area.
[0116] Optionally, as an embodiment of the present invention, receiving a configuration data management task, and applying for a storage area for the configuration data management task in a non-volatile memory includes: Determine whether the size of the free storage area of the non-volatile memory exceeds the size of the requested storage area: If yes, directly allocating a storage area for the configuration data management task from a free storage area; If not, the copy data with the invalidation mark stored in the non-volatile memory is cleared, and a storage area is allocated to the configuration data management task from the released free storage area.
[0117] Optionally, as an embodiment of the present invention, before copying the replica data with the status identified as an exclusive identifier or a shared identifier into the storage area, the method further includes: Determine whether there is copy data with a status mark of a modification mark in the non-volatile memory, and if there is copy data with a modification mark, enter a waiting state and cyclically obtain the update status of the status mark of the copy data in the non-volatile memory; Based on the update status of the status identifier, it is confirmed that there is no copy data with a modification identifier in the non-volatile memory, and the copy data with a status identifier of an exclusive identifier or a shared identifier is copied into the storage area.
[0118] Optionally, as an embodiment of the present invention, performing the configuration data management task based on the allocated replica data includes: If the configuration data management task is an access task, the copy data in the storage area is fed back to the initiating component of the configuration data management task, and the completion of the configuration data management task is recorded in the firmware log; If the configuration data management task is a modification task, the copy data in the storage area is updated based on the target data of the configuration data management task, and the updated copy data is solidified to the corresponding disk.
[0119] Optionally, as an embodiment of the present invention, updating the copy data in the storage area based on the target data of the configuration data management task, and solidifying the updated copy data to a corresponding disk includes: While updating the replica data, the status flag of the new replica data is changed to a modification flag; Synchronously refreshing the timer, and checking whether the status identifier of the new copy data is a modification identifier when the timer reaches a preset time threshold; If the status mark of the new copy data is a modification mark, the new copy data is solidified to the corresponding disk; If the status identifier of the new copy data is not a modification identifier, a prompt message indicating that the modification was unsuccessful is generated; The completion of the configuration data management task is recorded in the firmware log.
[0120] Figure 6 The present invention provides a schematic diagram of the structure of a terminal 600 provided in an embodiment of the present invention. The terminal 600 can be used to execute the array card configuration data maintenance method provided in an embodiment of the present invention.
[0121] The terminal 600 may include: a processor 610, a memory 620 and a communication unit 630. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0122] The memory 620 can be used to store the execution instructions of the processor 610. The memory 620 can be implemented by any type of volatile or non-volatile storage terminal 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. When the execution instructions in the memory 620 are executed by the processor 610, the terminal 600 can execute some or all of the steps in the following method embodiments.
[0123] The processor 610 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 620, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 610 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0124] The communication unit 630 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0125] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0126] Therefore, the present invention improves the efficiency of modifying and reading configuration data, reduces the queuing waiting time caused by multiple tasks operating on configuration data, and improves the response execution speed of specific array card services by maintaining the status identifiers of multiple task data copies, while ensuring the legitimacy and validity of the configuration data copies held by different tasks. The technical effects that can be achieved by this embodiment can be found in the above description and will not be repeated here.
[0127] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0128] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0129] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0130] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0132] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A method for maintaining array card configuration data, characterized in that: include: Setting a management protocol for the status identifier and maintaining a matching status identifier for the replica data of the configuration data based on the management protocol; Allocate valid replica data to the configuration data management task based on the state identifier of the replica data; The configuration data management task is performed based on the allocated replica data.
2. The method according to claim 1, characterized in that The status identifier includes: Modify the flag, exclusive flag, shared flag, and invalid flag.
3. The method according to claim 2, characterized in that The management agreement includes: Update the status mark of the latest modified version of the copy data that is inconsistent with the solidified data in the disk to the modification mark; Update the status flag of the replica data that is consistent with the solidified data in the disk and is bound to only one task to an exclusive flag; Update the status identifier of the replica data that is consistent with the solidified data in the disk and bound to multiple tasks to a shared identifier; The status flag of the replica data bound to the completed task is updated to an invalid flag.
4. The method according to claim 1, characterized in that: Based on the status identification of the replica data, valid replica data is allocated to the configuration data management task, including: receiving a configuration data management task, and applying for a storage area for the configuration data management task in a non-volatile memory; Traverse the copy data in the non-volatile memory to determine whether there is copy data in the non-volatile memory whose status identifier is a non-invalid identifier: If so, copy the duplicate data with the status marked as an exclusive mark or a shared mark into the storage area; If not, the configuration data solidified in the disk is copied to the storage area.
5. The method according to claim 4, characterized in that Receiving a configuration data management task and applying for a storage area for the configuration data management task in a non-volatile memory, including: Determine whether the size of the free storage area of the non-volatile memory exceeds the size of the requested storage area: If yes, directly allocating a storage area for the configuration data management task from a free storage area; If not, the copy data with the invalidation mark stored in the non-volatile memory is cleared, and a storage area is allocated to the configuration data management task from the released free storage area.
6. The method according to claim 4, characterized in that Before copying the replica data whose status is identified as an exclusive identifier or a shared identifier into the storage area, the method further includes: Determine whether there is copy data with a status mark of a modification mark in the non-volatile memory, and if there is copy data with a modification mark, enter a waiting state and cyclically obtain the update status of the status mark of the copy data in the non-volatile memory; Based on the update status of the status identifier, it is confirmed that there is no copy data with a modification identifier in the non-volatile memory, and the copy data with a status identifier of an exclusive identifier or a shared identifier is copied into the storage area.
7. The method according to claim 4, characterized in that Executing the configuration data management task based on the allocated replica data includes: If the configuration data management task is an access task, the copy data in the storage area is fed back to the initiating component of the configuration data management task, and the completion of the configuration data management task is recorded in the firmware log; If the configuration data management task is a modification task, the copy data in the storage area is updated based on the target data of the configuration data management task, and the updated copy data is solidified to the corresponding disk.
8. The method according to claim 7, characterized in that The method includes updating the copy data in the storage area based on the target data of the configuration data management task, and solidifying the updated copy data to the corresponding disk, including: While updating the replica data, the status flag of the new replica data is changed to a modification flag; Synchronously refresh the timer, and check whether the status identifier of the new copy data is a modification identifier when the timer reaches a preset time threshold; If the status mark of the new copy data is a modification mark, the new copy data is solidified to the corresponding disk; If the status identifier of the new copy data is not a modification identifier, a prompt message indicating that the modification was unsuccessful is generated; The completion of the configuration data management task is recorded in the firmware log.
9. A terminal, characterized in that: include: A memory, used for storing array card configuration data maintenance program; A processor is used to implement the steps of the array card configuration data maintenance method according to any one of claims 1 to 8 when executing the array card configuration data maintenance program.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores an array card configuration data maintenance program, and when the array card configuration data maintenance program is executed by the processor, the steps of the array card configuration data maintenance method according to any one of claims 1 to 8 are implemented.