Range lock obtaining method, device and system and computer readable storage medium
By directly acquiring the range lock corresponding to the range lock type, using the multi-level search structure to quickly judge the intersection of intervals, the problem of low range lock acquisition efficiency caused by red and black tree traversal is solved, and efficient range lock acquisition in concurrent scenarios is achieved.
Patent Information
- Application Number
- CN202310626935.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, when the red and black tree manages range locks, as the number of acquired range locks increases, the time to traverse the red and black tree structure also increases, resulting in low efficiency in acquiring range locks, especially in more concurrent read and write operations. In the scenario, the delay of acquiring a range lock increases rapidly.
By directly obtaining the range lock corresponding to the type of the range lock, determine whether its intervals intersect, without traversing all acquired range locks, use a multi-level search structure to quickly determine the adjacent points, improve the efficiency of interval intersect judgment, and thus improve the acquisition of range locks efficiency.
In scenarios with high concurrent read and write operations, the acquisition efficiency of range locks is improved, the delay of acquiring range locks is shortened, and the processing time is stabilized. It is suitable for a variety of devices and scenarios.
Smart Images

Figure CN119066039A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, system and computer-readable storage medium for acquiring a range lock. Background Art
[0002] In a distributed system, there are multiple clients that concurrently read and write to the same file. To ensure file consistency, it is usually necessary to obtain the lock corresponding to the operation before operating the file data, use the lock to lock the data in the file, and then perform the operation on the locked data. In order to improve the efficiency of lock acquisition, thereby improving the efficiency of data locking, and adapt to scenarios with more concurrent read and write access, range locks, a type of lock with flexible length that can lock the data in the file by interval, came into being.
[0003] In the related art, a red-black tree (RBTree) is used to manage range locks. Each node of the red-black tree represents a range lock, and the acquired range locks are associated together through the structure of the red-black tree. When a new range lock is to be acquired, the red-black tree is traversed from the root node to check whether the new range lock to be acquired conflicts with the acquired range lock. If there is no conflict, a new range lock is acquired.
[0004] However, since the structure of the red-black tree needs to be traversed when acquiring a new range lock, as the number of acquired range locks increases, the time required to traverse the structure of the red-black tree increases, resulting in low efficiency in acquiring range locks. Summary of the invention
[0005] The present application proposes a range lock acquisition method, device, system and computer-readable storage medium, which are used to improve the efficiency of acquiring range locks.
[0006] In a first aspect, a method for acquiring a range lock is provided, the method comprising: a first device acquires a first message sent by a second device, the first message being used to request acquisition of a first range lock, the first message comprising a type and an interval of the first range lock, the first range lock being used to lock distributed stored data; then, the first device acquires a second range lock corresponding to the type of the first range lock, and determines whether the interval of the first range lock intersects with the interval of the second range lock; based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, the first device sends a second message to the second device, the second message being used to instruct the second device to acquire the first range lock.
[0007] In this method, after obtaining the message for requesting the range lock, the first device directly obtains the range lock corresponding to the type of the range lock, and then determines whether the intervals intersect, without traversing the fixed range locks from all the acquired range locks, thereby obtaining the range lock more efficiently.
[0008] In a possible implementation, the interval of the first range lock includes a first endpoint and a second endpoint, and the first endpoint, the second endpoint, and the endpoints included in the interval of the second range lock are represented by numerical values. In this case, determining whether the interval of the first range lock intersects with the interval of the second range lock includes: obtaining a first adjacent point and a second adjacent point of the first endpoint from the endpoints included in the interval of the second range lock, the first adjacent point being the endpoint with the largest value among at least one first reference endpoint, the value of the first reference endpoint being smaller than the value of the first endpoint, and the second adjacent point being the endpoint with the smallest value among at least one second reference endpoint, the value of the second reference endpoint being larger than the value of the first endpoint; and determining whether the interval of the first range lock intersects with the interval of the second range lock based on the first adjacent point, the second adjacent point, and the second endpoint.
[0009] That is, the first adjacent point and the second adjacent point are endpoints located on both sides of the first endpoint among the endpoints included in the interval of the second range lock, so when determining whether the interval of the first range lock intersects with the interval of the second range lock based on the first adjacent point, the second adjacent point and the second endpoint, it can be determined whether the interval of the first range lock intersects with the interval of the second range lock based on the second range lock where the first adjacent point is located, the second range lock where the second adjacent point is located, and whether there is a second range lock whose interval includes the interval of the first range lock. The number of second range locks used to determine whether the intervals intersect is small, and the determination efficiency is high, thereby improving the efficiency of acquiring range locks.
[0010] In a possible implementation, there are multiple second range locks, and whether the interval of the first range lock intersects with the interval of the second range lock is determined according to the first adjacent point, the second adjacent point, and the second endpoint, including: when the value of the second endpoint is greater than the value of the first endpoint, based on the fact that the first adjacent point is the fourth endpoint included in the interval of one second range lock, the second adjacent point is the fifth endpoint included in the interval of another second range lock, the value of the second endpoint is less than the value of the second adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks, it is determined that the interval of the first range lock does not intersect with the intervals of the multiple second range locks.
[0011] The interval including the fourth endpoint also includes the third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, the interval including the fifth endpoint also includes the sixth endpoint, the value of the fifth endpoint is smaller than the value of the sixth endpoint. That is, this method is applicable to the case where the first endpoint is the endpoint located on the left side of the endpoints included in the interval of the first range lock, and the second endpoint is the endpoint located on the right side of the endpoints included in the interval of the first range lock.
[0012] In a possible implementation, there are multiple second range locks, and whether the interval of the first range lock intersects with the interval of the second range lock is determined according to the first adjacent point, the second adjacent point, and the second endpoint, including: when the value of the second endpoint is smaller than the value of the first endpoint, based on the fact that the first adjacent point is the fourth endpoint included in the interval of one second range lock, the second adjacent point is the fifth endpoint included in the interval of another second range lock, the value of the second endpoint is larger than the value of the first adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks, it is determined that the interval of the first range lock does not intersect with the intervals of the multiple second range locks.
[0013] Among them, the interval including the fourth endpoint also includes the third endpoint, and the value of the third endpoint is smaller than the value of the fourth endpoint. The interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint. In other words, this method is applicable to the case where the first endpoint is the endpoint located on the right side of the endpoints included in the interval of the first range lock, and the second endpoint is the endpoint located on the left side of the endpoints included in the interval of the first range lock, and the relative positions of the first endpoint and the second endpoint are relatively flexible.
[0014] In one possible implementation, the first device stores a multi-level search structure corresponding to the type, and the endpoints included in the interval of the second range lock are stored in the multi-level search structure; obtaining the first adjacent point and the second adjacent point of the first endpoint from the endpoints included in the interval of the second range lock includes: searching the multi-level search structure to obtain the first adjacent point and the second adjacent point of the first endpoint.
[0015] In this method, when the endpoints of the interval of the second range lock are included in a multi-level search structure corresponding to the type, the values of multiple bit positions at the lower layer can be quickly determined based on the values of the bit positions at the upper layer in the multi-level search structure, thereby being able to more quickly narrow the range of the bit positions where the first adjacent point and the second adjacent point of the first endpoint are located, and the efficiency of searching the first adjacent point and the second adjacent point of the first endpoint based on the multi-level search structure is high.
[0016] In a possible implementation, after sending the second message to the second device, the method further includes: the first device adds the first endpoint and the second endpoint to the multi-level search structure. The method can add the endpoint of the first range lock to the multi-level search structure, so that the endpoint of the first range lock can be used to determine whether the range lock can be acquired.
[0017] In a possible implementation, after adding the first endpoint and the second endpoint to the multi-level search structure, the method further includes: the first device obtains a third message sent by the second device, the third message is used to request the release of the first range lock, and the third message includes the type of the first range lock, the first endpoint and the second endpoint; the first device obtains the multi-level search structure corresponding to the type; the first device deletes the first endpoint and the second endpoint from the multi-level search structure. When the first range lock is released, the method can delete the endpoint of the first range lock from the multi-level search structure, so that the situation of the endpoint included in the multi-level search structure is consistent with the situation of the second range lock corresponding to the type.
[0018] In a possible implementation, based on the first range lock being a range lock with intersecting intervals, the second range lock includes range locks with non-intersecting intervals acquired before the first range lock; or based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock. This method can be applied to different types of first range locks, and thus has a wide range of applications.
[0019] In a possible implementation, the first device is any one of a switch, a server, a device including a field programmable gate array (FPGA), a device including a smart network interface card (Smart NIC), or a device including a data processing unit (DPU), and the second device is a client. This method can be applied to the case where a variety of devices are used as the first device, and has a wide range of uses. Furthermore, in the case where the first device is any one of a switch, a device including an FPGA, a device including a smart network interface card, or a device including a DPU, no matter how many messages for requesting a range lock are received by the first device, the time for the first device to process these messages is basically the same. Therefore, in a scenario with a high number of concurrent read and write operations, the duration of the first device executing the method is relatively stable. In the case where the execution time of the method is short, the delay in obtaining the range lock is short and the efficiency is high.
[0020] In a second aspect, a method for acquiring a range lock is provided, the method comprising: a second device sends a first message to a first device, the first message is used to request acquisition of a first range lock, the first message includes a type and an interval of the first range lock, and the first range lock is used to lock distributed stored data; the second device receives a second message sent by the first device, and acquires the first range lock based on the second message, wherein the second message is sent by the first device based on the interval of the first range lock and the interval of the second range lock corresponding to the type do not intersect.
[0021] In this method, after obtaining the message for requesting the range lock, the first device directly obtains the range lock corresponding to the type of the range lock, and then determines whether the intervals intersect, without traversing the fixed range locks among all the acquired range locks, so that the efficiency of determining whether the intervals intersect is higher. In this case, the time from the second device sending the first message to receiving the second message is shorter, and the efficiency of obtaining the range lock is higher.
[0022] In a possible implementation, after acquiring the first range lock, the method further includes: the second device sends a third message to the first device, the third message is used to request the release of the first range lock, and the third message includes the type and interval of the first range lock. The second device can request the release of the first range lock, so that after the first range lock is released, the first range lock can be reacquired by other devices, and then the distributed stored data is operated based on the first range lock.
[0023] In a possible implementation, based on the first range lock being a range lock with intersecting intervals, the second range lock includes range locks with non-intersecting intervals acquired before the first range lock; or based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock. This method can be applied to different types of first range locks, and thus has a wide range of applications.
[0024] In one possible implementation, the first device is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device is a client. This method can be applied to the case where a variety of devices are used as the first device, and has a wide range of uses. Furthermore, in the case where the first device is any one of a switch, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, no matter how many messages for requesting a range lock are received by the first device, the time taken by the first device to process these messages is basically the same. Therefore, in a scenario with a high number of concurrent read and write operations, the duration of the execution of the method by the first device is relatively stable. When the execution time of the method is short, the delay in obtaining the range lock is short, and the efficiency is high.
[0025] In a third aspect, a range lock acquisition device is provided, the device is applied to a first device, and the device includes:
[0026] A first acquisition module, used to acquire a first message sent by a second device, the first message is used to request to acquire a first range lock, the first message includes a type and a range of the first range lock, and the first range lock is used to lock distributed storage data;
[0027] A second acquisition module, used to acquire a second range lock corresponding to the type of the first range lock;
[0028] A determination module, used to determine whether the interval of the first range lock intersects with the interval of the second range lock;
[0029] The sending module is used to send a second message to the second device based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, wherein the second message is used to instruct the second device to acquire the first range lock.
[0030] In a possible implementation, the interval of the first range lock includes a first endpoint and a second endpoint, and the first endpoint, the second endpoint, and the endpoints included in the interval of the second range lock are represented by numerical values; a determination module is used to obtain a first adjacent point and a second adjacent point of the first endpoint from the endpoints included in the interval of the second range lock, the first adjacent point being an endpoint with the largest numerical value among at least one first reference endpoint, and the numerical value of the first reference endpoint is smaller than the numerical value of the first endpoint, and the second adjacent point is an endpoint with the smallest numerical value among at least one second reference endpoint, and the numerical value of the second reference endpoint is larger than the numerical value of the first endpoint; based on the first adjacent point, the second adjacent point, and the second endpoint, determine whether the interval of the first range lock intersects with the interval of the second range lock.
[0031] In a possible implementation, there are multiple second range locks, and the determination module is used to determine that the interval of the first range lock does not intersect with the intervals of the multiple second range locks based on the fact that the first adjacent point is a fourth endpoint included in the interval of one second range lock, the second adjacent point is a fifth endpoint included in the interval of another second range lock, the value of the second endpoint is smaller than the value of the second adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks, when the value of the second endpoint is greater than the value of the first endpoint; wherein the interval including the fourth endpoint also includes the third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, and the interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint.
[0032] In a possible implementation, there are multiple second range locks, and the determination module is used to determine that the interval of the first range lock does not intersect with the intervals of the multiple second range locks based on the fact that the first adjacent point is a fourth endpoint included in the interval of one second range lock, the second adjacent point is a fifth endpoint included in the interval of another second range lock, the value of the second endpoint is greater than the value of the first adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks, when the value of the second endpoint is smaller than the value of the first endpoint; wherein the interval including the fourth endpoint also includes the third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, and the interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint.
[0033] In a possible implementation, the first device stores a multi-level search structure corresponding to the type, and the endpoints included in the interval of the second range lock are stored in the multi-level search structure; the determination module is used to search the multi-level search structure to obtain the first adjacent point and the second adjacent point of the first endpoint.
[0034] In a possible implementation, the determination module is further configured to add the first endpoint and the second endpoint to a multi-level search structure.
[0035] In a possible implementation, the first acquisition module is also used to obtain a third message sent by the second device, the third message is used to request the release of the first range lock, and the third message includes the type of the first range lock, the first endpoint, and the second endpoint; the determination module is also used to obtain a multi-level search structure corresponding to the type; and delete the first endpoint and the second endpoint from the multi-level search structure.
[0036] In one possible implementation, based on the first range lock being a range lock with intersecting intervals, the second range lock includes range locks with non-intersecting intervals acquired before the first range lock; or, based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock.
[0037] In a possible implementation, the first device is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device is a client.
[0038] In a fourth aspect, a range lock acquisition device is provided, the device is applied to a second device, and the device includes:
[0039] A sending module, configured to send a first message to a first device, wherein the first message is used to request a first range lock, the first message includes a type and a range of the first range lock, and the first range lock is used to lock distributed stored data;
[0040] A first acquisition module is used to receive a second message sent by the first device, where the second message is sent by the first device based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock corresponding to the type;
[0041] The second acquisition module is used to acquire the first range lock based on the second message.
[0042] In a possible implementation, the sending module is further used to send a third message to the first device, where the third message is used to request the release of the first range lock, and the third message includes the type and range of the first range lock.
[0043] In one possible implementation, based on the first range lock being a range lock with intersecting intervals, the second range lock includes range locks with non-intersecting intervals acquired before the first range lock; or, based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock.
[0044] In a possible implementation, the first device is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device is a client.
[0045] In a fifth aspect, a range lock acquisition system is provided, the system comprising a first device and a second device, the first device being used to execute any range lock acquisition method in the first aspect, and the second device being used to execute any range lock acquisition method in the second aspect.
[0046] In a sixth aspect, a computer system is provided, the computer system comprising a processor, and when the processor executes a program instruction or code, the computer system implements any method for acquiring a range lock in the first aspect, or any method for acquiring a range lock in the second aspect. Exemplarily, the computer system also includes a memory, and the memory is used to store the program instruction or code.
[0047] In the seventh aspect, a computer-readable storage medium is provided, in which at least one program instruction or code is stored. When the program instruction or code is loaded and executed by a processor, the computer implements any method for acquiring a range lock in the first aspect, or any method for acquiring a range lock in the second aspect.
[0048] In an eighth aspect, a communication device is provided, the device comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals, and when the processor executes the instructions stored in the memory, the processor executes any range lock acquisition method in the first aspect, or any range lock acquisition method in the second aspect.
[0049] Illustratively, there are one or more processors and one or more memories.
[0050] For example, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0051] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0052] In the ninth aspect, a computer program or a computer program product is provided, the computer program or the computer program product comprising: a computer program code, when the computer program code is executed by a computer, the computer executes any method for acquiring a range lock in the first aspect, or any method for acquiring a range lock in the second aspect.
[0053] In the tenth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory; when the chip is installed in a first device, the first device executes any method for acquiring a range lock in the first aspect; and when the chip is installed in a second device, the second device executes any method for acquiring a range lock in the second aspect.
[0054] Exemplarily, the chip further includes: an input interface, an output interface and the memory, and the input interface, the output interface, the processor and the memory are connected via an internal connection path.
[0055] It should be understood that the beneficial effects achieved by the technical solutions of the third to tenth aspects of the present application and the corresponding possible implementation methods can be referred to the above-mentioned technical effects of the first and second aspects and their corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a schematic diagram of a plurality of clients initiating write requests to distributedly stored files provided in an embodiment of the present application;
[0057] Figure 2 It is a structural diagram of a red-black tree;
[0058] Figure 3 It is a schematic diagram of the structure of a network lock system;
[0059] Figure 4 It is a schematic diagram of an implementation environment of a method for acquiring a range lock provided in an embodiment of the present application;
[0060] Figure 5 It is a schematic diagram of an implementation environment of another range lock acquisition method provided in an embodiment of the present application;
[0061] Figure 6 It is a schematic diagram of an implementation environment of another range lock acquisition method provided in an embodiment of the present application;
[0062] Figure 7 is a flow chart of a method for acquiring a range lock provided in an embodiment of the present application;
[0063] Figure 8 This is a schematic diagram of the structure of a first message provided in an embodiment of the present application;
[0064] Fig. 9 This is a schematic diagram of a process for obtaining a range lock provided by an embodiment of the present application;
[0065] Fig.10 This is a schematic diagram of an arrangement of endpoints provided in an embodiment of the present application;
[0066] Fig.11 is a schematic diagram of a bitmap structure provided in an embodiment of the present application;
[0067] Fig.12 This is a schematic diagram of the positions of a first endpoint, a second endpoint, a first adjacent point, and a second adjacent point provided in an embodiment of the present application;
[0068] Fig.13 This is another schematic diagram of a process for obtaining a range lock provided in an embodiment of the present application;
[0069] Fig.14 It is a structural schematic diagram of a range lock acquisition device provided in an embodiment of the present application;
[0070] Fig.15 It is a structural schematic diagram of another range lock acquisition device provided in an embodiment of the present application;
[0071] Fig.16 is a schematic diagram of the structure of a computer system provided in an embodiment of the present application;
[0072] Fig.17It is a structural diagram of another computer system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The terms used in the implementation method of this application are only used to explain the embodiments of this application, and are not intended to limit this application. The embodiments of this application are described below in conjunction with the accompanying drawings.
[0074] In a distributed system, there are multiple clients that initiate read access and / or write access to the same file or database in distributed storage at the same time. Read access is also called read operation, and write access is also called write operation. Read operation is used to read data in a file, and write operation is used to modify data in a file. Read operations and write operations are collectively referred to as read-write operations. Read and write operations initiated simultaneously on the same file or the same database are called concurrent read-write operations. There are a large number of concurrent read and write operations in a distributed system. These concurrent read and write operations may cause data inconsistency by reading or modifying the same data in the same file or database.
[0075] For example, a distributedly stored file 1 is stored in storage device 1, storage device 2, and storage device 3 of a distributed system at the same time. When client 1 and client 2 in the distributed system simultaneously initiate write operations on file 1, if the write operation initiated by client 1 is performed on file 1 stored in storage device 1, and the write operation initiated by client 2 is performed on file 1 stored in storage device 2, the contents written by the write operation initiated by client 1 and the write operation initiated by client 2 are different, and the file 1 stored in storage device 1, storage device 2, and storage device 3 will be inconsistent.
[0076] In order to ensure the consistency of data, distributed locks come into being. When it is necessary to perform a read operation or a write operation on the distributed stored data, obtain the distributed lock corresponding to the read operation or the write operation. Then, the data is locked using the distributed lock so that the object will not be modified by other write operations, and then the read operation or the write operation is performed to ensure the consistency of the data. In an embodiment of the present application, the data includes but is not limited to files, blocks when storing files in blocks, tables in a database, or records in a table.
[0077] Among various types of distributed locks, range locks have flexible lengths and can lock data within a range, so using range locks to lock data within a range is more efficient. Figure 1 Schematic diagram of multiple clients initiating write requests to distributed storage files provided by an embodiment of the present application. Figure 1, client 1 initiates a write operation on 0 to 4 kilobytes (KB) of file 1, 0 to 4KB is represented by [0, 4K], client 2 initiates a write operation on 9KB to 60 megabytes (MB) of file 1, 9KB to 60MB is represented by [9K, 60M], and client 3 initiates a write operation on 70MB to 100MB of file 1, 70MB to 100MB is represented by [70M, 100M].
[0078] The interval of range lock 1 obtained by client 1 can be [0, 1], the interval of range lock 2 obtained by client 2 can be [2, 15K], and the interval of range lock 3 obtained by client 3 can be [16K, 25K]. The granularity of range lock 1, range lock 2 and range lock 3 is 4KB. The granularity of range lock refers to how much data is locked by a value in the interval of range lock. When the granularity of range lock is 4KB, a value in the interval of range lock is used to lock 4KB of data. Therefore, range lock 1 can be used to lock data of [0, 4K], range lock 2 can be used to lock data of [9K, 60M], and range lock 3 can be used to lock data of [70M, 100M].
[0079] In a related technology, a red-black tree is used to manage range locks, each node of the red-black tree represents a range lock, and multiple acquired range locks are associated together through the structure of the red-black tree. Figure 2 It is a structural diagram of a red-black tree, such as Figure 2 As shown, each node of the red-black tree also includes the type of range lock. When a new range lock needs to be acquired, traverse from the root node of the red-black tree to check whether the new range lock to be acquired conflicts with the acquired range lock. If there is no conflict, acquire a new range lock.
[0080] See also Figure 2, when a new range lock needs to be acquired, traverse from the range lock [50, 70]. If the type of the new range lock is a shared range lock, and the interval of this range lock does not intersect with the intervals of all exclusive range locks in the red-black tree, this range lock does not conflict with the acquired range lock; if the interval of this range lock intersects with the interval of any exclusive range lock in the red-black tree, this range lock conflicts with the acquired range lock. If the type of the new range lock is an exclusive range lock, and the interval of this range lock does not intersect with the intervals of all exclusive range locks and all shared range locks in the red-black tree, this range lock does not conflict with the acquired range lock; if this range lock intersects with the interval of any exclusive range lock or any shared range lock in the red-black tree, this range lock conflicts with the acquired range lock.
[0081] However, since it is necessary to traverse the red-black tree from the root node when acquiring a new range lock, as the number of acquired range locks increases, the time to traverse the red-black tree increases, resulting in a low efficiency in acquiring new range locks. Furthermore, in the related art, the red-black tree is traversed by a central processing unit (CPU). As concurrent read and write operations increase, the CPU load increases rapidly, resulting in a rapid increase in the delay in acquiring range locks. In addition, due to the complex structure of the red-black tree, it is difficult to improve the efficiency of acquiring range locks by unloading the structure of the red-black tree to hardware.
[0082] In another related technology, a netlock system (netlock) is used to manage range locks. Figure 3 This is a schematic diagram of the structure of a network lock system, see Figure 3 The top of rack switch (TOR switch) and the lock manager both store a lock table, which stores the correspondence between objects and locks. For a certain object, the lock corresponding to the object can be obtained by searching the lock table. The top of rack switch also stores routing information. The top of rack switch communicates with multiple lock managers and multiple database servers. An object can be a file, a block when storing a file in the form of blocks, a table in a database, or a record in a table.
[0083] The request message sent by the client is forwarded to the lock manager through the top-of-rack switch. The request message is used to obtain the lock corresponding to a certain object. The top-of-rack switch can parse the content of the request message. If the lock table of the top-of-rack switch includes the correspondence between the object and the lock, the top-of-rack switch intercepts the request message and sends a response message to the client. The response message indicates that the lock is successfully acquired. However, the lock table in the network lock system stores the correspondence between objects and locks in units of objects. For multiple objects, the client needs to send multiple requests to obtain the locks corresponding to multiple objects, and the efficiency of acquiring locks is low.
[0084] The embodiment of the present application provides a method for acquiring a range lock, which is used to improve the efficiency of acquiring a range lock. The method can be applied to Figure 4 The implementation environment shown is shown in Figure 4 , the implementation scenario includes a distributed system, the distributed system includes a first device 101 and a second device 102, and the first device 101 and the second device 102 are connected in communication. The first device 101 and the second device 102 can be connected in communication via a wired or wireless network, which is not limited in the embodiments of the present application. Exemplarily, the first device 101 is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device 102 is a client.
[0085] Exemplarily, the first device 101 obtains a first message sent by the second device 102, the first message is used to request a first range lock, the first message includes a type and an interval of the first range lock, and the first range lock is used to lock distributed stored data; then, the first device 101 obtains a second range lock corresponding to the type of the first range lock; thereafter, the first device 101 determines whether the interval of the first range lock intersects with the interval of the second range lock; based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, the first device 101 sends a second message to the second device 102, and the second message is used to instruct the second device 102 to obtain the first range lock.
[0086] Afterwards, the first device 101 may obtain the first range lock and use the first range lock to lock the distributed stored data. The second device 102 obtains the first range lock based on the second message, and then the second device 102 may operate on the data according to the first range lock.
[0087] The types of range locks include range locks with intersecting intervals and range locks with non-intersecting intervals. Range locks with intersecting intervals are also called shared range locks, and range locks with non-intersecting intervals are also called exclusive range locks. Among them, the interval of a shared range lock can be occupied by at least one range lock, and the interval of an exclusive range lock can only be occupied by one range lock. A shared range lock corresponds to a read operation. When a shared range lock is used to lock data, the data corresponding to the interval of this shared range lock can also be locked by other shared range locks, but cannot be locked by an exclusive range lock. An exclusive range lock corresponds to a write operation. When an exclusive range lock is used to lock data, the data corresponding to the interval of this exclusive range lock cannot be locked by other exclusive range locks or other shared range locks. For example, the first range lock is a range lock with intersecting intervals, that is, the first range lock is a shared range lock, and the second device 102 performs a read operation on the data. For another example, the first range lock is a range lock with non-intersecting intervals, that is, the first range lock is an exclusive range lock, and the second device 102 performs a write operation on the data.
[0088] Figure 4 The distributed system shown may be a distributed file system. For example, the implementation environment of the method is as follows: Figure 5 See Figure 5 The implementation environment also includes multiple storage devices 103, multiple storage devices 103 are communicatively connected, and multiple storage devices 103 are used to store files, that is, in Figure 5 In the illustrated implementation environment, the distributed stored data includes distributed stored files. Figure 4 The distributed system shown may also be a distributed database. For example, the implementation environment of the method is as follows: Figure 6 See Figure 6 The implementation environment also includes multiple database servers 104, multiple database servers 104 are connected in communication, and multiple database servers 104 are used to store tables, that is, in Figure 6 In the illustrated implementation environment, the distributed storage data includes distributed storage tables.
[0089] The method for obtaining the range lock provided in the embodiment of the present application can be as follows: Figure 7 As shown, next, combined Figure 4 The implementation scenario shown in FIG. Figure 7 As shown, the method includes but is not limited to S701 to S707.
[0090] S701, the second device sends a first message to the first device, where the first message is used to request a first range lock, and the first message includes a type and a range of the first range lock, where the first range lock is used to lock distributed stored data.
[0091] Exemplarily, the first device is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device is a client. In a possible implementation, when the second device needs to obtain a first range lock to operate on distributed stored data, the second device generates a first message and sends the first message to the first device.
[0092] Figure 8 This is a schematic diagram of the structure of a first message provided in an embodiment of the present application, see Figure 8 , the first message includes a communication protocol header, an operation (OP) field, a response code (Res Code) field, a lock type (lock type) field, a client identifier (client ID) field, a start (start) field, and an end (end) field. Among them, the communication protocol header includes type indication information, and the type indication information is used to indicate that the first message is a message for acquiring or releasing a range lock. For example, the communication protocol header is a message header, and the first message is a message using the user datagram protocol (UDP) protocol. In this case, the type indication information includes a destination port number. When the destination port number is a reference port number, the first message is a message for acquiring or releasing a range lock. The reference port number can be determined based on experience or actual needs, and the embodiments of the present application do not limit this.
[0093] The operation field is used to indicate the type of request, which includes but is not limited to a request to acquire a range lock or a request to release a range lock. For example, when the value of the operation field is the first value, the type of request is a request to acquire a range lock, and when the value of the operation field is the second value, the type of request is a request to release a range lock. The first value and the second value can be determined according to actual needs, for example, the first value is 1 and the second value is 0.
[0094] The response code field is used to indicate whether the request is successful. The value of the response code field is modified by the first device after determining whether the first range lock is successfully acquired or failed. For example, in the case where the first range lock is successfully acquired, the first device sets the value of the response code field to the third value. In the case where the first range lock fails to be acquired, the first device sets the value of the response code field to the fourth value. The third value and the fourth value can be determined according to actual needs, for example, the third value is 1 and the fourth value is 0. In the first message, the value of the response code field can be empty. The lock type field is used to indicate the type of the first range lock. The type of the first range lock includes but is not limited to any one of a shared range lock or an exclusive range lock. For example, when the value of the lock type field is the fifth value, the first range lock is a shared range lock, and when the value of the lock type field is the sixth value, the first range lock is an exclusive range lock. The fifth value and the sixth value can be determined according to actual needs, for example, the fifth value is 1 and the sixth value is 0.
[0095] The client identifier field is used to indicate the second device, so that after the first device determines that the first range lock is successfully acquired or failed to acquire, it can determine the second device according to the client identifier field and send a second message to the second device. Exemplarily, the start field and the end field are used together to indicate the interval of the first range lock, for example, the interval of the first range lock includes a first endpoint and a second endpoint, and the first endpoint and the second endpoint are both represented by numerical values. In an embodiment of the present application, the endpoints included in the interval refer to the starting point and the ending point of the interval, rather than the point between the starting point and the ending point. In the case where the numerical value of the first endpoint is less than the second endpoint, the start field includes the numerical value of the first endpoint, so that the start field is used to indicate the first endpoint of the first range lock, in which case, the first endpoint is also called the left endpoint of the interval of the first range lock or the starting point of the interval of the first range lock; the end field includes the numerical value of the second endpoint, so that the end field is used to indicate the second endpoint of the first range lock, in which case, the second endpoint is also called the right endpoint of the interval of the first range lock or the end point of the interval of the first range lock.
[0096] In the case where the value of the first endpoint is greater than the second endpoint, the start field includes the value of the second endpoint, so that the start field is used to indicate the second endpoint of the first range lock, in which case the second endpoint is also called the left endpoint of the interval of the first range lock or the starting point of the interval of the first range lock; the end field includes the value of the first endpoint, so that the end field is used to indicate the first endpoint of the first range lock, in which case the second endpoint is called the right endpoint of the interval of the first range lock or the ending point of the interval of the first range lock. In an embodiment of the present application, the interval of the first range lock corresponds to the interval of the data to be operated, for example, the first endpoint corresponds to the starting point of the reference data, and the second endpoint corresponds to the ending point of the reference data, so that the first range lock can be used to lock the data to be operated. The data to be operated is distributed stored data, and the data to be operated includes but is not limited to data in a file or data in a table stored in a database.
[0097] Fig. 9 is a schematic diagram of a process of obtaining a range lock provided by an embodiment of the present application. The operation of the second device generating the first message can be as follows Fig. 9 The illustrated second device performs a message generation operation. The embodiment of the present application does not limit the manner in which the second device sends the first message to the first device.
[0098] S702: The first device obtains a first message sent by the second device.
[0099] The embodiment of the present application does not limit the manner in which the first device obtains the first message sent by the second device, and can correspond to the manner in which the second device sends the first message to the first device. For example, when the second device sends the first message to the first device via a wireless network, the first device receives the first message via the wireless network.
[0100] S703: The first device obtains a second range lock corresponding to the type of the first range lock.
[0101] In a possible implementation, after the first device obtains the message, it identifies the message, and if the message is a message for obtaining or releasing a range lock, it executes S703, and if the message is not a message for obtaining or releasing a range lock, it performs other processing on the message. For example, after the first device obtains the first message, it identifies the message header of the first message, and if it identifies that the first message is a message for obtaining or releasing a range lock, it executes S703. The operation of identifying the message may correspond to Fig. 9 The first device shown performs a message identification operation.
[0102] In an embodiment of the present application, the first device stores the range locks that have been acquired, so that after obtaining the type of the first range lock, the acquired range lock corresponding to the type of the first range lock can be acquired, and the acquired range lock corresponding to the type is the second range lock corresponding to the type. Exemplarily, based on the first range lock being a range lock with intersecting intervals, the second range lock includes a range lock with non-intersecting intervals acquired before the first range lock; or, based on the first range being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock. That is, based on the first range lock being a shared range lock, the second range lock includes an exclusive range lock acquired before the first range lock; based on the first range lock being an exclusive range lock, the second range lock includes an exclusive range lock and a shared range lock acquired before the first range lock.
[0103] In an embodiment of the present application, if the number of acquired range locks corresponding to the type is 0, the number of second range locks is 0; if the number of acquired range locks corresponding to the type is greater than or equal to 1, the number of second range locks is greater than or equal to 1.
[0104] S704: The first device determines whether the interval of the first range lock intersects with the interval of the second range lock.
[0105] In a possible implementation, when the number of second range locks is 0, it is directly determined that the interval of the first range lock does not intersect with the interval of the second range lock. When the number of second range locks is greater than or equal to 1, it is determined whether the interval of the first range lock intersects with at least one interval of the second range lock.
[0106] Exemplarily, in the case where the interval of the first range lock includes a first endpoint and a second endpoint, if the first range lock is a shared range lock, it is determined whether the interval of the first range lock intersects with the interval of the acquired exclusive range lock based on the first endpoint and the second endpoint. If the first range lock is an exclusive range lock, it is determined whether the interval of the first range lock intersects with the intervals of the acquired shared range lock and the exclusive range lock based on the first endpoint and the second endpoint.
[0107] Alternatively, when the first range lock is an exclusive range lock, whether the interval of the first range lock intersects with the interval of the acquired shared range lock is determined based on the first endpoint and the second endpoint, and whether the interval of the first range lock intersects with the interval of the acquired exclusive range lock is determined based on the first endpoint and the second endpoint. In this manner, the operation of determining whether the interval of the first range lock intersects with the interval of the acquired shared range lock and the operation of determining whether the interval of the first range lock intersects with the interval of the acquired exclusive range lock can be performed in parallel, or one of the operations can be performed first, and the other operation can be performed if the intervals do not intersect, thereby improving the efficiency of determining whether the interval of the first range lock intersects with the interval of the second range lock.
[0108] Exemplarily, the first endpoint, the second endpoint, and the endpoints included in the interval of the second range lock are represented by numerical values, and determining whether the interval of the first range lock intersects the interval of the second range lock includes S7041 to S7042.
[0109] S7041: Obtain a first adjacent point and a second adjacent point of a first endpoint from endpoints included in the interval of the second range lock.
[0110] Among them, the first adjacent point is the endpoint with the largest value among at least one first reference endpoint, and the value of the first reference endpoint is smaller than the value of the first endpoint; the second adjacent point is the endpoint with the smallest value among at least one second reference endpoint, and the value of the second reference endpoint is larger than the value of the first endpoint. That is, among at least one first reference endpoint included in the interval of the second range lock, the first adjacent point is the endpoint with the smallest distance from the first endpoint; among at least one second reference endpoint included in the interval of the second range lock, the second adjacent point is the endpoint with the smallest distance from the first endpoint. The first endpoint, the second endpoint, and the endpoints of the second range lock can be arranged on the number axis in the order of value from small to large, so that the intervals of each range lock are represented as intervals on the number axis.
[0111] Fig.10 Schematic diagram of an arrangement of endpoints provided in an embodiment of the present application. Fig.10 As shown, the intervals of range lock 1 to range lock 3 each include two endpoints, and the endpoints are arranged in ascending order of numerical value. The left endpoint of the interval of range lock 1 is L1, and the right endpoint is R1, and the interval of range lock 1 is shown as L1 to R1. The left endpoint of the interval of range lock 2 is M, and the right endpoint is N, and the interval of range lock 2 is shown as M to N. The left endpoint of the interval of range lock 3 is L2, and the right endpoint is R2, and the interval of range lock 3 is shown as L2 to R2. In the case where range lock 2 is the first range lock, the first endpoint is the left endpoint, and the second endpoint is the right endpoint, L1 is the first adjacent point of the first endpoint, and R1 is the second adjacent point of the first endpoint. In the case where range lock 2 is the first range lock, the first endpoint is the right endpoint, and the second endpoint is the left endpoint, L2 is the first adjacent point of the first endpoint, and R2 is the second adjacent point of the first endpoint.
[0112] Exemplarily, when the first adjacent point of the first endpoint is obtained first, since the endpoints of the range lock interval are arranged in ascending order of numerical value, the first endpoint among the endpoints included in the interval of the second range lock and whose numerical value is greater than the numerical value of the first adjacent point is directly taken as the second adjacent point; or, when the second adjacent point of the first endpoint is obtained first, the first endpoint among the endpoints included in the interval of the second range lock and whose numerical value is less than the numerical value of the second adjacent point is directly taken as the first adjacent point.
[0113] In a possible implementation, the first device stores a multi-level search structure corresponding to the type, and the endpoints included in the interval of the second range lock are stored in the multi-level search structure. In this case, obtaining the first adjacent point and the second adjacent point of the first endpoint from the endpoints included in the interval of the second range lock includes: searching the multi-level search structure corresponding to the type, and obtaining the first adjacent point and the second adjacent point of the first endpoint. Exemplarily, the multi-level search structure is a bitmap structure. Fig.11 is a schematic diagram of a bitmap structure provided in an embodiment of the present application, Fig.11 In the description, an example is taken in which the number of layers of the bitmap structure is three, but it is not used to limit the number of layers of the bitmap structure. The bitmap structure may include more or fewer layers.
[0114] Take the range lock interval of [0, 1023] as an example. Fig.11 In the bitmap structure shown, 0 and 1023 are the values of the left endpoint and the right endpoint, respectively, 1 to 1022 are the values of the middle points, respectively, the bit values of the positions 0 and 1023 are set as the first reference value, and the values of the positions 1 to 1022 are set as the second reference value. The first reference value and the second reference value are set according to experience or actual needs, and the embodiment of the present application does not limit this. For example, the first reference value is 1 and the second reference value is 0.
[0115] Next, we will take the first reference value as 1 and the second reference value as 0 as an example. Fig.11 , at the bottom layer of the bitmap structure, that is Fig.11 In the layer 3 shown, a bit position corresponds to a numerical position, and the value of the bit position indicates the position of the numerical value corresponding to the bit position. For example, in layer 3, the bit position corresponding to the position with numerical values of 0 and 1023 is 1, and the bit position corresponding to other numerical values is 0. In two adjacent layers, a bit position in the upper layer corresponds to X bit positions in the lower layer, and the value of a bit position in the upper layer indicates the X bit positions in the lower layer corresponding to the bit position. Wherein, X is the maximum bit width of the processor of the first device for processing data or any value less than the maximum bit width. For example, when the processor is a 64-bit processor, the maximum bit width is 64, and X is 64 or any value less than 64. When the processor is a 32-bit processor, the maximum bit width is 32, and X is 32 or any value less than 32.
[0116] Fig.11 In the example, X is 32. Fig.11As shown, one bit position of layer 2 corresponds to 32 bit positions of layer 3. When the values of the 32 bit positions in layer 3 are all 0, the values of the bit positions corresponding to the 32 bit positions in layer 2 are 0. When the values of the 32 bit positions in layer 3 are not all 0, the values of the bit positions corresponding to the 32 bit positions in layer 2 are 1. One bit position of layer 1 corresponds to 32 bit positions of layer 2. When the values of the 32 bit positions in layer 2 are all 0, the values of the bit positions corresponding to the 32 bit positions in layer 1 are 0. When the values of the 32 bit positions in layer 2 are not all 0, the values of the bit positions corresponding to the 32 bit positions in layer 1 are 1. In this case, one bit position of layer 1 corresponds to 1024 bit positions of layer 3.
[0117] For example, when the range lock interval is [0, P-1], X bit positions in the lower layer correspond to one bit position in the upper layer, and the maximum number of levels required for the bitmap structure is Wherein, P is an integer greater than 1, Indicates that log X The value of P is rounded up. Layer 1 is the highest layer in the bitmap structure, and layer Q is the lowest layer in the bitmap structure. A bit position in layer Q corresponds to a value position, and a bit position in layer 1 corresponds to X. Q-1 The position of a value.
[0118] Take the process of obtaining the first adjacent point of the first endpoint by searching a multi-level search structure, and directly taking the first endpoint located on the right side of the first adjacent point among the endpoints included in the interval of the second range lock as the second adjacent point as an example for explanation. The process of searching for the first adjacent point of the first endpoint starts from searching layer 1 and ends at layer Q. For layer i, the search process includes but is not limited to S1-1 to S1-4, where i is greater than or equal to 1 and less than or equal to Q. In an embodiment of the present application, the bit position of layer i has an identification value, and an identification value is used to indicate a bit position of layer i, and the identification value can be represented by a numerical value. For layer Q, since a bit position corresponds to a numerical position, the identification value of the bit position is a numerical value.
[0119] S1-1, find the identification value in layer i that is less than or equal to Y i And the maximum identity value Y with a value of 1 i_max .
[0120] Y i The bit position corresponding to the value of the first endpoint is the identification value of layer i, Y represents the value of the first endpoint, Express Round down. i Equal to Y i_max In this case, execute S1-2, at Yx Greater than Y i_max And Y i_max If it is greater than 0, execute S1-3. i_max If it is less than 0, execute S1-4.
[0121] S1-2, if layer i is the bottom layer, determine whether the interval of the first range lock intersects with the interval of the second range lock; if layer i is not the bottom layer, find the next layer whose identification value is less than or equal to Y i+1 And the maximum identity value Y with a value of 1 i+1_max .
[0122] When layer i is the lowest layer, that is, layer Q, if the obtained identification value Y Q_max Equal to Y Q , indicating that the first range lock and the second range lock share an endpoint, the interval of the first range lock and the interval of the second range lock have an intersection, and the intersection includes at least the endpoint Y Q In this case, it is determined that the interval of the first range lock intersects the interval of the second range lock. i+1 The bit position corresponding to the value of the first endpoint is the identification value at layer i+1, For Y i+1 With Y i+1_max For different situations, the subsequent steps can refer to Y i With Y i_max The subsequent steps performed in different situations are not repeated here.
[0123] S1-3, if layer i is the bottom layer, determine Y i_max is the value of the first neighboring point. If layer i is not the bottom layer, find the next layer whose identification value is less than or equal to Y i+1 And the maximum identity value Y with a value of 1 i+1_max .
[0124] Y i+1 Indicates the bit position corresponding to the value of the first endpoint in layer i+1, Y i+1 =(Y i_max +1)*X-1. (Y i_max +1)*X-1 represents Y in layer i+1 i_max The identification value of the last bit position in the corresponding X bit positions. i+1 With Y i+1_max For different situations, the subsequent steps can refer to Y i With Y i_max The subsequent steps performed in different situations are not repeated here.
[0125] Combined with steps S1-1 to S1-3, at layer Q, obtain the found identification value YQ_max . Identification value Y Q_max There are three possible situations: (1) Y Q_max <0, in this case, it means that there is no first adjacent point; (2) Y Q_max =Y Q In this case, it is determined that the interval of the first range lock and the interval of at least one second range lock have an intersection, and at least the endpoint Y exists in the intersection Q ; (3) 0≤Y Q_max <Y Q In this case, Y Q_max Determine the identification value of the first adjacent point.
[0126] S1-4, return a third reference value, the third reference value is used to indicate that the first adjacent point of the first endpoint is not included in the multi-level search structure, and the value of the bit position with the smallest value in the bit position located at layer Q and with a value of 1 is determined as the value of the second adjacent point. The third reference value is determined based on experience or actual needs, for example, the third reference value is -1. The above operation of obtaining the first adjacent point and the second adjacent point of the first endpoint can correspond to Fig. 9 The proximity search operation performed by the first device in the process.
[0127] In the case where the endpoints of the interval of the second range lock are included in a multi-level search structure corresponding to the type, the values of multiple bit positions at the lower layer can be quickly determined based on the values of the bit positions at the upper layer in the multi-level search structure, thereby being able to more quickly narrow the range of the bit positions where the first adjacent point and the second adjacent point of the first endpoint are located, and the efficiency of searching the first adjacent point and the second adjacent point of the first endpoint based on the multi-level search structure is high.
[0128] S7042: Determine whether the interval of the first range lock intersects with the interval of the second range lock according to the first adjacent point, the second adjacent point, and the second endpoint.
[0129] Combined with the content of S7041 above, it can be known that the first adjacent point and the second adjacent point are endpoints located on both sides of the first endpoint among the endpoints included in the interval of the second range lock, so when determining whether the interval of the first range lock intersects with the interval of the second range lock based on the first adjacent point, the second adjacent point and the second endpoint, it can be determined whether the interval of the first range lock intersects with the interval of the second range lock based on the second range lock where the first adjacent point is located, the second range lock where the second adjacent point is located, and whether there is a second range lock whose interval includes the interval of the first range lock. In this case, the number of second range locks used to determine whether the intervals intersect is small, and the determination efficiency is high, thereby improving the efficiency of acquiring range locks.
[0130] Fig.12is a schematic diagram of the positions of a first endpoint, a second endpoint, a first adjacent point, and a second adjacent point provided in an embodiment of the present application. Fig.12 , the number of the second range locks is multiple, M represents the first endpoint and the first endpoint is the left endpoint, N represents the second endpoint and the second endpoint is the right endpoint, L represents the first adjacent point, and R represents the second adjacent point. Fig.12 As shown in (a), when L and R are both left endpoints included in the interval of the second range lock, and M is included in the interval of the second range lock where L is located, the interval of the first range lock intersects with the interval of the second range lock where L is located. Fig.12 As shown in (b), when L is the left endpoint of the interval of a second range lock and R is the right endpoint of the interval of another second range lock, M is included in both the interval of the second range lock where L is located and the interval of the second range lock where R is located, then the interval of the first range lock intersects with both the interval of the second range lock where L is located and the interval of the second range lock where R is located.
[0131] like Fig.12 As shown in (c) in , when L and R are both right endpoints included in the interval of the second range lock, and M is included in the interval of the second range lock where R is located, then the interval of the first range lock intersects with the interval of the second range lock where R is located. Fig.12 As shown in (d), when L is the right endpoint of an interval of a second range lock and R is the left endpoint of an interval of another second range lock, M is neither included in the interval of the second range lock where L is located nor in the interval of the second range lock where R is located. When the value of N is less than the value of R, the interval of the first range lock does not intersect with the interval of the second range lock where L is located nor with the interval of the second range lock where R is located. Please continue to refer to Fig.12 In (d), if the interval of the first range lock is not included in the interval of the second range lock, then the interval of the first range lock does not intersect with the interval of the second range lock of the corresponding type.
[0132] like Fig.12 As shown in (e), when there is an endpoint L' on the left side of L, an endpoint R' on the right side of R, and L' and R' are two endpoints included in an interval of a second range lock, if the interval of the second range lock where L' and R' are located contains the interval of the first range lock, then the interval of the first range lock intersects with the interval of the second range lock where L' and R' are located. It can be seen that the conditions for the intervals of the first range lock and the second range lock not to intersect include but are not limited to: L is the right endpoint included in the interval of a second range lock, R is the left endpoint included in the interval of another second range lock, the value of N is less than the value of R, and the interval of the first range lock is not completely included in the interval of any second range lock.
[0133] Exemplarily, when the number of the second range lock is one, whether the interval of the first range lock intersects with the interval of the second range lock is determined directly based on the values of the first endpoint, the second endpoint, and the two endpoints of the second range lock. When the number of the second range lock is multiple, whether the interval of the first range lock intersects with the interval of the second range lock is determined based on different situations of the second endpoints, including but not limited to the following situation A and situation B.
[0134] In case A, the value of the second endpoint is greater than the value of the first endpoint.
[0135] In this case, the first endpoint may be the left endpoint included in the interval of the first range lock, and the second endpoint may be the right endpoint included in the interval of the first range lock. Based on the fact that the first adjacent point is the fourth endpoint included in the interval of one second range lock, the second adjacent point is the fifth endpoint included in the interval of another second range lock, the value of the second endpoint is smaller than the value of the second adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the plurality of second range locks, it is determined that the interval of the first range lock does not intersect with the intervals of the plurality of second range locks.
[0136] Among them, the interval including the fourth endpoint also includes the third endpoint, and the value of the third endpoint is smaller than the value of the fourth endpoint. The interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint. That is, the third endpoint and the fifth endpoint can both be the left endpoints included in the interval of the second range lock, and the fourth endpoint and the sixth endpoint can both be the right endpoints included in the interval of the second range lock.
[0137] That is, if the following conditions (a1) to (a4) cannot be met at the same time, it is determined that the interval of the first range lock intersects the intervals of multiple second range locks. Condition (a1): The first adjacent point is the fourth endpoint included in the interval of one second range lock; Condition (a2): The second adjacent point is the fifth endpoint included in the interval of another second range lock; Condition (a3): The value of the second endpoint is less than the value of the second adjacent point; Condition (a4): The interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks.
[0138] In case B, the value of the second endpoint is smaller than the value of the first endpoint.
[0139] In this case, the first endpoint may be the right endpoint of the interval of the first range lock, and the second endpoint may be the left endpoint included in the interval of the first range lock. Based on the fact that the first adjacent point is the fourth endpoint included in the interval of one second range lock, the second adjacent point is the fifth endpoint included in the interval of another second range lock, the value of the second endpoint is greater than the value of the first adjacent point, and the interval of the first range lock is not included in the interval of any range lock among the acquired range locks of the corresponding type, it is determined that the interval of the first range lock does not intersect with the intervals of the plurality of second range locks.
[0140] Among them, the interval including the fourth endpoint also includes the third endpoint, and the value of the third endpoint is smaller than the value of the fourth endpoint. The interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint. That is, the third endpoint and the fifth endpoint can both be the left endpoints included in the interval of the second range lock, and the fourth endpoint and the sixth endpoint can both be the right endpoints included in the interval of the second range lock.
[0141] That is, if the following conditions (b1) to (b4) cannot be met at the same time, it is determined that the interval of the first range lock intersects the intervals of multiple second range locks. Condition (b1): The first adjacent point is the fourth endpoint included in the interval of one second range lock; Condition (b2): The second adjacent point is the fifth endpoint included in the interval of another second range lock; Condition (b3): The value of the second endpoint is greater than the value of the first adjacent point; Condition (b4): The interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks.
[0142] In the method provided in the embodiment of the present application, since the second range lock whose interval does not include the first adjacent point and does not include the first range lock, and the second range lock whose interval does not include the second adjacent point and does not include the first range lock do not intersect with the interval of the first range lock, when determining whether the interval of the first range lock intersects with the intervals of multiple second range locks, it is directly determined that the intervals of these two types of second range locks do not intersect with the interval of the first range lock, thereby more efficiently determining whether the interval of the first range lock intersects with the intervals of multiple second range locks, thereby more efficiently acquiring the first range lock. The above process of determining whether the interval of the first range lock intersects with the interval of the second range lock may correspond to Fig. 9 The operation of condition determination performed by the first device.
[0143] S705: Based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, the first device sends a second message to the second device, where the second message is used to instruct the second device to acquire the first range lock.
[0144] In an embodiment of the present application, the structure of the second message is the same as that of the first message. In the case where the interval of the first range lock does not intersect with the interval of the second range lock, the first device can obtain the second message by modifying the value of the response code field of the first message. For example, the first device modifies the value of the response code field of the first message to a third value to obtain the second message. Thus, after the second device obtains the second message, it can obtain the first range lock based on the value of the response code field being the third value.
[0145] Exemplarily, based on the situation that the interval of the first range lock intersects with the interval of the second range lock, the first device sends a rejection message to the second device, and the rejection message is used to instruct the second device not to acquire the first range lock. The structure of the rejection message is the same as that of the first message. In one possible implementation, the first device modifies the value of the response code field of the first message to the fourth value to obtain the rejection message. Therefore, after the second device obtains the rejection message, it can determine that the acquisition of the first range lock has failed based on the value of the response code field being the fourth value.
[0146] Exemplarily, the first device further modifies the routing information in the first message according to the routing information of the second device to obtain the second message or the rejection message. Thus, according to the routing information in the second message, the first device can send the second message to the second device, or, according to the routing information in the rejection message, the first device can send the rejection message to the second device. The above-mentioned operation of modifying the value of the response code field may correspond to Fig. 9 The data modification operation performed by the first device, the operation of the first device sending a second message to the second device, and the operation of the first device sending a rejection message to the second device may correspond to Fig. 9 The operation of the result feedback performed by the first device.
[0147] S706: The second device receives the second message sent by the first device.
[0148] Combining the contents of S702 to S705, it can be seen that the second message is sent by the first device based on the interval of the first range lock and the interval of the second range lock corresponding to the type do not intersect. The embodiment of the present application does not limit the way in which the second device obtains the second message sent by the first device, and it can correspond to the way in which the first device sends the second message to the second device. For example, if the first device sends the second message to the second device via a wireless network, the second device receives the second message via the wireless network.
[0149] S707: The second device obtains the first range lock based on the second message.
[0150] Exemplarily, the second device parses the second message, and acquires the first range lock based on the response code field of the second message being the third value. The operation of the second device acquiring the first range lock based on the second message may correspond to Fig. 9The second device performs a message parsing operation. Exemplarily, the method further includes: the second device receives a rejection message sent by the first device, and determines that the acquisition of the first range lock fails based on the rejection message.
[0151] In a possible implementation, when the first device sends the second message to the second device or after sending the second message to the second device, the first range lock is used to lock the data corresponding to the interval of the first range lock, so that after the second device obtains the first range lock, it can operate on the locked data. For example, when the type of the first range lock is a shared range lock, the second device reads the locked data, and when the type of the first range lock is an exclusive range lock, the second device modifies the locked data.
[0152] Since the first device may store a multi-level search structure corresponding to the type of the first range lock, in a possible implementation, after the first device sends the second message to the second device, the method further includes: the first device adds the first endpoint and the second endpoint to the multi-level search structure. For example, the first device sets the value of the position of the numerical value of the first endpoint and the second endpoint in the multi-level search structure to the first reference value, and keeps the value of the position of the numerical value of the middle point other than the first endpoint and the second endpoint in the interval of the first range lock unchanged.
[0153] For example, taking the first reference value as 1, for level i in the multi-level search structure, a bit position of level i corresponds to X N-i For the value representing the first endpoint, the bit position corresponding to the value is Set the identifier value to The value of the bit position of is set to 1, where M1 represents the value of the first endpoint, Express For the value representing the second endpoint, the bit position corresponding to the value is Set the identifier value to The value of the bit position of is set to 1, where N1 represents the value of the second endpoint, Express Round down.
[0154] In a possible implementation, after the second device acquires the first range lock, the method further includes: the second device sends a third message to the first device, the third message is used to request the release of the first range lock, and the third message includes the type and interval of the first range lock. For example, after the second device operates on the data corresponding to the interval of the first range lock, it sends the third message to the first device. The structure of the third message is the same as that of the first message. The value of the operation field of the third message can be the second value, so that the type of request of the third message is a request to release the range lock.
[0155] Thus, after the first device receives the third message, it can release the first range lock based on the third message. Exemplarily, when the interval of the first range lock includes the first endpoint and the second endpoint, after adding the first endpoint and the second endpoint to the multi-level search structure, the method also includes: the first device obtains the third message sent by the second device, the third message is used to request the release of the first range lock, and the third message includes the type of the first range lock, the first endpoint and the second endpoint; the first device obtains the multi-level search structure corresponding to the type of the first range lock; the first device deletes the first endpoint and the second endpoint from the multi-level search structure.
[0156] Exemplarily, deleting the first endpoint and the second endpoint is a process of setting the bit positions corresponding to the values of the first endpoint and the second endpoint in the multi-level search structure to the second reference value. In the embodiment of the present application, the deletion operation is performed layer by layer from layer Q to layer 1. For example, taking the second reference value as 0, for layer i, the X bit positions of layer i correspond to a bit position of layer i-1, so that when the values of the X bit positions of layer i are all 0, the values of the bit positions corresponding to the X bit positions in layer i-1 are set to 0.
[0157] For a value representing the first endpoint, the identification value h1 of the bit position corresponding to the value in layer i is The bit position value of the identification value h1 is set to 0, where M1 represents the value of the first endpoint. Express Round down. If the value of the identifier in layer i is to The bit positions of layer i-1 are all 0, and the to The value of the bit position corresponding to the bit position of to The value of the bit position corresponding to the bit position of remains unchanged. Indicates that Round down.
[0158] For the value representing the second endpoint, the identification value h2 of the bit position corresponding to the value in layer i is The value of the bit position of the identification value h2 is set to 0, wherein N1 represents the value of the second endpoint, Express Round down. If the value of the identifier in layer i is to The bit positions of layer i-1 are all 0, and the to The value of the bit position corresponding to the bit position of to The value of the bit position corresponding to the bit position of remains unchanged. Indicates that Round down.
[0159] Next, the process of obtaining a range lock is described by taking the application of the method provided in the embodiment of the present application to a distributed file system and a distributed database as an example.
[0160] Example 1: The method is applied to a distributed file system, wherein the distributed file system includes at least one first device, multiple second devices, and multiple third devices. The first device is a switch, the second device is a client, and the third device is a storage device.
[0161] Multiple third devices are used to store files in a distributed manner, that is, the same file is stored in multiple third devices. Multiple clients can simultaneously initiate read requests and / or write requests for the same file in distributed storage. For example, multiple clients include client 1 and client 2, and file 1 is stored in multiple storage devices in a distributed manner. Client 1 initiates a write operation on the data [0, 4K] of file 1, and client 2 initiates a write operation on the data [3K, 6K] of file 1, and the time when client 1 and client 2 initiate the write operation is the same.
[0162] In this case, client 1 sends message 1 to the switch, message 1 is used to request range lock A, message 1 includes the type and interval of range lock A, and range lock A is used to lock the data [0, 4K] in file 1. In example 1, the type of range lock A is an exclusive range lock, and the interval is [0, 4K]. Fig.13 is another schematic diagram of a process for obtaining a range lock provided by an embodiment of the present application, such as Fig.13 As shown, client 1 sends message 1 to the switch. After obtaining message 1 sent by client 1, the switch obtains the second range lock corresponding to the exclusive range lock, and determines whether the interval of range lock A intersects with the interval of the second range lock. Based on the fact that the interval of range lock A does not intersect with the interval of the second range lock, Fig.13 As shown, the switch sends message 2 to client 1 , where message 2 is used to instruct client 1 to obtain range lock A, so that client 1 can obtain range lock A based on message 2 .
[0163] For example, Fig.13As shown, client 2 sends message 3 to the switch. Message 3 is used to request to obtain range lock B. Message 3 includes the type and interval of range lock B. Range lock B is used to lock the data [3K, 6K] in file 1. In example 1, the type of range lock B is an exclusive range lock, the interval is [3K, 6K], and the time when the switch receives message 3 is later than the time when it receives message 1. After obtaining message 3 sent by client 2, the switch obtains the second range lock corresponding to the exclusive range lock and determines whether the interval of range lock B intersects with the interval of the second range lock.
[0164] In Example 1, when determining whether the interval of range lock B intersects with the interval of the second range lock, range lock A has been acquired, that is, the second range lock includes range lock A, and since the interval of range lock A intersects with the interval of range lock B, the interval of range lock B intersects with the interval of the second range lock. In this case, see Fig.13 , the switch sends message 4 to client 2, where message 4 is a rejection message, so that client 2 can determine based on message 4 that range lock B fails to be acquired.
[0165] Example 2: The method is applied to a distributed database, which includes at least one first device, multiple second devices, and multiple third devices. The first device is a switch, the second device is a client, and the third device is a database server.
[0166] Multiple third devices are used for distributed storage tables, that is, the same table is stored in multiple third devices. Multiple clients can simultaneously initiate read requests and / or write requests for the same distributed storage table. For example, multiple clients include client 3 and client 4, and table 1 is stored in multiple database servers in a distributed storage manner. Table 1 includes multiple records. For any record in the multiple records, the any record includes an identifier (ID) corresponding to the any record. Client 3 initiates an operation to modify the records in Table 1 whose identity identifier value is greater than or equal to 3, and client 4 initiates an operation to modify the records in Table 1 whose identity identifier value is less than or equal to 2.
[0167] In this case, the client 3 sends a message 5 to the switch. The message 5 is used to request a range lock C. The message 5 includes the type and interval of the range lock C. The range lock C is used to lock the records whose identity identifier values are greater than or equal to 3 in Table 1. In Example 2, the type of range lock C is an exclusive range lock, and the interval is [3, R]. R represents a fourth reference value, which is less than 0, and [3, R] represents that the value of the starting identity identifier is 3 and the value of the ending identity identifier is not limited. After obtaining the message 5 sent by the client 3, the switch obtains the second range lock corresponding to the exclusive range lock, determines whether the interval of the range lock C intersects with the interval of the second range lock, and based on the fact that the interval of the range lock C does not intersect with the interval of the second range lock, the switch sends a message 6 to the client 3. The message 6 is used to instruct the client 3 to obtain the range lock C, so that the client 3 can obtain the range lock C based on the message 6.
[0168] Client 4 sends message 7 to the switch. Message 7 is used to request range lock D. Message 7 includes the type and interval of range lock D. Range lock D is used to lock records whose identity values are less than or equal to 2 in Table 1. In Example 2, the type of range lock D is an exclusive range lock, and the interval is [R, 2]. [R, 2] indicates that the value of the starting identity is not limited and the value of the ending identity is 2. After obtaining message 7 sent by client 4, the switch obtains the second range lock corresponding to the exclusive range lock, determines whether the interval of range lock D intersects with the interval of the second range lock, and based on the fact that the interval of range lock D does not intersect with the interval of the second range lock, the switch sends message 8 to client 4. Message 8 is used to instruct client 4 to obtain range lock D, so that client 4 can obtain range lock D based on message 8.
[0169] In the method provided in the embodiment of the present application, after the first device obtains the message for requesting the range lock, it directly obtains the range lock corresponding to the type of the range lock, and then determines whether the intervals intersect, without traversing the fixed range locks from all the acquired range locks, so that the efficiency of obtaining the range lock is higher. In the case where the number of second range locks is less than the number of all the acquired range locks, the number of second range locks used to determine whether the intervals intersect is small, so the efficiency of determining whether the intervals intersect is higher, so that the efficiency of obtaining the first range lock is higher.
[0170] In the case where the first device is any one of a switch, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, the first device has a linear processing capability, that is, the first device has a deterministic processing delay, and no matter how many messages for requesting a range lock are received, the time for the first device to process these messages is basically the same. In an embodiment of the present application, the time is basically the same means that the difference in duration does not exceed a reference threshold, and the reference threshold can be set according to experience or actual needs. Thus, in a scenario with a high number of concurrent read and write operations, the duration of the first device executing the method provided in the embodiment of the present application is relatively stable, and does not increase rapidly with the increase in the number of concurrent read and write operations, and is suitable for scenarios with a high number of concurrent read and write operations. In the case where the execution time of the method is short, the delay in obtaining the range lock is short and the efficiency is high.
[0171] The embodiment of the present application also provides a device for acquiring a range lock. Fig.14 is a schematic diagram of a range lock acquisition device provided in an embodiment of the present application. The device is applied to a first device, that is, based on Fig.14 The device can perform all or part of the operations performed by the first device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Fig.14 As shown, the device includes a first acquisition module 1401, a second acquisition module 1402, a determination module 1403 and a sending module 1404.
[0172] The first acquisition module 1401 is used to acquire a first message sent by the second device, the first message is used to request to acquire a first range lock, the first message includes a type and an interval of the first range lock, and the first range lock is used to lock distributed stored data; the second acquisition module 1402 is used to acquire a second range lock corresponding to the type of the first range lock; the determination module 1403 is used to determine whether the interval of the first range lock intersects with the interval of the second range lock; the sending module 1404 is used to send a second message to the second device based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, and the second message is used to instruct the second device to acquire the first range lock.
[0173] In a possible implementation, the interval of the first range lock includes a first endpoint and a second endpoint, and the first endpoint, the second endpoint, and the endpoints included in the interval of the second range lock are represented by numerical values; the determination module 1403 is used to obtain a first adjacent point and a second adjacent point of the first endpoint from the endpoints included in the interval of the second range lock, the first adjacent point is an endpoint with the largest numerical value among at least one first reference endpoint, and the numerical value of the first reference endpoint is smaller than the numerical value of the first endpoint, and the second adjacent point is an endpoint with the smallest numerical value among at least one second reference endpoint, and the numerical value of the second reference endpoint is larger than the numerical value of the first endpoint; based on the first adjacent point, the second adjacent point, and the second endpoint, determine whether the interval of the first range lock intersects with the interval of the second range lock.
[0174] In a possible implementation, there are multiple second range locks, and the determination module 1403 is used to determine that the interval of the first range lock does not intersect with the intervals of the multiple second range locks based on the fact that the first adjacent point is a fourth endpoint included in the interval of one second range lock, the second adjacent point is a fifth endpoint included in the interval of another second range lock, the value of the second endpoint is smaller than the value of the second adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks, when the value of the second endpoint is greater than the value of the first endpoint; wherein the interval including the fourth endpoint also includes the third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, and the interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint.
[0175] In a possible implementation, there are multiple second range locks, and the determination module 1403 is used to determine that the interval of the first range lock does not intersect with the intervals of the multiple second range locks based on the fact that the first adjacent point is a fourth endpoint included in an interval of one second range lock, the second adjacent point is a fifth endpoint included in an interval of another second range lock, the value of the second endpoint is greater than the value of the first adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the multiple second range locks, when the value of the second endpoint is smaller than the value of the first endpoint; wherein the interval including the fourth endpoint also includes the third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, and the interval including the fifth endpoint also includes the sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint.
[0176] In one possible implementation, the first device stores a multi-level search structure corresponding to the type, and the endpoints included in the interval of the second range lock are stored in the multi-level search structure; the determination module 1403 is used to search the multi-level search structure to obtain the first adjacent point and the second adjacent point of the first endpoint.
[0177] In a possible implementation, the determination module 1403 is further configured to add the first endpoint and the second endpoint to a multi-level search structure.
[0178] In one possible implementation, the first acquisition module 1401 is also used to obtain a third message sent by the second device, the third message is used to request the release of the first range lock, and the third message includes the type of the first range lock, the first endpoint, and the second endpoint; the determination module 1403 is also used to obtain a multi-level search structure corresponding to the type; and delete the first endpoint and the second endpoint from the multi-level search structure.
[0179] In one possible implementation, based on the first range lock being a range lock with intersecting intervals, the second range lock includes range locks with non-intersecting intervals acquired before the first range lock; or, based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock.
[0180] In a possible implementation, the first device is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device is a client.
[0181] In the device provided in the embodiment of the present application, after obtaining the message for requesting the range lock, the range lock corresponding to the type of the range lock is directly obtained, and then whether the intervals intersect is determined, without traversing the fixed range locks from all the acquired range locks, so that the efficiency of obtaining the range lock is high. In the case where the number of second range locks is less than the number of all the acquired range locks, the number of second range locks used to determine whether the intervals intersect is small, so that the efficiency of determining whether the intervals intersect is high, so that the efficiency of obtaining the first range lock is high.
[0182] Fig.15 is a schematic diagram of the structure of another range lock acquisition device provided in an embodiment of the present application. The device is applied to a second device, that is, based on Fig.15 The device can perform all or part of the operations performed by the second device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Fig.15 As shown, the device includes a sending module 1501 , a first obtaining module 1502 and a second obtaining module 1503 .
[0183] A sending module 1501 is used to send a first message to a first device, where the first message is used to request a first range lock, and the first message includes a type and an interval of the first range lock, where the first range lock is used to lock distributed stored data; a first acquisition module 1502 is used to receive a second message sent by the first device, where the second message is sent by the first device based on the interval of the first range lock and the interval of the second range lock corresponding to the type being non-intersecting; a second acquisition module 1503 is used to acquire the first range lock based on the second message.
[0184] In a possible implementation, the sending module 1501 is further configured to send a third message to the first device, where the third message is used to request the release of the first range lock, and the third message includes the type and range of the first range lock.
[0185] In one possible implementation, based on the first range lock being a range lock with intersecting intervals, the second range lock includes range locks with non-intersecting intervals acquired before the first range lock; or, based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock.
[0186] In a possible implementation, the first device is any one of a switch, a server, a device including an FPGA, a device including an intelligent network card, or a device including a DPU, and the second device is a client.
[0187] In the apparatus provided in the embodiment of the present application, after obtaining the message for requesting the range lock, the first device directly obtains the range lock corresponding to the type of the range lock, and then determines whether the intervals intersect, without traversing the fixed range locks among all the acquired range locks, so that the efficiency of determining whether the intervals intersect is higher. In this case, the time from sending the first message to receiving the second message is shorter, and the efficiency of obtaining the range lock is higher.
[0188] It should be understood that the above Figure 14-15 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0189] See also Fig.16 , Fig.16 The following is a schematic diagram of the structure of a computer system provided in an embodiment of the present application. Fig.16As shown, the computer system is a computer system 2000. The computer system 2000 may be a network device, a routing device or a switching device. Fig.16 The computer system 2000 shown is used to execute the above Figure 7 The operations involved in the first device or the operations involved in the second device in the range lock acquisition method shown. The computer system 2000 is, for example, a server, etc. The computer system 2000 can be implemented by a general bus architecture.
[0190] like Fig.16 As shown, the computer system 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
[0191] Processor 2001 is, for example, a central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0192] Optionally, the computer system 2000 further includes a bus. The bus is used to transmit information between the components of the computer system 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0193] The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.
[0194] The communication interface 2004 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The communication interface 2004 can include a wired communication interface and can also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a fast Ethernet (FE) interface, a gigabit Ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a WLAN interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 can be used for the computer system 2000 to communicate with other devices.
[0195] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as Fig.16 0 and CPU1 shown in FIG. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0196] In a specific implementation, as an embodiment, the computer system 2000 may include multiple processors, such as Fig.16 2001 and processor 2005 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0197] In a specific implementation, as an embodiment, the computer system 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0198] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself may also store the program code or instructions for executing the solution of the present application.
[0199] In a specific embodiment, the computer system 2000 of the embodiment of the present application may be the first device in each of the above method embodiments, and the processor 2001 in the computer system 2000 reads the program code 2010 in the memory 2003 or the program code or instruction stored in the processor 2001 itself, so that Fig.16 The computer system 2000 shown is capable of performing all or part of the operations performed by the first device.
[0200] In a specific embodiment, the computer system 2000 of the embodiment of the present application may be the second device in each of the above method embodiments, and the processor 2001 in the computer system 2000 reads the program code 2010 in the memory 2003 or the program code or instruction stored in the processor 2001 itself, so that Fig.16 The illustrated computer system 2000 is capable of performing all or part of the operations performed by the second device.
[0201] The computer system 2000 may also correspond to the above Fig.14 , 15 The device shown, Fig.14 , 15 Each functional module in the device shown is implemented using software of the computer system 2000. In other words, Fig.14 , 15 The functional modules included in the device shown are generated after the processor 2001 of the computer system 2000 reads the program code 2010 stored in the memory 2003 .
[0202] in, Figure 7 Each step of the range lock acquisition method shown is completed by the hardware integrated logic circuit or software instructions in the processor of the computer system 2000. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.
[0203] Fig.17 is a schematic diagram of the structure of another computer system provided in an embodiment of the present application, the computer system is used to execute the above Figure 7 The operations involved in the first device or the operations involved in the second device in the method for acquiring the range lock shown. Exemplarily, the computer system is a server, and the server may have relatively large differences due to different configurations or performances. The computer system may include one or more processors 1701 and one or more memories 1702, wherein at least one computer program is stored in one or more memories 1702, and at least one computer program is loaded and executed by one or more processors 1701. Exemplarily, processor 1701 is a CPU. Of course, the computer system may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The computer system may also include other components for implementing device functions, which are not described here.
[0204] The embodiment of the present application also provides a computer system, the computer system includes a processor, when the processor executes a program instruction or code, the computer system executes the range lock acquisition method executed by the first device, or the range lock acquisition method executed by the second device. Exemplarily, the computer system also includes a memory, the memory is used to store the program instruction or code.
[0205] In a possible implementation, the computer system further includes: an input interface and an output interface, and the input interface, the output interface, the processor, and the memory are connected via an internal connection path.
[0206] The embodiment of the present application also provides a range lock acquisition system, which includes a first device and a second device. The first device is used to execute Figure 7 The method performed by the first device shown, the second device is used to perform Figure 7 The functions of the first device and the second device of the system can be referred to above. Figure 7 The relevant descriptions shown will not be repeated here one by one.
[0207] The embodiment of the present application also provides a communication device, which includes: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals, and when the processor executes the instructions stored in the memory, the processor executes any range lock acquisition method in the first aspect, or any range lock acquisition method in the second aspect.
[0208] It should be understood that the processor may be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture.
[0209] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0210] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a ROM, a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (electrically EPROM, EEPROM) or a flash memory. The volatile memory may be a RAM, which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (static RAM, SRAM), dynamic random access memory (dynamic random access memory, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (doubledata rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM).
[0211] An embodiment of the present application also provides a computer-readable storage medium, in which at least one program instruction or code is stored. When the program instruction or code is loaded and executed by a processor, the computer implements the method for obtaining a range lock executed by the first device in the method embodiment, or the method for obtaining a range lock executed by the second device.
[0212] An embodiment of the present application also provides a computer program or a computer program product, and the computer program or the computer program product includes: computer program code, when the computer program code is executed by a computer, it enables the computer to execute the range lock acquisition method executed by the first device in the method embodiment, or the range lock acquisition method executed by the second device.
[0213] An embodiment of the present application also provides a chip, including a processor, for calling and running instructions stored in a memory from the memory. When the chip is installed in a first device, the first device executes the range lock acquisition method executed by the first device in the method embodiment. When the chip is installed in a second device, the second device executes the range lock acquisition method executed by the second device in the method embodiment.
[0214] Exemplarily, the chip further includes: an input interface, an output interface and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the memory contains the above-mentioned program instructions or codes.
[0215] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program or a computer program product. A computer program or a computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, a process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, a computer instruction can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0216] In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0217] The computer program code for implementing the method of the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of the acquisition device of a general-purpose computer, a special-purpose computer or other programmable range lock, so that when the program code is executed by the acquisition device of the computer or other programmable range lock, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on the remote computer, or entirely on the remote computer or server.
[0218] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, etc. Examples of signals may include electrical, optical, radio, acoustic or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0219] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0220] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module 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. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
[0221] The modules described as separate components may or may not be physically separated, and the components displayed 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 embodiments of the present application.
[0222] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0223] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is the quantity and execution order limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, the first device can be referred to as the second device, and similarly, the second device can be referred to as the first device.
[0224] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0225] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple range locks means two or more range locks. The terms "system" and "network" are often used interchangeably herein.
[0226] It should be understood that the terms used in the description of various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0227] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0228] It should also be understood that, depending on the context, the phrase “if it is determined that…” or “if [stated condition or event] is detected” may be interpreted to mean “upon determining that…” or “in response to determining that…” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event]”.
[0229] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0230] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0231] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for acquiring a range lock, characterized in that: The method comprises: The first device obtains a first message sent by the second device, where the first message is used to request to obtain a first range lock, the first message includes a type and a range of the first range lock, and the first range lock is used to lock distributed stored data; The first device acquires a second range lock corresponding to the type of the first range lock; The first device determines whether an interval of the first range lock intersects an interval of the second range lock; Based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, the first device sends a second message to the second device, where the second message is used to instruct the second device to acquire the first range lock.
2. The method according to claim 1, characterized in that The interval of the first range lock includes a first endpoint and a second endpoint, and the first endpoint, the second endpoint, and the endpoints included in the interval of the second range lock are represented by numerical values; The determining whether the interval of the first range lock intersects with the interval of the second range lock includes: Acquire a first adjacent point and a second adjacent point of the first endpoint from the endpoints included in the interval of the second range lock, wherein the first adjacent point is an endpoint with the largest value among at least one first reference endpoint, and the value of the first reference endpoint is smaller than the value of the first endpoint, and the second adjacent point is an endpoint with the smallest value among at least one second reference endpoint, and the value of the second reference endpoint is larger than the value of the first endpoint; It is determined whether an interval of the first range lock intersects an interval of the second range lock according to the first adjacent point, the second adjacent point, and the second endpoint.
3. The method according to claim 2, characterized in that The number of the second range locks is multiple, and determining whether the interval of the first range lock intersects with the interval of the second range lock according to the first adjacent point, the second adjacent point and the second endpoint includes: In the case where the value of the second endpoint is greater than the value of the first endpoint, based on the fact that the first adjacent point is a fourth endpoint included in an interval of a second range lock, the second adjacent point is a fifth endpoint included in an interval of another second range lock, the value of the second endpoint is less than the value of the second adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the plurality of second range locks, it is determined that the interval of the first range lock does not intersect with the intervals of the plurality of second range locks; Among them, the interval including the fourth endpoint also includes a third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, and the interval including the fifth endpoint also includes a sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint.
4. The method according to claim 2, characterized in that: The number of the second range locks is multiple, and determining whether the interval of the first range lock intersects with the interval of the second range lock according to the first adjacent point, the second adjacent point and the second endpoint includes: In the case where the value of the second endpoint is smaller than the value of the first endpoint, based on the fact that the first adjacent point is a fourth endpoint included in an interval of a second range lock, the second adjacent point is a fifth endpoint included in an interval of another second range lock, the value of the second endpoint is larger than the value of the first adjacent point, and the interval of the first range lock is not included in the interval of any second range lock among the plurality of second range locks, it is determined that the interval of the first range lock does not intersect with the intervals of the plurality of second range locks; Among them, the interval including the fourth endpoint also includes a third endpoint, the value of the third endpoint is smaller than the value of the fourth endpoint, and the interval including the fifth endpoint also includes a sixth endpoint, and the value of the fifth endpoint is smaller than the value of the sixth endpoint.
5. The method according to any one of claims 2 to 4, characterized in that: The first device stores a multi-level search structure corresponding to the type, and the endpoints included in the interval of the second range lock are stored in the multi-level search structure; The acquiring, from the endpoints included in the interval of the second range lock, a first adjacent point and a second adjacent point of the first endpoint, comprises: The multi-level search structure is searched to obtain a first adjacent point and a second adjacent point of the first endpoint.
6. The method according to claim 5, characterized in that After sending the second message to the second device, the method further includes: The first device adds the first endpoint and the second endpoint to the multi-level search structure.
7. The method according to claim 6, characterized in that After adding the first endpoint and the second endpoint to the multi-level search structure, the method further includes: The first device obtains a third message sent by the second device, where the third message is used to request to release the first range lock, and the third message includes a type of the first range lock, a first endpoint, and a second endpoint; The first device obtains a multi-level search structure corresponding to the type; The first device deletes the first endpoint and the second endpoint from the multi-level search structure.
8. The method according to any one of claims 1 to 7, characterized in that: Based on the first range lock being a range lock with intersecting intervals, the second range lock includes a range lock with non-intersecting intervals acquired before the first range lock; Alternatively, based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock.
9. The method according to any one of claims 1 to 8, characterized in that: The first device is any one of a switch, a server, a device including a field programmable gate array, a device including a smart network card, or a device including a data processing unit, and the second device is a client.
10. A method for acquiring a range lock, characterized in that: The method comprises: The second device sends a first message to the first device, where the first message is used to request to obtain a first range lock, the first message includes a type and a range of the first range lock, and the first range lock is used to lock distributed stored data; The second device receives a second message sent by the first device, where the second message is sent by the first device based on that an interval of the first range lock and an interval of a second range lock corresponding to the type do not intersect; The second device acquires the first range lock based on the second message.
11. The method according to claim 10, characterized in that After acquiring the first range lock, the method further includes: The second device sends a third message to the first device, where the third message is used to request to release the first range lock, and the third message includes a type and a range of the first range lock.
12. The method according to claim 10 or 11, characterized in that: Based on the first range lock being a range lock with intersecting intervals, the second range lock includes a range lock with non-intersecting intervals acquired before the first range lock; Alternatively, based on the first range lock being a range lock with non-intersecting intervals, the second range lock includes all range locks acquired before the first range lock.
13. The method according to any one of claims 10 to 12, characterized in that: The first device is any one of a switch, a server, a device including a field programmable gate array, a device including a smart network card, or a device including a data processing unit, and the second device is a client.
14. A range lock acquisition device, characterized in that: The device is applied to a first device, and includes: A first acquisition module, configured to acquire a first message sent by a second device, wherein the first message is used to request to acquire a first range lock, the first message includes a type and a range of the first range lock, and the first range lock is used to lock distributed stored data; A second acquisition module, configured to acquire a second range lock corresponding to the type of the first range lock; a determination module, configured to determine whether the interval of the first range lock intersects with the interval of the second range lock; The sending module is configured to send a second message to the second device based on the fact that the interval of the first range lock does not intersect with the interval of the second range lock, wherein the second message is used to instruct the second device to acquire the first range lock.
15. A range lock acquisition device, characterized in that: The device is applied to a second device, and includes: A sending module, configured to send a first message to a first device, wherein the first message is used to request a first range lock, the first message includes a type and a range of the first range lock, and the first range lock is used to lock distributed stored data; A first acquisition module, configured to receive a second message sent by the first device, where the second message is sent by the first device based on that an interval of the first range lock and an interval of a second range lock corresponding to the type do not intersect; A second acquisition module is configured to acquire the first range lock based on the second message.
16. A range lock acquisition system, characterized in that: The system comprises a first device and a second device, wherein the first device is used to execute the method according to any one of claims 1 to 9, and the second device is used to execute the method according to any one of claims 10 to 13.
17. A computer system, characterized in that: The computer system comprises: a processor, and when the processor executes program instructions or codes, the computer system implements the method according to any one of claims 1 to 13.
18. The computer system according to claim 17, characterized in that: The computer system further comprises: a memory, wherein the memory is used to store the program instructions or codes.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program instruction or code, and when the program instruction or code is loaded and executed by the processor, the computer implements the method according to any one of claims 1 to 13.
20. A chip, characterized in that: The chip includes a processor, which is used to call and execute instructions stored in the memory from the memory. When the chip is installed in a first device, the first device executes the method described in any one of claims 1 to 9. When the chip is installed in a second device, the second device executes the method described in any one of claims 10 to 13.
Citation Information
Cited By
Partition lock acquisition method and device, storage medium, electronic equipment and program
CN120653459A
Range lock acquisition method, apparatus and system and computer readable storage medium
EP4708062A1
Range lock acquisition method, apparatus and system and computer readable storage medium
WO2024244913A1
