Data operation request processing method and device, storage medium and electronic equipment

By locking data blocks and synchronizing requests in the dual live volume, the problem of low data synchronization efficiency of dual live volumes is solved, and efficient and reliable data synchronization is achieved.

CN120336039APending Publication Date: 2025-07-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510449776.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing dual-live volume data synchronization method has low synchronization efficiency when the master-slave volume distance is far, and has high requirements for communication networks.

Method used

By receiving the data operation request in the first volume in the double-living volume and performing a lock operation on the first data block, a synchronous lock request is sent to the matching second volume, the target data operation is performed after completing the lock operation, and the data operation results are synchronized between the first volume and the second volume.

Benefits of technology

It improves the accuracy and efficiency of data synchronization, reduces dependence on the master-slave volume communication network, ensures the integrity and consistency of data during the synchronization process, and improves the reliability and stability of dual-living volume data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336039A_ABST
    Figure CN120336039A_ABST
Patent Text Reader

Abstract

The invention discloses a data operation request processing method and device, a storage medium and electronic equipment, and relates to the technical field of computers, the data operation request processing method comprises the following steps: executing a first locking operation on at least one first data block in a first volume in active-active volumes, and sending a synchronous locking request to a second volume matched with the first volume; after the first locking operation and the second locking operation are completed, executing a target data operation matched with the data operation request according to the first data block, and sending a reference data operation request to the second volume; and after the target data operation in the first volume and the second volume is completed, returning a data operation result matched with the data operation request through the first volume. Since the first volume can be the master volume or the slave volume, that is, both the master volume and the slave volume can be used for responding to the data operation request, dependence on a complex multi-path strategy is not needed, the requirement for a communication network between the master volume and the slave volume is lowered, and the problem that the synchronization efficiency is lowered in an existing data synchronization method is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method and apparatus for processing data operation requests, a storage medium, and an electronic device. Background Art

[0002] In the current Active-Active (AA) storage solution, usually two sets of storage clusters are built into a cross-site AA cluster. In such an architecture, two volumes of the same size in the two clusters at both ends can form an AA volume. The AA volume has the characteristic of real-time data synchronization, and both storages at both ends can process read and write requests of the application server simultaneously, so as to provide the application server with non-differentiated AA parallel access capabilities. When any end in the cluster fails, the service can be automatically and seamlessly switched to access the storage at the other end to ensure that the continuity of service access is not affected.

[0003] However, the existing real-time data synchronization function of the AA volume is usually implemented based on a pre-configured multi-path policy. This AA volume data synchronization operation based on the multi-path policy places high requirements on the communication network between the master and slave volumes. Especially when the sites corresponding to the master and slave volumes are far apart, the efficiency of the synchronization function implemented based on the multi-path policy will be significantly reduced. In other words, the existing AA volume data synchronization method has the technical problem of low synchronization efficiency.

[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of this application provide a method and apparatus for processing data operation requests, a storage medium, and an electronic device, so as to at least solve the technical problem of low synchronization efficiency in the related art data synchronization method.

[0006] This application provides a method for processing data operation requests, including:

[0007] Receiving a data operation request through a first volume in the AA volume;

[0008] Performing a first locking operation on at least one first data block in the first volume, and sending a synchronization locking request to a second volume matching the first volume, where the synchronization locking request is used to perform a second locking operation on at least one second data block in the second volume, and at least one of the second data blocks corresponds to at least one of the first data blocks one by one;

[0009] When the above first locking operation and the above second locking operation are completed, perform a target data operation matching the data operation request according to at least one of the above first data chunks, and send a reference data operation request to the above second volume, where the reference data operation request is used to perform the above target data operation matching the data operation request according to at least one of the above second data chunks in the above second volume;

[0010] When the target data operation in the above first volume and the target data operation in the above second volume are completed, return a data operation result matching the data operation request through the above first volume.

[0011] This application also provides a processing device for a data operation request, including:

[0012] A forwarding control module, configured to receive a data operation request through a first volume in a dual-active volume;

[0013] A remote replication module, configured to perform a first locking operation on at least one first data chunk in the above first volume, and send a synchronization locking request to a second volume matching the above first volume, where the synchronization locking request is used to perform a second locking operation on at least one second data chunk in the above second volume, and at least one of the above second data chunks corresponds to at least one of the above first data chunks one by one;

[0014] The above remote replication module is further configured to, when the above first locking operation and the above second locking operation are completed, perform a target data operation matching the data operation request according to at least one of the above first data chunks, and send a reference data operation request to the above second volume, where the reference data operation request is used to perform the above target data operation matching the data operation request according to at least one of the above second data chunks in the above second volume;

[0015] The above forwarding control module is further configured to, when the target data operation in the above first volume and the target data operation in the above second volume are completed, return a data operation result matching the data operation request through the above first volume.

[0016] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above data operation request processing methods when executing the computer program.

[0017] This application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above data operation request processing methods are implemented.

[0018] The present application also provides a computer program product, including a computer program, which when executed by a processor, implements the steps of any one of the above data operation request processing methods.

[0019] Through the above embodiments of the present application, a first locking operation is performed on at least one first data block in the first volume of the dual-active volume, and a synchronous locking request is sent to the second volume matching the first volume. The synchronous locking request is used to perform a second locking operation on at least one second data block in the second volume, and the second data block corresponds to the first data block one by one. After the first locking operation and the second locking operation are completed, a target data operation matching the data operation request is performed according to the first data block, and a reference data operation request is sent to the second volume. The reference data operation request is used to perform a target data operation matching the data operation request according to the second data block in the second volume. Finally, after the target data operations in the first volume and the second volume are completed, a data operation result matching the data operation request is returned through the first volume.

[0020] In the above technical solution of the present application, by performing a locking operation on data blocks during the data operation process, and synchronizing the locking request and the data operation request between the first volume and the second volume, it can ensure that the synchronous operation of data between the first volume and the second volume is more accurate and efficient. Since the first volume in the embodiments of the present application can be the primary volume or the secondary volume, that is to say, both the primary volume and the secondary volume in the embodiments of the present application can be used to respond to data operation requests. Therefore, compared with the dual-active volume data synchronization method based on the multi-path strategy in the prior art, the present application does not need to rely on a complex multi-path strategy, thereby reducing the requirements for the communication network between the primary and secondary volumes, and effectively avoiding the problem of reduced synchronization efficiency caused by network latency and bandwidth limitations. In addition, through the locking and synchronization mechanism of data blocks, it can ensure the integrity and consistency of data during the synchronization process, and further improve the reliability and stability of dual-active volume data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a hardware structure block diagram of a server device for a data operation request processing method according to an embodiment of the present application;

[0023] Figure 2 is a flowchart of a data operation request processing method according to an embodiment of the present application;

[0024] Figure 3 It is a flowchart of another method for processing a data operation request according to an embodiment of the present application;

[0025] Figure 4 It is a flowchart of yet another method for processing a data operation request according to an embodiment of the present application;

[0026] Figure 5 It is a flowchart of yet another method for processing a data operation request according to an embodiment of the present application;

[0027] Figure 6 It is a schematic structural diagram of a processing device for a data operation request according to an embodiment of the present application;

[0028] Figure 7 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0029] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

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

