Method, apparatus, and system for selecting public land mobile network
US-10225778-B2 · Mar 5, 2019 · US
US11288253B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11288253-B2 |
| Application number | US-201816014444-A |
| Country | US |
| Kind code | B2 |
| Filing date | Jun 21, 2018 |
| Priority date | Jun 21, 2017 |
| Publication date | Mar 29, 2022 |
| Grant date | Mar 29, 2022 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A method and device for allocating a distributed lock is provided. A globally unique service process ID (SPI) is introduced for each distributed application service process while guaranteeing correctness of a distributed lock, and the SPI is used to directly manage ownership of the distributed lock. The service replacement process sends to the server a request for inheriting ownership of the distributed lock before the lifecycle of the lock file expires, the inherit request including the SPI.
Opening claim text (preview).
The invention claimed is: 1. An allocation method for a distributed lock at a server, comprising: creating a lock file having a lifecycle for a distributed lock according to a lock file creation request received from a service process of a client; writing a unique service process ID (SPI) of the service process into the lock file according to an SPI writing request received from the service process, wherein upon a service process crash is detected, a service replacement process is initiated for allocating the SPI of the crashed service process to the service replacement process; acquiring a distributed lock inherit request sent by the service replacement process before the lifecycle of the lock file expires, the distributed lock inherit request including the SPI and indicating a request for inheriting ownership of the distributed lock to the server, the distributed lock inherit request further including a lock file deletion request for deleting the lock file created based on the request from the service process; determining whether the SPI of the service replacement process is consistent with an SPI in the lock file; and in response to the SPI of the service replacement process being consistent with the SPI in the lock file, deleting the lock file created according to the lock file creation request received from the service process and creating a new lock file of the distributed lock for the service replacement process, wherein deleting the lock file is based on a comparison of a transaction ID generated during creation of the lock file and a transaction ID in the lock file deletion request. 2. The method of claim 1 , wherein creating the new lock file comprises: attempting to create the new lock file of the distributed lock for the service replacement process according to a re-creation attempt request received from the service replacement process; in response to the attempt failing, feeding back a creation attempt failure to the service replacement process; acquiring a distributed lock inherit request sent by the service replacement process before the lifecycle of the lock file expires, the distributed lock inherit request including the SPI of the service replacement process; determining whether the SPI of the service replacement process is consistent with an SPI in the lock file; and in response to the SPI of the service replacement process being consistent with the SPI in the lock file, creating the new lock file of the distributed lock for the service replacement process. 3. The method of claim 2 , wherein after attempting to create the new lock file of the same distributed lock for the service replacement process, the method further comprises: feeding back a distributed lock contention success to the service replacement process in response to the creation attempt succeeding. 4. The method of claim 1 , wherein acquiring the distributed lock inherit request, determining whether the SPI of the service replacement process is consistent with the SPI in the lock file, and creating the new lock file comprises: receiving the lock file deletion request, the lock file deletion request including the SPI of the service replacement process; determining whether the SPI of the service replacement process is consistent with the SPI in the lock file according to the lock file deletion request; in response to the SPI of the service replacement process being consistent with the SPI in the lock file, deleting the lock file created by the service process; and creating the new lock file of the distributed lock for the replacement process according to a creation request received from the service replacement process. 5. The method of claim 4 , wherein after creating the lock file having the lifecycle for the distributed lock, the method further comprises: writing into the lock file the transaction ID generated during creation of the lock file; receiving the lock file deletion request, the lock file deletion request including the SPI of the service replacement process, the receiving further comprises: sending the transaction ID generated during creation of the lock file to the client according to a transaction ID acquisition request received from the client; and receiving the lock file deletion request, the lock file deletion request including the SPI of the service replacement process and the transaction ID generated during creation of the lock file; and deleting the lock file created by the service process, the deleting further comprises: determining whether the transaction ID in the lock file deletion request is consistent with the transaction ID generated during creation in the lock file for the distributed lock of the server, and in response to the transaction ID in the lock file deletion request being consistent with the generated transaction ID, deleting the lock file created by the service process, feeding back a deletion success to the service replacement process, and acquiring a request sent by the service replacement process for creating a new lock file for the distributed lock. 6. The method of claim 5 , wherein after feeding back whether the lock file is deleted successfully, the method further comprises: feeding back a lock file contention failure to the service replacement process in response to the deletion failing. 7. A server, comprising: a creation apparatus configured to create a lock file having a lifecycle for a distributed lock according to a lock file creation request received from a service process of a client; a writing apparatus configured to write a unique service process ID (SPI) of the service process into the lock file according to an SPI writing request received from the service process, wherein upon a service process crash is detected, a service replacement process is initiated for allocating the SPI of the crashed service process to the service replacement process; and an allocation apparatus configured to: acquire a distributed lock inherit request sent by the service replacement process before the lifecycle of the lock file expires, the distributed lock inherit request including the SPI and indicating a request for inheriting ownership of the distributed lock to the server, and the distributed lock inherit request further including a lock file deletion request for deleting the lock file created based on the request from the service process; determine whether the SPI of the service replacement process is consistent with an SPI in the lock file; and in response to the SPI of the service replacement process being consistent with the SPI in the lock file, delete the lock file created according to the lock file creation request received from the service process and create a new lock file of the distributed lock for the service replacement process, wherein deleting the lock file is based on a comparison of a transaction ID generated during creation of the lock file and a transaction ID in the lock file deletion request. 8. The server of claim 7 , wherein the allocation apparatus is configured to: attempt to create the new lock file of the distributed lock for the service replacement process according to a re-creation attempt request received from the service replacement process, and feed back a creation attempt failure to the service replacement process in response to the attempt failing; and acquire a distributed lock inherit request sent by the service replacement process before the lifecycle of the lock file expires, the distributed lock inherit request including the SPI of the service replacement process, determine whether the SPI of the service replacement process is consistent with an SPI in the lock file, and in response to the SPI of the service replacement process being consistent with the SPI in the lo
Mutual exclusion algorithms · CPC title
Locking methods, e.g. distributed locking or locking implementation details · CPC title
Protocols · CPC title
avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session · CPC title
in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46) · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.