[0031] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0032] The method embodiments provided in the embodiments of the present application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 It is a hardware structure block diagram of a server device for a method of processing a data operation request according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1Only one processor 102 is shown (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a field-programmable gate array FPGA), and a memory 104 for storing data. Among them, the above server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only schematic and does not limit the structure of the above server device. For example, the server device may further include more or fewer components than Figure 1 shown in, or have a different configuration from Figure 1 that shown.

[0033] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the data processing method of the memory in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0034] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0035] It should be noted that block storage mainly maps the entire raw disk space to the host for use. For example, the traditional SAN (Storage Area Network) technology is block storage.

[0036] The dual-active architecture of SAN storage ensures data consistency and service continuity of the data stored between two different sites (across cabinets, across computer rooms, across regions, etc.). After a storage failure at any site, the storage at the other site can achieve seamless service switching to ensure service continuity.

[0037] The dual-active volume includes a primary volume and a secondary volume, which respectively belong to the storages of two sites and appear as one volume to the host. After the primary volume receives the service I / O (Input / Output) from the host, data synchronization based on I / O is achieved between the storages of the two sites through the remote replication technology of the volume, ensuring that the I / O status is returned to the host side only after both the primary volume and the secondary volume are successfully written.

[0038] The existing real-time data synchronization function of the dual-active volume is usually implemented based on a pre-configured multi-path policy. This data synchronization operation of the dual-active volume based on the multi-path policy places high requirements on the communication network between the primary and secondary volumes. Especially when the sites corresponding to the primary and secondary volumes are far apart, the efficiency of the synchronization function implemented based on the multi-path policy will be significantly reduced. In other words, the existing dual-active volume data synchronization method has the technical problem of low synchronization efficiency.

[0039] To solve the above technical problems, this application provides an optional implementation manner, as Figure 2 shown, the above method for processing data operation requests can be applied to a storage device deployed at a storage service site, including:

[0040] S202, receiving a data operation request through a first volume in the dual-active volume;

[0041] S204, performing a first locking operation on at least one first data block in the first volume, and sending a synchronization locking request to a second volume matching the first volume, where the synchronization locking request is used to perform a second locking operation on at least one second data block in the second volume, and at least one of the second data blocks corresponds to at least one of the first data blocks one by one;

[0042] S206, when the first locking operation and the second locking operation are completed, performing a target data operation matching the data operation request according to at least one of the first data blocks, and sending a reference data operation request to the second volume, where the reference data operation request is used to perform the target data operation matching the data operation request according to at least one of the second data blocks in the second volume;

[0043] S208, when the target data operation in the first volume and the target data operation in the second volume are completed, returning a data operation result matching the data operation request through the first volume.

[0044] It should be noted that in the above embodiments of the present application, the above dual-active volumes can be used to indicate two storage volumes that are both in an active state in the dual-active storage architecture, that is, including the above first volume and the above second volume. The above first volume and second volume can simultaneously process read and write requests sent by the client, and realize real-time data synchronization through the above steps S202 to S208.

[0045] The above first volume can be the primary volume in the above dual-active volumes, or the secondary volume in the above dual-active volumes. That is to say, in the above embodiments of the present application, any one of the storage volumes in the dual-active volumes can receive the data operation requests sent by the client and process the data operation requests. In each case of receiving the data operation requests sent by the client, there is no need to forward the data operation requests to the primary volume for processing based on the multi-path policy, but the data operation requests can be directly processed in the current volume (i.e., the first volume), and steps S204 to S208 are coordinated to ensure data synchronization during the data processing process based on the locking operation, thereby significantly improving the data processing efficiency while ensuring data synchronization between the dual-active volumes.

[0046] Further, in step S204, the above data chunks can be used to indicate the object data divided into multiple smaller chunks that matches the data operation request in the first volume and the second volume. Dividing the above object data into multiple smaller chunks facilitates more fine-grained data operations and management operations. The above data operations can include one or more of data read operations, data write operations, and data delete operations; the above management operations can include synchronization status management and locking status management. Among them, synchronization status management can be to maintain and manage the status of whether the data chunks have completed data synchronization, and locking status management can be to maintain and manage the status of whether the data chunks have completed the locking operation.

[0047] The first locking operation and the second locking operation in the above step S204 can be locking operations respectively executed by the first volume and the second volume in their respective corresponding storage volumes. The lock type corresponding to the above locking operation can specifically be a mutex lock (Mutex Lock) used to protect the mutually exclusive access of shared resources in a multi-threaded or multi-node environment and prevent data conflicts. For example, the locking and unlocking of the lock are realized through atomic operations (such as Compare and Swap, CAS) or hardware instructions.

[0048] It should be noted that in the above step S204, when the first volume is the primary volume in the dual-active volumes, performing the first locking operation on at least one first data chunk in the first volume and sending a synchronization locking request to the second volume that matches the first volume includes: performing the first locking operation on at least one first data chunk in the primary volume, and at the same time sending a first locking request to the secondary volume that matches the primary volume;

[0049] In the case where the first volume is a secondary volume in a dual-active volume, a first locking operation is performed on at least one first data block in the first volume, and a synchronous locking request is sent to a second volume that matches the first volume, including: sending a second locking request from the secondary volume to the primary volume; in the case of receiving the locking response information returned by the primary volume, performing a first locking operation on at least one first data block in the secondary volume.

[0050] That is to say, in the above embodiment, in the case where the first volume is the primary volume, the primary volume can, while performing a locking operation on at least one first data block, send a first locking request to the second volume (i.e., the secondary volume) to control the secondary volume to perform a synchronous locking operation on at least one second data block.

[0051] In the case where the first volume is the secondary volume, as the secondary volume, it is necessary to send a second locking request to the primary volume to apply for block lock authorization, and the primary volume executes the block lock locking process. This avoids the conflict problem when two sites simultaneously apply for block locks.

[0052] Specifically, in the case where the first volume is the secondary volume, when the secondary volume needs to operate on a certain data block, it can first send a second locking request to the primary volume, which may include the identification information of the data block to be locked.

[0053] Next, after receiving the locking request from the secondary volume, the primary volume will check whether the data block has been locked by other operations. If it has not been locked, the primary volume will perform a locking operation on the data block.

[0054] Furthermore, after successfully locking the data block, the primary volume will send a locking response information to the secondary volume to confirm that the locking operation has been completed. Among them, the above response information may include a confirmation flag of successful locking and possible other synchronization information.

[0055] Furthermore, after receiving the locking response from the primary volume, the secondary volume will perform a locking operation on the corresponding data block locally according to the response information, and after successfully locking the corresponding data block on the secondary volume, the secondary volume can safely perform the required data operation, such as a data writing operation. It can be understood that the way of performing the data writing operation in the secondary volume can also refer to the above steps S206 and S208.

[0056] In the above technical solution of the present application, by performing a locking operation on data in chunks during the data operation process and synchronizing the lock request and data operation request between the first volume and the second volume, it is possible to ensure that the synchronization operation of the data between the first volume and the second volume is more accurate and efficient. Since the first volume in the embodiment of the present application can be either the primary volume or the secondary volume, that is, both the primary volume and the secondary volume in the embodiment of the present application can be used to respond to data operation requests. Therefore, compared with the dual-active volume data synchronization method based on the multi-path strategy in the prior art, the present application does not need to rely on a complex multi-path strategy, thereby reducing the requirements for the communication network between the primary and secondary volumes, and effectively avoiding the problem of reduced synchronization efficiency caused by network latency and bandwidth limitations. In addition, through the locking and synchronization mechanism of data in chunks, it is possible to ensure the integrity and consistency of the data during the synchronization process, further improving the reliability and stability of the dual-active volume data synchronization.

[0057] In an alternative embodiment, before performing the locking operation in the above embodiment, it is also possible to first verify the synchronization status information and locking status information of at least one first data chunk, and perform subsequent operations according to the verification result.

[0058] Optionally, before performing the first locking operation on at least one first data chunk in the first volume and sending a synchronization lock request to the second volume that matches the first volume, it further includes:

[0059] S1, obtaining the synchronization status information that matches at least one first data chunk;

[0060] S2, when the synchronization status information indicates that at least one first data chunk has completed data synchronization, obtaining the locking status information that matches at least one first data chunk;

[0061] S3-1, when the locking status information indicates that at least one first data chunk is in an unlocked state and the data operation request is a data write request, determining to perform the first locking operation on at least one first data chunk in the first volume and sending a synchronization lock request to the second volume;

[0062] S3-2, when the locking status information indicates that at least one first data chunk is in an unlocked state and the data operation request is a data read operation, reading the target object data from at least one first data chunk in the first volume; returning a data operation result that matches the data operation request according to the target object data;

[0063] S3-3. When the lock status information indicates that at least one first data block is in a locked state, add the data operation request to the request queue matching at least one first data block; when at least one first data block resumes to an unlocked state, obtain the historical data operation request with the earliest timestamp from the request queue as the current operation request to be processed that matches at least one first data block.

[0064] It can be understood that in the above embodiments of the present application, the execution manner of subsequent operations can be determined according to the lock status of at least one first data block.

[0065] Specifically, when at least one first data block is in a locked state, the received data operation request can be added to the request queue matching at least one first data block. The above request queue can be a memory-based data structure, such as a queue or a priority queue, or can also be a persistent storage, such as a data structure in a database or a distributed cache. The creation and management of the queue need to ensure that data operation requests can be recorded and processed in the order of timestamps.

[0066] Furthermore, the first volume needs to monitor the status of the request queue. When at least one first data block resumes to an unlocked state, the first volume can obtain the historical data operation request with the earliest timestamp from the above request queue as the current data operation request for processing, thereby ensuring that requests are processed in chronological order.

[0067] Through the above embodiments, step S3-3 can ensure that when the data block is locked, data operation requests can be effectively managed and processed in chronological order after the data block is unlocked. This helps to improve the data consistency and concurrent processing ability of the dual-active storage system.

[0068] When the lock status information indicates that at least one first data block is in an unlocked state, the subsequent steps may vary according to the request type of the data operation request.

[0069] When the data operation request is a data read request, a data read operation can be directly performed on at least one unlocked first data block, and the read result is used as the request result and returned to the client.

[0070] When the data operation request is a data write request, while writing the data, it is necessary to ensure data synchronization between the first volume and the second volume based on the lock mechanism, and then execute the above steps S204 to S208.

[0071] In the above embodiments of the present application, by obtaining the synchronization status and lock status information of the data chunks in steps S1 and S2, it is ensured that before operating on the data chunks, the data is synchronized between the two volumes of the dual-active storage system. This further helps prevent data inconsistency problems and enhances data reliability. By performing a locking operation on the unlocked data chunks in step S3-1 and sending a synchronization lock request to the second volume, the consistency of the data between the two storage volumes is further ensured.

[0072] Furthermore, in the above embodiments, by determining whether to perform data operations according to the lock status of the data chunks in steps S3-1 and S3-2, effective control of concurrent data access is achieved. When the data chunk is unlocked, the system can directly perform read or write operations. When the data chunk is locked, the system adds the operation request to the request queue and waits for the data chunk to be unlocked before processing. Through the lock mechanism, multiple operations are prevented from modifying the same data chunk simultaneously, thus avoiding data conflicts and race conditions and improving the concurrent processing ability of the dual-active volume system.

[0073] In step S3-3, when the data chunk is in a locked state, the first volume adds the data operation request to the request queue instead of directly rejecting or delaying the processing, thereby improving the system response speed and resource utilization. In addition, by preferentially processing the request with the earliest timestamp after the data chunk is unlocked, the system can more effectively manage the request queue, reduce the request waiting time, and improve the overall performance of the dual-active volume system.

[0074] It should be noted that after obtaining the synchronization status information matching at least one first data chunk, the following steps are also included:

[0075] S1. When the synchronization status information indicates that at least one first data chunk has not completed data synchronization and the object data stored in at least one first data chunk is the latest data, perform a first locking operation on at least one first data chunk and send a synchronization lock request to the second volume;

[0076] S2. When the synchronization status information indicates that at least one first data chunk has not completed data synchronization and the object data stored in at least one first data chunk is not the latest data, forward the data operation request to the target node.

[0077] In the embodiments of the present application, if at least one first data chunk is in an unsynchronized state, it is necessary to process them separately according to the version of the object data. Specifically, if the object data stored in at least one first data chunk in the first volume is the latest data, a chunk lock request also needs to be applied, that is, the above steps S204 to S208 are executed to avoid conflicts with background data synchronization;

[0078] If at least one of the first data chunks stored in the first volume does not contain the latest data, it can be determined that the first volume is a secondary volume. Subsequently, a data unsynchronized status is returned, and the I / O is forwarded to the primary volume for processing.

[0079] Through the above-described embodiments of the present application, by determining the synchronization status and data version of the data chunks, accurate routing and effective management of data operation requests are achieved, thereby optimizing data synchronization and concurrent control in the dual-active storage system. When the data chunks are unsynchronized but contain the latest data, the system ensures data consistency by locking and synchronizing lock requests to avoid data synchronization conflicts; when the data chunks are unsynchronized and do not contain the latest data, the system forwards the request to the primary volume to ensure that data operations are based on the latest data. This improves the accuracy of data operations and the response efficiency of the system, enhances the flexibility and reliability of the system, and makes data management more efficient and secure.

[0080] In an alternative embodiment, the obtaining of the synchronization status information matching at least one first data chunk includes: obtaining a first status bitmap corresponding to at least one first data chunk, where the first status bitmap includes at least one status flag bit respectively corresponding to at least one first data chunk, and the status flag bit includes a first status value for indicating a synchronized state and a second status value for indicating an unsynchronized state; determining the synchronization status information matching at least one first data chunk according to the first status bitmap.

[0081] In this embodiment, the first volume can monitor the synchronization status of each data chunk through the first status bitmap. The specific steps are as follows:

[0082] S1, Creation and maintenance of the first status bitmap;

[0083] First, a status flag bit can be created for each data chunk and stored in the first status bitmap. Among them, the status flag bit can be a binary value, and one of the values (such as "1") indicates that the data chunk is synchronized, and the other value (such as "0") indicates that the data chunk is unsynchronized.

[0084] S2, Update of the synchronization status; when the synchronization operation of the data chunk is completed, update the corresponding status flag bit in the first status bitmap to the first status value of the synchronized state; if the synchronization operation fails or is not completed, the status flag bit remains the second status value of the unsynchronized state.

[0085] S3, Obtaining of the synchronization status information; the first volume can obtain the synchronization status information of the data chunk by querying the first status bitmap. Specifically, according to the value of the status flag bit, the system can determine whether the data chunk has been synchronized with the second volume.

[0086] In another alternative embodiment, obtaining the lock status information matching at least one first data block includes: obtaining a second status bitmap corresponding to at least one first data block, where the second status bitmap includes at least one status identification bit respectively corresponding to at least one first data block, and the status identification bit includes a first status value for indicating the locked state and a second status value for indicating the unlocked state; determining the lock status information matching at least one first data block according to the second status bitmap.

[0087] In the above embodiment, the first volume can also monitor the lock status of each data block through the second status bitmap. The specific steps are as follows:

[0088] S1, creation and maintenance of the second status bitmap;

[0089] First, a status identification bit can be created for each data block and stored in the second status bitmap. Among them, the status identification bit can be a binary value, and one of the values (such as "1") indicates that the data block is locked, and the other value (such as "0") indicates that the data block is unlocked.

[0090] S2, update of the lock status; when the data block is locked, update the corresponding status identification bit in the second status bitmap to the first status value of the locked state. If the data block is unlocked, the status identification bit is updated to the second status value of the unlocked state.

[0091] S3, obtaining of the lock status information; the first volume can obtain the lock status information of the data block by querying the second status bitmap. Furthermore, according to the value of the status identification bit, the system can determine whether the data block has been locked.

[0092] S4, decision based on the lock status;

[0093] In this step, if the status identification bit indicates that the data block is not locked, the subsequent operation process will be determined according to the type of the operation request. In the case where the data operation request is a read request, the read operation can be directly executed; in the case where the data operation request is a write request, the write operation is completed based on the locking operation.

[0094] If the status identification bit indicates that the data block is locked, in order to ensure the consistency of reading and writing, regardless of whether the operation request is a data read request or a data write request, the first volume can add the request matching the data block to the request queue.

[0095] Through the above embodiments of the present application, the synchronization and lock status of data blocks can be effectively managed and controlled, thereby ensuring data consistency and system stability.

[0096] The following combination withFigure 3 A complete implementation of this application will be described. In this implementation, a cross-site chunk lock is used to implement the dual-write function of the dual-active volume. After the primary volume receives a write I / O request from the host, it locks the chunk and synchronizes the lock status to the secondary volume. When the secondary volume receives a write I / O request, it requests authorization for the chunk lock from the primary volume, ensuring that both the primary and secondary volumes can receive service I / O simultaneously without causing data inconsistency issues between the two sites.

[0097] Figure 3 The system architecture of the dual-write function of a dual-active volume is shown, which includes a host 302, a primary volume 304, a secondary volume 306, and Site 1 storage and Site 2 storage. The system connects each component through a dual-active Internet network to achieve data synchronization and replication. The dual-active volume realizes I / O-based data synchronization and background data synchronization through remote replication technology. The dual-active volume ensures that the capacities of the primary volume and the secondary volume are the same, divides the volume into 32KB chunks, and uses 1 bit to distinguish the synchronization status of the chunks. 1 represents the synchronized state, and 0 represents the unsynchronized state. The chunks are the latest data at the primary end (primary volume) of the remote replication and need to asynchronously synchronize the data to the secondary end (secondary volume) of the remote replication through the background.

[0098] In Figure 3 In the architecture shown, the host 302 is responsible for receiving I / O requests from the client and forwarding the I / O requests to the primary volume 304 and / or the secondary volume 306. That is, in this implementation, both the primary volume 304 and the secondary volume 306 can receive and respond to data operation requests sent by the host 302.

[0099] Furthermore, both the primary volume 304 and the secondary volume 306 include a forwarding control module and a remote replication module. Among them, in the primary volume 304, the forwarding control module is used to receive I / O requests from the host 302 and forward them to the Site 1 storage; the remote replication module is used to synchronize data to the secondary volume 306.

[0100] The secondary volume 306 also includes a forwarding control module and a remote replication module. In the secondary volume 306, the forwarding control module is used to receive I / O requests from the host 302 and forward them to the Site 2 storage; the remote replication module is used to receive data synchronization requests from the primary volume 304. The Site 1 storage and the Site 2 storage are respectively used to store the data of the primary volume and the secondary volume.

[0101] In this implementation, taking the primary volume 304 as the first volume as an example, the processing flow of a complete data operation request will be described.

[0102] S302, the host 302 issues a write I / O request to the primary volume 304.

[0103] After the IO operation request is sent from the upper-layer module to the remote replication module, it first checks the synchronization status of the block. If it is in the synchronized state, it then checks the lock status of the current block. If the block lock is set or in the process of being locked, the IO request (regardless of read or write) is queued for waiting. After the IO processing of the current block is completed and the block lock is released, the IO requests in the waiting queue are executed.

[0104] The host 302 reads the IO request sent by the client. When the block lock is in the unlocked state, it directly proceeds to step S312 to obtain the IO data from the current site.

[0105] S304, if the block lock is in the unlocked state, the main volume 304 locks the block and synchronizes the lock request for the corresponding block to the slave site.

[0106] S306, after receiving the lock request, the slave volume 306 sets the lock on the slave volume 306 and returns a lock confirmation message to the main volume 304.

[0107] S308, after receiving the lock confirmation message, the main volume 304 synchronizes and sends the IO data of the write request to the slave volume 306.

[0108] S310, after receiving the IO data of the write request, the slave volume 306 initiates a write request to the lower-layer IO stack (write cache). After successful writing, it returns a confirmation message to the main volume 304.

[0109] S312, while synchronizing the write request to the slave volume 306, the main volume 304 also needs to initiate a write request to the lower-layer IO stack (write cache) on its own side.

[0110] S314, after both the main volume 304 and the slave volume 306 have successfully written the IO data, they return to the upper-layer IO stack.

[0111] S318, the execution result of the IO request is returned to the host 302.

[0112] It should be noted that if the current block is in the unsynchronized state, according to the judgment in the forwarding module for the write IO request (judging the primary information of the remote replication), if the volume at the current site is the latest data, a block lock request also needs to be applied to avoid conflicts with background data synchronization; if the current site is not the latest data, the forwarding module returns a state of failure and unsynchronization, and the forwarding module forwards the IO to the primary site (main volume site) of the remote replication.

[0113] In addition, when the write I / O request of the service is issued from the secondary volume, the I / O processing flow is similar to that when it is issued from the primary volume. The read I / O request is processed at this site, and the write I / O request implements the double-write function at this site after obtaining the lock. The difference lies in the process of applying for the chunk lock. As the secondary volume, it needs to apply for chunk lock authorization from the primary volume, and the primary volume executes the chunk lock locking process to avoid conflicts when two sites apply for chunk locks simultaneously.

[0114] The following is a description of a data writing process based on the secondary volume in conjunction with Figure 4 explain a data writing process based on the secondary volume.

[0115] S402, the host 402 issues a write I / O request to the secondary volume 406.

[0116] After the I / O operation request is issued to the remote replication module through the upper-layer module, first judge the synchronization status of the chunk. If it is in the synchronized state, then judge the lock status of the current chunk. If the chunk lock has been set or is in the locking state, the I / O request (regardless of read or write) is queued for waiting. After the I / O processing of the current chunk is completed and the chunk lock is released, the I / O request in the waiting queue is executed.

[0117] The host 402 reads the I / O request sent by the client. When the chunk lock is in the unlocked state, it directly enters step S412 to obtain the I / O data from the current site.

[0118] S404, if the chunk lock is in the unlocked state, the secondary volume 406 applies for chunk lock authorization from the primary volume 404.

[0119] S406, after receiving the chunk lock authorization, the primary volume 404 sets the lock on the primary volume 404 and returns the chunk lock authorization response information to the secondary volume 406.

[0120] S408, after receiving the lock authorization response information, the secondary volume 406 sets the lock on the secondary volume 406 and synchronously sends the I / O data of the write request to the primary volume 404.

[0121] S410, after receiving the I / O data of the write request, the primary volume 404 initiates a write request to the lower-layer I / O stack (write cache). After the write is successful, it returns the confirmation information to the secondary volume 406.

[0122] S412, while the secondary volume 406 synchronously writes the request to the primary volume 404, the secondary volume 406 itself also needs to initiate a write request to the lower-layer I / O stack (write cache).

[0123] S414, after both the secondary volume 406 and the primary volume 404 successfully write the I / O data, they return to the upper-layer I / O stack.

[0124] S418, the execution result of the I / O request is returned to the host 402.

[0125] Through the above embodiments of the present application, by performing a locking operation on data blocks during the data operation process and synchronizing the lock request and the data operation request between the first volume and the second volume, it is possible to ensure that the synchronization operation of the data between the first volume and the second volume is more accurate and efficient. Since the first volume in the embodiments of the present application can be either the primary volume or the secondary volume, that is to say, both the primary volume and the secondary volume in the embodiments of the present application can be used to respond to data operation requests. Therefore, compared with the dual-active volume data synchronization method based on the multi-path strategy in the prior art, the present application does not need to rely on a complex multi-path strategy, thereby reducing the requirements for the communication network between the primary and secondary volumes, and effectively avoiding the problem of reduced synchronization efficiency caused by network latency and bandwidth limitations. In addition, through the locking and synchronization mechanism of data blocks, it is possible to ensure the integrity and consistency of the data during the synchronization process, further improving the reliability and stability of the dual-active volume data synchronization.

[0126] In an alternative embodiment, to address the possible problems of block lock application timeout or write data synchronization timeout, a mechanism of timeout retry and primary volume takeover of services is introduced.

[0127] Optionally, after the first volume in the dual-active volume receives a data operation request, it further includes at least one of the following:

[0128] Method 1: After sending a synchronization lock request to the second volume, if the lock success indication information returned by the second volume is not received within the first time period, send a lock abort instruction to the second volume; when the second volume stops responding to the synchronization lock request according to the lock abort instruction, send a synchronization lock request to the second volume again;

[0129] Method 2: After sending a reference data operation request to the second volume, if the write success indication information returned by the second volume is not received within the second time period, send a write abort instruction to the second volume; when the second volume stops responding to the reference data operation request according to the write abort instruction, send a reference data operation request to the second volume again.

[0130] It can be understood that in this embodiment, if a block lock application timeout occurs, or a timeout occurs when writing data of a write IO to the remote end, for example, when it exceeds 10 times the average time consumption, an abort command will be issued to request the remote end to abort the current request, and retry after the abort is successful.

[0131] It should be noted that the above first time period and second time period for determining the block lock timeout and the remote write operation can be dynamically determined according to the working state of the dual-active volume. For example, it can be dynamically adjusted based on the historical response time, and can also be adaptively adjusted according to the network condition and load.

[0132] During the dynamic adjustment of the historical response time, the time interval data between the first volume sending a synchronous locking request to the second volume and receiving a locking success indication message can be collected regularly. Then, the average value of these time intervals is obtained as the reference response time. Optionally, the first duration can be set to twice or more of the reference response time to adapt to changes in network latency or processing latency. In addition, the first duration can also be dynamically adjusted according to the real-time monitored response time. For example, if the response time of the recent several requests increases significantly, the system can increase the first duration accordingly.

[0133] During the adaptive adjustment according to the network conditions and load, indicators such as network bandwidth, latency, and packet loss rate can be monitored in real time. For example, the CPU usage, memory usage, and I / O load of the system where the second volume is located can be monitored, and the second duration can be set according to the network conditions and system load. For example, when the network conditions are good and the system load is low, a shorter second duration can be set; when the network conditions are poor or the system load is high, a longer second duration can be set. Finally, the first volume can adaptively adjust the second duration according to the monitored network conditions and system load.

[0134] In an alternative implementation manner, when the number of times of the retransmission operation is greater than or equal to the target number, and / or the response duration of the abort instruction is greater than or equal to the target duration, at least one of the following is further included:

[0135] Method 1: Send an alarm message to the client matching the dual-active volume, where the alarm message is used to indicate that the dual-active volume is in an abnormal working state;

[0136] Method 2: Perform a device detection operation on the dual-active volume;

[0137] Method 3: Take over at least one reference data operation request matching the dual-active volume according to the primary volume in the dual-active volume.

[0138] Specifically, the above three methods can be combined to implement the timeout takeover mechanism. After the Abort command times out or retries 3 times and times out, the dual-write mechanism of the dual-active volume will stop, an alarm of "the dual-active volume is out of sync between sites" will be reported, the client will be notified of the abnormal situation of the dual-active device, and the device health status will be deeply investigated. Then, the primary end (primary volume or the site with complete data volume) of the remote replication takes over the service, and the status of the dual-active volume is synchronized to the forwarding module. The IO received by the second end is forwarded by the forwarding module to the primary end for processing.

[0139] The following combines Figure 5 to illustrate the implementation process of a timeout takeover mechanism.

[0140] S502, IO request is sent down; the host sends the IO request to the forwarding module 500. After receiving the IO request, the forwarding module 500 performs preliminary processing.

[0141] Execute the judgment operation S504 to determine whether the IO request needs to be forwarded; in this step, the forwarding module 500 determines whether the IO request needs to be forwarded to the remote replication module 502; if it needs to be forwarded, go to step S506; if it does not need to be forwarded, directly enter the remote replication module 502 for processing.

[0142] Correspondingly, after receiving the IO request, the remote replication module 502 performs remote replication operations.

[0143] S506, the IO request is forwarded to the remote end for processing, and the processing result is returned to the host:

[0144] If the IO request needs to be forwarded, the forwarding module forwards the request to the remote end for processing and returns the processing result to the host.

[0145] Then execute the judgment operation S508 to determine whether the chunk lock application times out and whether writing to the remote end times out.

[0146] In this step, when performing remote replication operations, the remote replication module checks whether the chunk lock application times out and whether the remote write operation times out. If it times out, go to step S512 for timeout retry. If it does not time out, continue with the remote replication operations.

[0147] S510, the read / write request result is returned to the host; after the remote replication module completes the remote replication operations, it returns the result of the read / write request to the host.

[0148] As in judgment step S512, determine whether the timeout retry is successful; if a timeout is detected in step S508, the remote replication module attempts a timeout retry. If the retry is successful, return to step S508 to continue with the remote replication operations. If the retry fails, go to step S514 for dual-active volume status synchronization.

[0149] S514, synchronize the dual-active volume status to the forwarding module; if the timeout retry fails, the remote replication module synchronizes the status of the dual-active volume to the forwarding module for subsequent processing.

[0150] Through the above embodiments of the present application, this technical solution realizes the dual-write function of the dual-active volume by implementing a cross-site chunk lock mechanism, significantly improving the data reliability and system availability.

[0151] Specifically, through the chunk lock synchronization mechanism between the primary volume and the secondary volume, it is ensured that the situation of simultaneously applying for the same chunk lock does not occur at two different sites, thus avoiding potential conflict problems. This mechanism guarantees data consistency and prevents race conditions during data writing.

[0152] In addition, when the primary volume receives a write I / O request from the host, it will synchronize the lock-holding state to the secondary volume to ensure that the data of the secondary volume is consistent with that of the primary volume. When the secondary volume receives a write I / O request, it will apply to the primary volume for an authorized chunk lock, and the primary volume will execute the chunk lock locking process, realizing the dual-write function, that is, data is written to both the primary volume and the secondary volume simultaneously, improving data redundancy and reliability.

[0153] When the dual-active volumes are in an unsynchronized state, the system will decide whether to apply for a chunk lock according to the judgment of the write I / O request in the forwarding module. If the volume at the current site is the latest data, a chunk lock will be applied to avoid conflicts with background data synchronization; if the data at the current site is not the latest, the unsynchronized state will be returned, and the I / O will be forwarded to the primary site of remote replication for processing. This mechanism ensures data consistency and integrity.

[0154] Finally, to address the possible problems of chunk lock application timeout or write data synchronization timeout, the system introduces a timeout retry mechanism, that is, automatically retrying to apply for a chunk lock or synchronize data after a timeout, improving the fault tolerance of the system. At the same time, the system also introduces a mechanism for the primary volume to take over the service, that is, when the secondary volume has problems, the primary volume can take over the service and continue to provide services, ensuring the high availability of the system.

[0155] Through the above implementation manners of the present application, through the cross-site chunk lock and dual-write functions, the reliability of data and the availability of the system are significantly improved. At the same time, through the timeout retry and primary volume takeover mechanisms, the fault tolerance and stability of the system are enhanced.

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

[0157] As Figure 6 shown, the embodiments of the present application also provide a processing device for data operation requests. According to another aspect of the embodiments of the present application, there is also provided a processing device for data operation requests, including:

[0158] A forwarding control module 602, configured to receive a data operation request through the first volume in the dual-active volumes;

[0159] The remote replication module 604 is configured to perform a first locking operation on at least one first data chunk in the first volume and send a synchronization locking request to a second volume that matches the first volume, where the synchronization locking request is used to perform a second locking operation on at least one second data chunk in the second volume, and at least one of the second data chunks corresponds one-to-one with at least one of the first data chunks;

[0160] The remote replication module 604 is further configured to, when the first locking operation and the second locking operation are completed, perform a target data operation that matches the data operation request according to at least one of the first data chunks and send a reference data operation request to the second volume, where the reference data operation request is used to perform the target data operation that matches the data operation request according to at least one of the second data chunks in the second volume;

[0161] The forwarding control module 602 is further configured to, when the target data operation in the first volume and the target data operation in the second volume are completed, return a data operation result that matches the data operation request through the first volume.

[0162] Optionally, the remote replication module 604 is further configured to: obtain synchronization status information that matches at least one of the first data chunks; when the synchronization status information indicates that at least one of the first data chunks has completed data synchronization, obtain locking status information that matches at least one of the first data chunks; when the locking status information indicates that at least one of the first data chunks is in an unlocked state and the data operation request is a data write request, determine to perform a first locking operation on at least one of the first data chunks in the first volume and send the synchronization locking request to the second volume; when the locking status information indicates that at least one of the first data chunks is in an unlocked state and the data operation request is a data read operation, read target object data from at least one of the first data chunks in the first volume; return a data operation result that matches the data operation request according to the target object data; when the locking status information indicates that at least one of the first data chunks is in a locked state, add the data operation request to a request queue that matches at least one of the first data chunks; when at least one of the first data chunks returns to an unlocked state, obtain the historical data operation request with the earliest timestamp from the request queue as the current operation request to be processed that matches at least one of the first data chunks.

[0163] Optionally, the above-mentioned remote replication module 604 is further configured to: when the synchronization status information indicates that at least one of the first data chunks has not completed data synchronization and the object data stored in at least one of the first data chunks is the latest data, perform the above-mentioned first locking operation on at least one of the first data chunks, and send the synchronization locking request to the second volume; when the synchronization status information indicates that at least one of the first data chunks has not completed data synchronization and the object data stored in at least one of the first data chunks is not the latest data, forward the data operation request to the target node.

[0164] Optionally, the above-mentioned remote replication module 604 is configured to: obtain a first status bitmap corresponding to at least one of the first data chunks, where the first status bitmap includes at least one status identification bit corresponding to at least one of the first data chunks respectively, and the status identification bit includes a first status value for indicating the synchronized state and a second status value for indicating the unsynchronized state; determine the above-mentioned synchronization status information matching at least one of the first data chunks according to the first status bitmap; obtain a second status bitmap corresponding to at least one of the first data chunks, where the second status bitmap includes at least one status identification bit corresponding to at least one of the first data chunks respectively, and the status identification bit includes a first status value for indicating the locked state and a second status value for indicating the unlocked state; determine the above-mentioned locking status information matching at least one of the first data chunks according to the second status bitmap.

[0165] Optionally, the above-mentioned remote replication module 604 is further configured to perform at least one of the following:

[0166] When the locking success indication information returned by the second volume is not received within the first duration after sending the synchronization locking request to the second volume, send a locking abort instruction to the second volume; when the second volume stops responding to the synchronization locking request according to the locking abort instruction, resend the synchronization locking request to the second volume;

[0167] When the write success indication information returned by the second volume is not received within the second duration after sending the reference data operation request to the second volume, send a write abort instruction to the second volume; when the second volume stops responding to the reference data operation request according to the write abort instruction, resend the reference data operation request to the second volume.

[0168] Optionally, the above-mentioned remote replication module 604 is further configured to perform at least one of the following:

[0169] Send an alarm message to the client matching the above-mentioned dual-active volume, where the above-mentioned alarm message is used to indicate that the above-mentioned dual-active volume is in an abnormal working state;

[0170] Perform a device detection operation on the above-mentioned dual-active volume;

[0171] Take over at least one reference data operation request matching the above-mentioned dual-active volume according to the primary volume in the above-mentioned dual-active volume.

[0172] Optionally, the above-mentioned remote replication module 604 is further configured to: when the above-mentioned first volume is the primary volume in the above-mentioned dual-active volume, perform a first locking operation on at least one first data block in the above-mentioned first volume, and send a synchronous locking request to a second volume matching the above-mentioned first volume, including: performing the above-mentioned first locking operation on at least one of the above-mentioned first data blocks in the primary volume, and simultaneously sending a first locking request to a secondary volume matching the primary volume; when the above-mentioned first volume is the secondary volume in the above-mentioned dual-active volume, perform a first locking operation on at least one first data block in the above-mentioned first volume, and send a synchronous locking request to a second volume matching the above-mentioned first volume, including: sending the above-mentioned second locking request to the primary volume through the secondary volume; when receiving the locking response information returned by the primary volume, perform the above-mentioned first locking operation on at least one of the above-mentioned first data blocks in the secondary volume.

[0173] For the description of the features in the corresponding embodiments of the processing device of the data operation request, reference can be made to the relevant descriptions in the corresponding embodiments of the processing method of the data operation request, which will not be elaborated here one by one.

[0174] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the processing method of the data operation request. The electronic device may be Figure 1 The terminal device or server shown. This embodiment takes the electronic device as a mobile phone or a computer as an example. As Figure 7 shown, the electronic device includes a memory 702 and a processor 704. A computer program is stored in the memory 702, and the processor 704 is configured to execute the steps in any of the above-mentioned method embodiments through the computer program.

[0175] Optionally, in this embodiment, the above-mentioned electronic device may be at least one network device among multiple network devices in a computer network.

[0176] Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:

[0177] S1, receive a data operation request through the first volume in the dual-active volume;

[0178] S2. Perform a first locking operation on at least one first data block in the first volume, and send a synchronization locking request to a second volume that matches the first volume, where the synchronization locking request is used to perform a second locking operation on at least one second data block in the second volume, and at least one of the second data blocks corresponds one-to-one to at least one of the first data blocks;

[0179] S3. When the first locking operation and the second locking operation are completed, perform a target data operation that matches the data operation request according to at least one of the first data blocks, and send a reference data operation request to the second volume, where the reference data operation request is used to perform the target data operation that matches the data operation request according to at least one of the second data blocks in the second volume;

[0180] S4. When the target data operation in the first volume and the target data operation in the second volume are completed, return a data operation result that matches the data operation request through the first volume.

[0181] Optionally, those of ordinary skill in the art can understand that Figure 7 The structure shown is only schematic, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and terminal devices such as Mobile Internet Devices (MID), PAD, etc. Figure 7 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown Figure 7 in the figure, or have a different configuration from that shown Figure 7 in the figure.

[0182] Among them, the memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data operation request processing method and device in the embodiments of the present application. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, realizes the above-mentioned data operation request processing method. The memory 702 includes the forwarding control module 602 and the remote replication module 604 in the above-mentioned data operation request processing device. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 702 may further include a memory remotely set relative to the processor 704, and these remote memories can be connected to the terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof. This example will not be elaborated further.

[0183] Optionally, the above-mentioned transmission device 706 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one instance, the transmission device 706 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, so as to communicate with the Internet or a local area network. In one instance, the transmission device 706 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

[0184] In addition, the above-mentioned electronic device further includes: a display 708 for displaying the above-mentioned target page; and a connection bus 710 for connecting each module component in the above-mentioned electronic device.

[0185] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above-mentioned data operation request processing method embodiments when running.

[0186] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: USB flash drives, read-only memories (abbreviated as ROM), random access memories (abbreviated as RAM), mobile hard disks, magnetic disks, or optical disks, etc., various media that can store computer programs.

[0187] Embodiments of the present application further provide a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in the embodiments of any of the above-mentioned processing methods for data operation requests.

[0188] Embodiments of the present application further provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in the embodiments of any of the above-mentioned processing methods for data operation requests.

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

[0190] The above has introduced in detail a processing method for data operation requests provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for processing a data operation request, characterized in that Including: Receiving a data operation request through a first volume in a dual-active volume; Performing a first locking operation on at least one first data chunk in the first volume, and sending a synchronization locking request to a second volume matching the first volume, where the synchronization locking request is used to perform a second locking operation on at least one second data chunk in the second volume, and at least one of the second data chunks corresponds one-to-one to at least one of the first data chunks; When the first locking operation and the second locking operation are completed, performing a target data operation matching the data operation request according to at least one of the first data chunks, and sending a reference data operation request to the second volume, where the reference data operation request is used to perform the target data operation matching the data operation request according to at least one of the second data chunks in the second volume; When the target data operation in the first volume and the target data operation in the second volume are completed, returning a data operation result matching the data operation request through the first volume.

2. The method according to claim 1, wherein: Before performing the first locking operation on at least one first data chunk in the first volume and sending a synchronization locking request to a second volume matching the first volume, further including: Obtaining synchronization status information matching at least one of the first data chunks; When the synchronization status information indicates that data synchronization of at least one of the first data chunks has been completed, obtaining locking status information matching at least one of the first data chunks; When the locking status information indicates that at least one of the first data chunks is in an unlocked state and the data operation request is a data write request, determining to perform a first locking operation on at least one of the first data chunks in the first volume and sending the synchronization locking request to the second volume; When the locking status information indicates that at least one of the first data chunks is in an unlocked state and the data operation request is a data read operation, reading target object data from at least one of the first data chunks in the first volume; returning the data operation result matching the data operation request according to the target object data; When the locking status information indicates that at least one of the first data chunks is in a locked state, adding the data operation request to a request queue matching at least one of the first data chunks; when at least one of the first data chunks returns to an unlocked state, obtaining the historical data operation request with the earliest timestamp from the request queue as the current operation request to be processed matching at least one of the first data chunks.

3. The method according to claim 2, wherein: After obtaining the synchronization status information matching at least one of the first data chunks, further including: When the synchronization status information indicates that at least one of the first data chunks has not completed data synchronization and the object data stored in at least one of the first data chunks is the latest data, perform the first locking operation on at least one of the first data chunks and send the synchronization locking request to the second volume; When the synchronization status information indicates that at least one of the first data chunks has not completed data synchronization and the object data stored in at least one of the first data chunks is not the latest data, forward the data operation request to the target node.

4. The method according to claim 2, wherein: The obtaining the synchronization status information matching at least one of the first data chunks includes: Obtaining a first status bitmap corresponding to at least one of the first data chunks, wherein the first status bitmap includes at least one status flag bit corresponding to at least one of the first data chunks respectively, and the status flag bit includes a first status value for indicating a synchronized state and a second status value for indicating an unsynchronized state; determining the synchronization status information matching at least one of the first data chunks according to the first status bitmap; The obtaining the locking status information matching at least one of the first data chunks includes: Obtaining a second status bitmap corresponding to at least one of the first data chunks, wherein the second status bitmap includes at least one status flag bit corresponding to at least one of the first data chunks respectively, and the status flag bit includes a first status value for indicating a locked state and a second status value for indicating an unlocked state; determining the locking status information matching at least one of the first data chunks according to the second status bitmap.

5. The method according to claim 1, wherein: After receiving the data operation request through the first volume in the dual-active volume, at least one of the following is further included: When the locking success indication information returned by the second volume is not received within the first duration after sending the synchronization locking request to the second volume, send a locking abort instruction to the second volume; When the second volume stops responding to the synchronization locking request according to the locking abort instruction, resend the synchronization locking request to the second volume; When the write success indication information returned by the second volume is not received within the second duration after sending the reference data operation request to the second volume, send a write abort instruction to the second volume; When the second volume stops responding to the reference data operation request according to the write abort instruction, resend the reference data operation request to the second volume.

6. The method according to claim 5, wherein: When the number of retransmission operations is greater than or equal to the target number, and / or, the response duration of the abort instruction is greater than or equal to the target duration, at least one of the following is further included: Sending an alarm message to the client matching the dual-active volume, wherein the alarm message is used to indicate that the dual-active volume is in an abnormal working state; Performing a device detection operation on the dual-active volume; Operate on at least one reference data operation request that matches the primary volume in the dual-active volume.

7. The method according to claim 1, wherein when the first volume is the primary volume in the dual-active volume, the performing a first locking operation on at least one first data block in the first volume and sending a synchronous locking request to a second volume that matches the first volume includes: performing the first locking operation on at least one of the first data blocks in the primary volume, and simultaneously sending a first locking request to a secondary volume that matches the primary volume; when the first volume is the secondary volume in the dual-active volume, the performing a first locking operation on at least one first data block in the first volume and sending a synchronous locking request to a second volume that matches the first volume includes: sending the second locking request to the primary volume through the secondary volume; and when receiving the locking response information returned by the primary volume, performing the first locking operation on at least one of the first data blocks in the secondary volume.

8. A processing device for a data operation request, characterized in that, Comprising: A forwarding control module, configured to receive a data operation request through a first volume in a dual-active volume; A remote replication module, configured to perform a first locking operation on at least one first data block in the first volume and send a synchronous locking request to a second volume that matches the first volume, wherein the synchronous locking request is used to perform a second locking operation on at least one second data block in the second volume, and at least one of the second data blocks corresponds to at least one of the first data blocks one by one; The remote replication module is further configured to, when the first locking operation and the second locking operation are completed, perform a target data operation that matches the data operation request according to at least one of the first data blocks and send a reference data operation request to the second volume, wherein the reference data operation request is used to perform the target data operation that matches the data operation request according to at least one of the second data blocks in the second volume; The forwarding control module is further configured to, when the target data operation in the first volume and the target data operation in the second volume are completed, return a data operation result that matches the data operation request through the first volume.

9. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of the method according to any one of claims 1 to 7 when executing the computer program.

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

Citation Information

Cited By

  • Data processing method and electronic equipment

    CN120743570A

  • Data processing method and system based on block chain, and related product

    CN121029886A