CN109766324A - Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock - Google Patents
Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock Download PDFInfo
- Publication number
- CN109766324A CN109766324A CN201811534290.2A CN201811534290A CN109766324A CN 109766324 A CN109766324 A CN 109766324A CN 201811534290 A CN201811534290 A CN 201811534290A CN 109766324 A CN109766324 A CN 109766324A
- Authority
- CN
- China
- Prior art keywords
- client
- server
- distributed lock
- version number
- lock
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
This disclosure relates to a kind of control method of distributed lock, device, readable storage medium storing program for executing and electronic equipment.Method includes: the locking request for receiving client and sending, and the locking request is used to request distributed lock to the server;If the distributed lock is in unoccupied state, the distributed lock is distributed to the client;Receive the heartbeat packet that the client is sent;If receiving the heartbeat packet, extend the Session lease of the server according to the first preset duration;During the client holds the distributed lock, if the Session lease of the server expires, the distributed lock that the client is held is discharged.Using this method, the time for the distributed lock that can be held with sustained release client correspondingly delays the time that the distributed lock is distributed for other clients.Therefore, the drawbacks of effectivelying prevent multiple client while accessing same resource, the safety of resource can be improved while avoiding deadlock.
Description
Technical field
This disclosure relates to Distributed Application field, and in particular, to a kind of control method of distributed lock, device, readable
Storage medium and electronic equipment.
Background technique
In Distributed Application, the case where multiple processes provide same service is often encountered, these processes are used for money
It directly initiates to access in source.Therefore when access resource, it is also necessary to prevented using certain means each process to each other do
It disturbs, to guarantee the safety of resource.Distributed lock mechanism is a kind of means generallyd use, i.e., process is being initiated to access to resource
Before, unique distributed lock corresponding with the resource need to be obtained, thus guarantees the safety of resource.
Existing distributed lock service mainly includes based on the service of Redis class lock and based on the lock service of ZooKeeper class.Its
In, in based on the lock service of Redis class, mainly avoid deadlock by expired time, and the setting of expired time usually compared with
For difficulty.Illustratively, if the expired time setting of setting is shorter, the customer end A for holding distributed lock has also been not carried out access
The task of resource, distributed lock is expired, in this way, customer end B obtains the distributed lock, causes the same resource in same time quilt
Customer end A and customer end B access simultaneously.If the expired time setting being arranged is longer, occur in the customer end A for holding distributed lock
When failure, server, which needs to wait for the long period, could discharge the distributed lock, other clients is caused to wait in vain for a long time.
In addition, in the lock service of Redis class, there may be following scene: customer end A obtains distributed lock, event occurs in host
Barrier, backup machine become host.At this point, customer end B can be from backup machine if the distributed lock data are not synchronized on backup machine also
On get distributed lock, in this way, cause customer end A and customer end B while accessing same resource, influence the safety of resource
In based on the lock service of ZooKeeper class, the customer end A for holding distributed lock is determined by heartbeat keepalive mechanism
Whether normal condition is in, specifically, if server receives the heartbeat packet of customer end A transmission, then it is assumed that the customer end A is in
Normal condition, otherwise it is assumed that the customer end A breaks down, and then server active release profile formula is locked.This way it is possible to avoid dead
The distributed lock still in server after release profile formula lock, can be distributed to customer end B, be will lead in client by lock
After A restores normal, customer end A and customer end B access same resource simultaneously, influence the safety of resource.
Summary of the invention
In order to overcome problems of the prior art, the embodiment of the present disclosure provide a kind of distributed lock control method,
Device, readable storage medium storing program for executing and electronic equipment.
To achieve the goals above, disclosure first aspect provides a kind of control method of distributed lock, is applied to service
Device, comprising: receive the locking request that client is sent, the locking request is used to request distributed lock to the server;If
The distributed lock is in unoccupied state, and the distributed lock is distributed to the client;Receive the client hair
The heartbeat packet sent;If receiving the heartbeat packet, extend the Session lease of the server according to the first preset duration;
During the client holds the distributed lock, if the Session lease of the server expires, the client is discharged
The distributed lock supported.
Optionally, the locking request includes the specified lock release conditions that the client is directed to the server, described
Method further include: the server determine meet the specified lock release conditions when, discharge the client hold it is described
Distributed lock.
Optionally, the specified lock release conditions are not continuously receive the heartbeat packet of the first preset quantity.
Optionally, the method also includes: if receiving the heartbeat packet, to the client send be directed to the heart
Jump the feedback signal of packet.
Optionally, the method also includes: if the distributed lock is in unoccupied state, to the distributed lock
Version number is updated, and records the current version number obtained after update;It distributes by the distributed lock to the client
When, the current version number is sent to the client, so that described in the client carries when accessing the server
Current version number;When receiving the access request that the client is sent, the version number for including in the access request is obtained
Information, the version number information characterize the version number for the distributed lock that the client is currently recorded;If the version
Number information and the current version number are consistent, then the client is allowed to access the server;If the version number information with
The current version number is inconsistent, then unavailable emphasis information is sent to the client, so that the user of the client is known
The version number that the client is currently recorded is invalid.
Disclosure second aspect provides a kind of control method of distributed lock, is applied to client, comprising: sends out to server
Locking request is sent, the locking request is used to request distributed lock to the server;Receive the described of the server distribution
Distributed lock;During holding the distributed lock, Xiang Suoshu server sends heartbeat packet, so that the server is receiving
The heartbeat packet in the case where, extend the Session lease of the server according to the first preset duration.
Optionally, the method also includes: receive the feedback signal for the heartbeat packet that the server sends;If
The feedback signal is received, then extends the Session lease of the client according to the second preset duration.
Optionally, the method also includes: when the Session lease of the client expires, it is determined whether terminate pair
The access of the server;If it is determined that terminating the access to the server, is then sent to the server and discharge the distribution
The request of formula lock, and disconnect the communication connection with the server;If it is determined that continuing the access to the server, it is determined that
Whether the feedback signal is received in preset time period;If receiving the feedback signal in the preset time period, hold
The step of extending the Session lease of the client according to the second preset duration described in row;If not in the preset time period
The feedback signal is inside received, then sends the locking request to the server again.
Optionally, the locking request includes the specified lock release conditions that the client is directed to the server, described
Specified lock release conditions, when determination meets the specified lock release conditions, discharge the client and hold for the server
The distributed lock.
Optionally, the specified lock release conditions are not continuously receive the heartbeat packet of the first preset quantity.
Optionally, the method also includes: receive the feedback signal for the heartbeat packet that the server sends;If
The feedback signal of the second preset quantity is not continuously received, and Xiang Suoshu server, which is sent, discharges asking for the distributed lock
It asks, and disconnects the communication connection with the server.
Optionally, the method also includes: receive the version number for the distributed lock that the server is sent, and record
The version number;Access request is sent to the server, the access request includes at least version number information, so that the clothes
Business device verifies the version number information, wherein the version number information characterizes the institute that the client is currently recorded
State the version number of distributed lock;Receive the unavailable emphasis letter that the server is sent when determining that the version number information is invalid
Breath;According to the unavailable emphasis information, the locking request is sent to the server again.
The disclosure third aspect provides a kind of control device of distributed lock, is applied to server, comprising: first receives mould
Block, for receiving the locking request of client transmission, the locking request is used to request distributed lock to the server;Distribution
Module distributes the distributed lock to the client if being in unoccupied state for the distributed lock;Second connects
Module is received, the heartbeat packet sent for receiving the client;The first adjustment module, if for receiving the heartbeat packet,
Extend the Session lease of the server according to the first preset duration;First release module, for holding in the client
During the distributed lock, if the Session lease of the server expires, the distribution that the client is held is discharged
Formula lock.
Optionally, the locking request includes the specified lock release conditions that the client is directed to the server, described
Device further include: the second release module, for when the server determines and meets the specified lock release conditions, described in release
The distributed lock that client is held.
Optionally, the specified lock release conditions are not continuously receive the heartbeat packet of the first preset quantity.
Optionally, described device further include: the first sending module, if for receiving the heartbeat packet, to the visitor
Family end sends the feedback signal for being directed to the heartbeat packet.
Optionally, described device further include: update module is right if being in unoccupied state for the distributed lock
The version number of the distributed lock is updated, and records the current version number obtained after update;Second sending module is used for
When the distributed lock is distributed to the client, the current version number is sent to the client, so that the visitor
Family end carries the current version number when accessing the server;Module is obtained, for receiving the client transmission
Access request when, obtain the version number information for including in the access request, the version number information characterizes the client
The version number of the distributed lock currently recorded;Allow access modules, if for the version number information and described current
Version number is consistent, then the client is allowed to access the server;Third sending module, if for the version number information with
The current version number is inconsistent, then unavailable emphasis information is sent to the client, so that the user of the client is known
The version number that the client is currently recorded is invalid.
Disclosure fourth aspect provides a kind of control device of distributed lock, is applied to client, comprising: the 4th sends mould
Block, for sending locking request to server, the locking request is used to request distributed lock to the server;Third receives
Module, for receiving the distributed lock of the server distribution;5th sending module, for holding the distributed lock
Period, Xiang Suoshu server sends heartbeat packet, so that the server is in the case where the heartbeat packet received, according to the
One preset duration extends the Session lease of the server.
Optionally, described device further include: the 4th receiving module, for receiving that the server sends for the heart
Jump the feedback signal of packet;Second adjustment module, if extending institute according to the second preset duration for receiving the feedback signal
State the Session lease of client.
Optionally, described device further include: the first determining module expires for the Session lease in the client
When, it is determined whether terminate the access to the server;6th sending module, for if it is determined that terminating the visit to the server
It asks, then sends the request for discharging the distributed lock to the server;First disconnects module, for disconnecting and the server
Communication connection;Second determining module, for if it is determined that continuing the access to the server, it is determined that within a preset period of time
Whether the feedback signal is received;If the second adjustment module in the preset time period for receiving the feedback
Signal extends the Session lease of the client according to the second preset duration;7th sending module, if for not described
The feedback signal is received in preset time period, then sends the locking request to the server again.
Optionally, the locking request includes the specified lock release conditions that the client is directed to the server, described
Specified lock release conditions, when determination meets the specified lock release conditions, discharge the client and hold for the server
The distributed lock.
Optionally, the specified lock release conditions are not continuously receive the heartbeat packet of the first preset quantity.
Optionally, described device further include: the 5th receiving module, for receiving that the server sends for the heart
Jump the feedback signal of packet;8th sending module, if the feedback signal for not continuously receiving the second preset quantity, to institute
It states server and sends the request for discharging the distributed lock;Second disconnects module, for disconnecting and the communication link of the server
It connects.
Optionally, described device further include: the 6th receiving module, the distribution sent for receiving the server
The version number of lock, and record the version number;9th sending module, for sending access request, the visit to the server
Ask that request includes at least version number information, so that the server verifies the version number information, wherein the version
The version number for the distributed lock that client described in number information representation is currently recorded;7th receiving module, for receiving
State the unavailable emphasis information that server is sent when determining that the version number information is invalid;Tenth sending module, for according to institute
Unavailable emphasis information is stated, sends the locking request to the server again.
The 5th aspect of the disclosure provides a kind of computer readable storage medium, is stored thereon with computer program, the program
The controlling party of distributed lock provided by any one of disclosure first aspect or second aspect is realized when being executed by processor
The step of method.
The 6th aspect of the disclosure provides a kind of electronic equipment, comprising:
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize disclosure first aspect or
The step of control method of distributed lock provided by any one of two aspects.
Through the above technical solutions, server just discharges what client was held when the Session lease of server expires
Distributed lock, rather than the distributed lock that client is held is released immediately when not receiving heartbeat packet.In this way, can postpone to release
The time for the distributed lock that client is held is put, correspondingly, delays the time for distributing the distributed lock for other clients.Cause
This, the drawbacks of effectivelying prevent multiple client while accessing same resource, can improve resource while being avoided deadlock
Safety.
Other feature and advantage of the disclosure will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
Attached drawing is and to constitute part of specification for providing further understanding of the disclosure, with following tool
Body embodiment is used to explain the disclosure together, but does not constitute the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is a kind of signal of the implementation environment of the control method of distributed lock shown according to an exemplary embodiment
Figure.
Fig. 2 is a kind of stream of the control method of distributed lock applied to server shown according to an exemplary embodiment
Cheng Tu.
Fig. 3 is a kind of control method of the distributed lock applied to server shown according to another exemplary embodiment
Flow chart.
Fig. 4 is a kind of stream of the control method of distributed lock applied to client shown according to an exemplary embodiment
Cheng Tu.
Fig. 5 be in a kind of control method of distributed lock shown according to an exemplary embodiment server and client it
Between interaction figure.
Fig. 6 is a kind of frame of the control device of distributed lock applied to server shown according to an exemplary embodiment
Figure.
Fig. 7 is a kind of frame of the control device of distributed lock applied to client shown according to an exemplary embodiment
Figure.
Fig. 8 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Fig. 9 is the block diagram of a kind of electronic equipment shown according to another exemplary embodiment.
Specific embodiment
It is described in detail below in conjunction with specific embodiment of the attached drawing to the disclosure.It should be understood that this place is retouched
The specific embodiment stated is only used for describing and explaining the disclosure, is not limited to the disclosure.
The drawbacks of in order to not can guarantee resource security in solving the distributed lock service of the prior art, the disclosure provides one kind
Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock.
Before the control method to distributed lock is described in detail, the control for the distributed lock that the disclosure is provided first
The implementation environment of method processed is illustrated.
Fig. 1 is a kind of signal of the implementation environment of the control method of distributed lock shown according to an exemplary embodiment
Figure.As shown in Figure 1, the implementation environment may include: server 11 and multiple client, such as the first client 121, the second client
The 5th client 125 of end 122 ....Wherein, above-mentioned client (the first client 121, the 5th visitor of the second client 122 ...
Family end 125) it can be, for example, laptop, desktop computer, smart phone etc..With the first client 121, in Fig. 1
The 5th client 125 of two clients 122 ... is desktop computer signal.
Illustratively, as shown in Figure 1, the first client 121 obtains the distributed lock for being directed to a certain resource in server 11, and
It accesses to the resource.At this point, the 5th client 125 of the second client 122 ... is waited for, if the first client
After 121 access terminate, the request of release lock can be sent to server 11, and disconnects the communication connection with the server 11.This
Sample, server 11 are locked according to the unlocking request release profile formula, and are sent out according to the 5th client 125 of the second client 122 ...
The sequencing of the locking request sent distributes the distributed lock to the preferential client for sending locking request, so that the client
It supports and is distributed formula lock, and access the resource.
Then, a kind of control method of the distributed lock provided the disclosure is described in detail.
It is a kind of control of distributed lock applied to server shown according to an exemplary embodiment with reference to Fig. 2, Fig. 2
The flow chart of method, wherein the server can be for above in association with the server referred in Fig. 1 described embodiment.Such as Fig. 2
Shown, this method may comprise steps of.
In step 21, the locking request that client is sent is received.
Under distributed scene, client can be just securely accessed by server under the premise of holding distributed lock
A certain resource.Wherein, which distributed by server to client.Specifically, in the disclosure, firstly, service
Device can wirelessly or non-wirelessly mode receives the locking request that client is sent by 2G, 3G, 4G, 5G, WiFi etc..Wherein, should add
Lock request is for requesting distributed lock to server.
In step 22, if distributed lock is in unoccupied state, distributed lock is distributed to client.
In order to avoid same distributed lock is held in the same time by different clients, lead to different clients simultaneously
The drawbacks of accessing same resource, in the disclosure, server detect this point after the locking request for receiving client transmission
Whether cloth lock is in occupied state.If be in unoccupied state, show current time the distributed lock not by it
He is held client, and then the distributed lock can be distributed to client.If being in occupied state, which is asked
Corresponding client is asked to be added in waiting list, so that the client waits in line server and distributes the distributed lock.
In step 23, the heartbeat packet that client is sent is received.
Server can in real time or periodically receive the heartbeat packet of client transmission.Wherein, heartbeat packet characterization visitor
One customized command word of the family end notice server client oneself state.In this way, server can be according to being received
To heartbeat packet detect whether client survives, i.e. whether detection client normal.Specifically, when receiving heartbeat packet,
It can determine that the client is in normal condition, then follow the steps 24.Otherwise it is assumed that client breaks down, server can be released actively
Put the distributed lock that the client is held.
In step 24, if receiving heartbeat packet, extend the Session lease of server according to the first preset duration.
It should be noted that the Session that can configure server is rented when server is that client distributes distributed lock
About, that is, institute extended first is default when the initial time limit of the Session of the server is arranged, and often receiving a heartbeat packet
Duration, wherein the initial time limit can be for example 10s, 20s etc., which may be 5s, 10s etc..
In the disclosure, server, can be according to the heartbeat packet corresponding the when receiving the heartbeat packet of client transmission
One preset duration extends the Session lease of the server.Illustratively, it is assumed that the first preset duration is 10s, in this way, servicing
When device often receives a heartbeat packet, it can extend 10s on the basis of current lease.
In step 25, during client holds distributed lock, if the Session lease of server expires, discharge
The distributed lock that client is held.
During client holds distributed lock, that is, the time that client holds the distributed lock does not arrive the distribution also
The expiration time of lock shows that server does not receive the heartbeat of client transmission if the Session lease of server expires
Packet, at this time, it is believed that the client has executed the task of access resource, or is believed that the client breaks down, in turn
The server can be automatically deleted the distributed lock that the client is held, that is, discharge the distributed lock that the client is held.
By adopting the above technical scheme, server just discharges what client was held when the Session lease of server expires
Distributed lock, rather than the distributed lock that client is held is released immediately when not receiving heartbeat packet.In this way, can postpone to release
The time for the distributed lock that client is held is put, correspondingly, delays the time for distributing the distributed lock for other clients.Cause
This, the drawbacks of effectivelying prevent multiple client while accessing same resource, can improve resource while being avoided deadlock
Safety.
In addition, in addition to server described above determines whether to release according to whether the Session lease of server expires
It puts except the distributed lock that the client is held, the disclosure also provides another kind and determines whether to discharge the distribution that the client is held
The method of formula lock.
Specifically, it includes specified lock released strip of the client for server that client, which is sent in the locking request of service,
Part.Correspondingly, it is specified can to get this when receiving the locking request of client transmission from the locking request for server
Release conditions are locked, and detect whether to meet the specified lock release conditions, if meeting the specified lock release conditions, discharge the client
The distributed lock supported.
Wherein, which can be the condition that user is set by the client.For example, can be not connect
Continued access receives the heartbeat packet of the first preset quantity, is also possible to not receive heartbeat packet etc. in time threshold, wherein first
Preset quantity can be the numerical value of default, or the numerical value of user's self-setting can be, for example, 5,10,20 etc..It needs
It is noted that the first preset quantity is bigger, the time for the distributed lock that server delays release client is held is longer, other
The time that client waits is longer, and still, the first preset quantity is bigger, can more reduce multiple client while access same resource
Risk.
Illustratively, if specified lock release conditions be not continuously receive the heartbeat packet of the first preset quantity, and this is first in advance
If quantity is 10.When server does not continuously receive the heartbeat packet of 10 clients transmission, it is believed that the client has executed
The task of complete access resource, or it is believed that the client breaks down, at this point, the distribution that the client is held can be discharged automatically
Formula lock, in order to distribute the distributed lock to other clients.Wherein, server can periodically receive client transmission
Heartbeat packet, do not receive heartbeat packet when the period of continuous first preset quantity, server, which can be determined that, receives
The heartbeat packet of one preset quantity, that is, meet above-mentioned specified lock release conditions.
Using the program, user can set the specified lock release conditions to server by client, further increase
The flexibility for the distributed lock that server release client is held, so as to further avoid leading to deadlock because of client failure
The phenomenon that.
In practical applications, after the distributed lock that server release client is held, between the client and server
Communication connection do not disconnect, the resource in the still accessible server of client, meanwhile, be released it in the distributed lock
It is in unoccupied state afterwards, server can be distributed other clients locked to application, so that other clients
The resource of accessible server, in this way, it is possible to cause multiple client while accessing the risk of same resource.
Therefore, in order to further avoid multiple client while access the risk of same resource, as shown in figure 3, the distribution
The control method of formula lock can also include the following steps.
In step 26, if distributed lock is in unoccupied state, the version number of the distributed lock is updated, and
The current version number that record obtains after updating.
In the disclosure, for same distributed lock, before the every sub-distribution lock of server, to the version of the distributed lock
Number be updated, and record update after the current version number that obtains.Wherein, server can be right according to the sequence successively increased
The version number of the distributed lock is updated.Illustratively, server, can when determining that the distributed lock is in unoccupied state
The version number for further getting the distributed lock is 100, then can be by the version of the distributed lock according to the rule successively increased
This number is updated to 101 by 100, in this way, the current version number that server records the distributed lock is 101.In addition, server can also
To be updated according to version number of the sequence being sequentially reduced to the distributed lock.Illustratively, server is determining the distribution
When lock is in unoccupied state, the version number that can further get the distributed lock is 201, according to the rule being sequentially reduced
Then, then the version number of the distributed lock is updated to 200 by 201.In this way, server records the current version number of the distributed lock
It is 200.
In step 27, when distributing distributed lock to client, current version number is sent to client, so that objective
Family end carries current version number when accessing server.
Server, can be by the current version after the version number to distributed lock is updated to obtain current version number
Number and the distributed lock distribute to client so that client can carry the version number when accessing server.
In a step 28, when receiving the access request of client transmission, the version for including in the access request is obtained
Number information.
Since client is when accessing the server, the version number of distributed lock can be carried, in this way, server is receiving
When the access request that client is sent, version number information, and the version number information table can be directly got from the access request
Levy the version number for the distributed lock that the client is currently recorded.Later, server is by the version number information and self record
Current version number compares, and whether the current version number to determine the version number information and record is consistent, and then can tie according to comparing
Fruit determines the whether accessible resource of client.
In step 29, if version number information and current version number are consistent, client is allowed to access server.
Due to server record current version number be distributed lock latest edition number, if the version number information
It is consistent with the current version number that is recorded, then show that the distributed lock does not update the distribution also after distributing to the client
The version number of lock, that is, the distributed lock is not distributed also after distributing to the client to other clients.Therefore, no
Multiple client can occur while accessing the risk of same resource, at this point, the client is allowed to access server.
In step 210, if version number information is inconsistent with current version number, unavailable emphasis letter is sent to client
Breath.
If the version number information and the current version number recorded are inconsistent, showing the version number not is the distributed lock
Latest edition number, server, may be because of the Session of server after distributing the distributed lock to the client
Lease expires, alternatively, not continuously receiving the reasons such as the heartbeat packet of the first preset quantity thinks the client failure, actively discharges
The distributed lock that the client is held, and the distributed lock is distributed to other clients.At this point, other clients are being visited
Ask the server.In order to avoid multiple client accesses the risk of same resource simultaneously, it is invalid that server can be sent to client
Prompt information, so that the version number that the user of the client knows that client is currently recorded is invalid, that is, its distribution held
The version number of formula lock is out of date, alternatively, the distributed lock is distributed by server to other clients.
Using the above scheme, the version number for the distributed lock held by client, determine by distributed lock distribute to
Whether sub-distribution is to other clients again after client, if sub-distribution does not allow the client to other clients again
Server is accessed, if sub-distribution to other clients can in order to avoid multiple client accesses the risk of same resource simultaneously again
Unavailable emphasis information is sent to client, so that the version number that the user of the client knows that client is currently recorded is invalid.
In this way, the drawbacks of can further avoiding multiple client while accessing same resource, further increase the safety of resource.
It is a kind of control of distributed lock applied to client shown according to an exemplary embodiment with reference to Fig. 4, Fig. 4
The flow chart of method, wherein the client is the client mentioned in above in association with Fig. 1 and Fig. 2 described embodiment.Such as
Shown in Fig. 4, this method be may comprise steps of.
In step 41, locking request is sent to server.
As described above, which is used to request distributed lock to server.
In step 42, the distributed lock of server distribution is received.
Client is when receiving the distributed lock of server distribution, i.e., it is believed that the client holds the distributed lock,
In this way, the accessible server of the client, and in the ideal case, during which holds the distributed lock, only
The client has the permission for accessing resource corresponding with the distributed lock in the server.
At step 43, during holding distributed lock, heartbeat packet is sent to server.
In the disclosure, client can send the heart to server in real time or periodically during holding distributed lock
Jump packet.In the case where server receives the heartbeat packet, it can both know that the client was in normal condition, and can also make to take
Business device extends the Session lease of server according to the first preset duration.In this way, server is rented in the Session of server
The distributed lock that just release client is held when about expiring, rather than release immediately client when not receiving heartbeat packet and hold
Distributed lock.Also, client can choose whether to send heartbeat packet to server, to determine the need for extending server
Session lease.Under normal circumstances, client can be with any long-time of holder lock, to ensure that server can be at this
The distributed lock is discharged after the complete access task to server of client executing.
By adopting the above technical scheme, client can be by whether send heartbeat packet to server, to determine the need for
Extend server Session lease, it can be ensured that server can the complete access task to server of the client executing it
After discharge the distributed lock, and then the drawbacks of avoid multiple client while accessing same resource, improve the safety of resource.
Below with reference to Fig. 5, the detailed process of the control method for the distributed lock that the disclosure provides is described.Fig. 5 is basis
Interaction figure in a kind of control method of distributed lock shown in one exemplary embodiment between server and client.Such as Fig. 5
Shown, this approach includes the following steps.
In step 51 (41), user end to server sends locking request.
In step 52 (21), server receives the locking request that client is sent.
In step 53 (22), if distributed lock is in unoccupied state, server distributes distributed lock to client
End.
In step 54 (42), client receives the distributed lock of server distribution.
In step 55 (43), during holding distributed lock, user end to server sends heartbeat packet.
In step 56 (23), server receives the heartbeat packet that client is sent.
In step 57 (24), if server receives heartbeat packet, extend server according to the first preset duration
Session lease.
In step 58 (25), during client holds distributed lock, if the Session lease of server expires,
The distributed lock that server release client is held.
In the disclosure, server can send to the client and be directed to when receiving the heartbeat packet of client transmission
The feedback signal of the heartbeat packet.Correspondingly, client can receive the feedback signal and according to the feedback signal corresponding
Two preset durations extend the Session lease of the client.
Similarly, client can configure the Session of client when receiving the distributed lock of server distribution
Lease, that is, be arranged the initial time limit of the Session of the client, and institute extended second is pre- when often receiving a feedback signal
If duration, wherein the initial time limit can be for example 10s, 20s etc., which may be 5,10s etc.,
And second preset duration can be identical as the first preset duration, can also be different.
When the Session lease of client expires, client may determine whether to terminate the access to server.It is a kind of
Possible situation, when the Session lease of client expires, the task of the complete access server of client executing, determination terminates
To server access, such situation belongs to normal switching-off access process.Therefore, in this case, client can be sent out to server
The request for sending release profile formula to lock, and disconnect the communication connection with server.Specifically, determining in client terminates to server
When access, hook can be called to discharge the distributed lock to attempt request server.It should be noted that if in the process of release lock
In, when server fail cannot successfully discharge the distributed lock, the information of the distributed lock can be recorded, serviced
Device restores information that is normal and then reading the distributed lock, and discharges the distributed lock that the client is held again, until
Until the distributed lock release that the client is held in success.
Alternatively possible situation, when the Session lease of client expires, if client has been not carried out access service
The task of device determines the access continued to server, at this point, whether client determination receives server within a preset period of time
The feedback signal of transmission can extend client according to the second preset duration if receiving the feedback signal within a preset period of time
Session lease.Otherwise, it needs to send locking request to server again, that is, the client is added to the waiting list again
In, so that server distributes distributed lock according to sequencing in the queue.
It, can be pre- for client when using the program, expiring in the Session lease of client, and needing to continue access
Preset time period is stayed, its probability for receiving feedback signal is increased, that is, increases the general of its Session lease for extending client
Rate, so that the client can directly access server without retransmiting locking request.
In another embodiment, client may also determine whether to continuously receive the feedback letter of the second preset quantity
Number.If continuously receiving the feedback signal of the second preset quantity, show that server is in normal condition, client can continue to visit
Ask the resource of the server.If not continuously receiving the feedback signal of second preset quantity, show that server breaks down,
Client can terminate the access to server at this time.Specifically, the request for discharging the distributed lock can be sent to server, and main
Dynamic circuit breaker opens the communication connection with server.Wherein, as soon as client can detect whether to receive needle after sending time heartbeat packet
To the feedback signal of the heartbeat packet, if not receiving the feedback signal in a period of time, client can be sent to server again
Heartbeat packet.If client connection issues the heartbeat packet of the second preset quantity and do not receive feedback signal, client can be sentenced
The fixed feedback signal for not continuously receiving second preset quantity.
Through the above technical solutions, client when detecting that server breaks down, can be released actively to server transmission
Distributed request is put, and actively disconnects the communication connection with the server, to reduce unnecessary power consumption.
In addition, determination is after distributing distributed lock to client in server by the version number of distributed lock
No to be distributed again into the embodiment of other clients, client can also receive the distributed lock of server transmission
Version number, and record the version number.Then, user end to server sends access request, includes at least version in the access request
This number information, so that server when receiving the access request, can verify the version number information.Wherein, the version
The version number for the distributed lock that number information representation client is currently recorded.Finally, client receives the server in determination
The unavailable emphasis information that the version number sends when invalid, so that the user of the client knows the version that client is currently recorded
It is number invalid, that is, the version number for the distributed lock that client is held is out of date, alternatively, the distributed lock is distributed by server
User to other clients, and then client can send locking request to server again.
In this way, when the version number for the distributed lock that client is held is invalid, exportable prompt information is known convenient for user
The version number that client is currently recorded is invalid.In this way, multiple client can be further avoided while accessing the wind of same resource
Danger, further increases the safety of resource.
Based on the same inventive concept, the disclosure also provides a kind of control device of distributed lock applied to server.Fig. 6
It is a kind of block diagram of the control device of distributed lock applied to server shown according to an exemplary embodiment.Such as Fig. 6 institute
Show, the apparatus may include:
First receiving module 61, for receiving the locking request of client transmission, the locking request is used for the clothes
Business device requests distributed lock;
Distribution module 62 distributes the distributed lock to institute if being in unoccupied state for the distributed lock
State client;
Second receiving module 63, the heartbeat packet sent for receiving the client;
The first adjustment module 64, if extending the service according to the first preset duration for receiving the heartbeat packet
The Session lease of device;
First release module 65, for during the client holds the distributed lock, if the server
Session lease expires, then discharges the distributed lock that the client is held.
Optionally, the locking request includes the specified lock release conditions that the client is directed to the server, described
Device can also include:
Second release module, for discharging the visitor when the server determines and meets the specified lock release conditions
The distributed lock that family supports.
Optionally, the specified lock release conditions are not continuously receive the heartbeat packet of the first preset quantity.
Optionally, described device can also include:
First sending module, if being sent to the client for receiving the heartbeat packet and being directed to the heartbeat packet
Feedback signal.
Optionally, described device can also include:
Update module, if being in unoccupied state for the distributed lock, to the version number of the distributed lock into
Row updates, and records the current version number obtained after update;
Second sending module, for when distributing the distributed lock to the client, by the current version number
It is sent to the client, so that the client carries the current version number when accessing the server;
Module is obtained, for obtaining and wrapping in the access request when receiving the access request that the client is sent
The version number information contained, the version number information characterize the version number for the distributed lock that the client is currently recorded;
Allow access modules, if consistent for the version number information and the current version number, allows the client
End accesses the server;
Third sending module, if inconsistent for the version number information and the current version number, to the client
End sends unavailable emphasis information, so that the version number that the user of the client knows that the client is currently recorded is invalid.
Based on the same inventive concept, the disclosure also provides a kind of control device of distributed lock applied to client.Fig. 7
It is a kind of block diagram of the control device of distributed lock applied to client shown according to an exemplary embodiment.Such as Fig. 7 institute
Show, the apparatus may include:
4th sending module 71, for sending locking request to server, the locking request is used for the server
Request distributed lock;
Third receiving module 72, for receiving the distributed lock of the server distribution;
5th sending module 73, for during holding the distributed lock, Xiang Suoshu server sends heartbeat packet, so that
The server extends the server in the case where heartbeat packet received, according to the first preset duration
Session lease.
Optionally, described device can also include:
4th receiving module, the feedback signal for the heartbeat packet sent for receiving the server;
Second adjustment module, if extending the client according to the second preset duration for receiving the feedback signal
The Session lease at end.
Optionally, described device can also include:
First determining module, for when the Session lease of the client expires, it is determined whether terminate to the clothes
The access of business device;
6th sending module, for if it is determined that terminating the access to the server, then to server transmission release
The request of the distributed lock;
First disconnects module, for disconnecting and the communication connection of the server;
Second determining module, for if it is determined that continuing the access to the server, it is determined that be within a preset period of time
It is no to receive the feedback signal;
The second adjustment module, if for receiving the feedback signal in the preset time period, according to
Two preset durations extend the Session lease of the client;
7th sending module, if for not receiving the feedback signal in the preset time period, again to institute
It states server and sends the locking request.
Optionally, the locking request includes the specified lock release conditions that the client is directed to the server, described
Specified lock release conditions, when determination meets the specified lock release conditions, discharge the client and hold for the server
The distributed lock.
Optionally, the specified lock release conditions are not continuously receive the heartbeat packet of the first preset quantity.
Optionally, described device can also include:
5th receiving module, the feedback signal for the heartbeat packet sent for receiving the server;
8th sending module, if the feedback signal for not continuously receiving the second preset quantity, to the service
Device sends the request for discharging the distributed lock;
Second disconnects module, for disconnecting and the communication connection of the server.
Optionally, described device can also include:
6th receiving module, for receiving the version number for the distributed lock that the server is sent, and described in record
Version number;
9th sending module, for sending access request to the server, the access request includes at least version number
Information, so that the server verifies the version number information, wherein the version number information characterizes the client
The version number of the distributed lock currently recorded;
7th receiving module mentions in vain for receive that the server sends when determining that the version number information is invalid
Show information;
Tenth sending module, for sending the locking to the server again and asking according to the unavailable emphasis information
It asks.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 8 is the block diagram of a kind of electronic equipment 800 shown according to an exemplary embodiment.As shown in figure 8, the electronics is set
Standby 800 may include: processor 801, memory 802.The electronic equipment 800 can also include multimedia component 803, input/
Export one or more of (I/O) interface 804 and communication component 805.
Wherein, processor 801 is used to control the integrated operation of the electronic equipment 800, to complete above-mentioned to be applied to client
All or part of the steps in the control method of the distributed lock at end.Memory 802 is for storing various types of data to prop up
The operation in the electronic equipment 800 is held, these data for example may include any answering for what is operated on the electronic equipment 800
With the instruction of program or method and the relevant data of application program, such as contact data, the message of transmitting-receiving, picture, sound
Frequently, video etc..The memory 802 can be by any kind of volatibility or non-volatile memory device or their combination
It realizes, such as static random access memory (Static Random Access Memory, abbreviation SRAM), electric erasable can
Program read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as
EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, abbreviation
EPROM), programmable read only memory (Programmable Read-Only Memory, abbreviation PROM), read-only memory
(Read-Only Memory, abbreviation ROM), magnetic memory, flash memory, disk or CD.Multimedia component 803 can wrap
Include screen and audio component.Wherein screen for example can be touch screen, and audio component is used for output and/or input audio signal.
For example, audio component may include a microphone, microphone is for receiving external audio signal.The received audio signal can
To be further stored in memory 802 or be sent by communication component 805.Audio component further includes at least one loudspeaker,
For output audio signal.I/O interface 804 provides interface, other above-mentioned interfaces between processor 801 and other interface modules
Module can be keyboard, mouse, button etc..These buttons can be virtual push button or entity button.Communication component 805 is used for
Wired or wireless communication is carried out between the electronic equipment 800 and other equipment.Wireless communication, such as Wi-Fi, bluetooth, near field are logical
Believe (Near Field Communication, abbreviation NFC), 2G, 3G, 4G, NB-IOT, eMTC or other 5G etc. or they
One or more of combination, it is not limited here.Therefore the corresponding communication component 805 may include: Wi-Fi module,
Bluetooth module, NFC module etc..
In one exemplary embodiment, electronic equipment 800 can be by one or more application specific integrated circuit
(Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital
Signal Processor, abbreviation DSP), digital signal processing appts (Digital Signal Processing Device,
Abbreviation DSPD), programmable logic device (Programmable Logic Device, abbreviation PLD), field programmable gate array
(Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other electronics member
Part is realized, for executing the control method of the above-mentioned distributed lock applied to client.
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction is additionally provided, it should
The step of control method of the above-mentioned distributed lock applied to client is realized when program instruction is executed by processor.For example,
The computer readable storage medium can be the above-mentioned memory 802 including program instruction, and above procedure instruction can be set by electronics
Standby 800 processor 801 is executed to complete the control method of the above-mentioned distributed lock applied to client.
Fig. 9 is the block diagram of a kind of electronic equipment 900 shown according to an exemplary embodiment.For example, electronic equipment 900 can
To be provided as a server.Referring to Fig. 9, electronic equipment 900 includes processor 922, and quantity can be one or more, with
And memory 932, for storing the computer program that can be executed by processor 922.The computer program stored in memory 932
May include it is one or more each correspond to one group of instruction module.In addition, processor 922 can be configured as
The computer program is executed, to execute the control method of the above-mentioned distributed lock applied to server.
In addition, electronic equipment 900 can also include power supply module 926 and communication component 950, which can be with
It is configured as executing the power management of electronic equipment 900, which, which can be configured as, realizes electronic equipment 900
Communication, for example, wired or wireless communication.In addition, the electronic equipment 900 can also include input/output (I/O) interface 958.Electricity
Sub- equipment 900 can be operated based on the operating system for being stored in memory 932, such as Windows ServerTM, Mac OS
XTM, UnixTM, LinuxTM etc..
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction is additionally provided, it should
The step of control method of the above-mentioned distributed lock applied to server is realized when program instruction is executed by processor.For example,
The computer readable storage medium can be the above-mentioned memory 932 including program instruction, and above procedure instruction can be set by electronics
Standby 900 processor 922 is executed to complete the control method of the above-mentioned distributed lock applied to server.
The preferred embodiment of the disclosure is described in detail in conjunction with attached drawing above, still, the disclosure is not limited to above-mentioned reality
The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosure
Monotropic type, these simple variants belong to the protection scope of the disclosure.
It is further to note that specific technical features described in the above specific embodiments, in not lance
In the case where shield, it can be combined in any appropriate way.In order to avoid unnecessary repetition, the disclosure to it is various can
No further explanation will be given for the combination of energy.
In addition, any combination can also be carried out between a variety of different embodiments of the disclosure, as long as it is without prejudice to originally
Disclosed thought equally should be considered as disclosure disclosure of that.
Claims (10)
1. a kind of control method of distributed lock, which is characterized in that be applied to server, comprising:
The locking request that client is sent is received, the locking request is used to request distributed lock to the server;
If the distributed lock is in unoccupied state, the distributed lock is distributed to the client;
Receive the heartbeat packet that the client is sent;
If receiving the heartbeat packet, extend the Session lease of the server according to the first preset duration;
During the client holds the distributed lock, if the Session lease of the server expires, described in release
The distributed lock that client is held.
2. the method according to claim 1, wherein the locking request includes the client for the clothes
The specified lock release conditions of business device, the method also includes:
When the server determines and meets the specified lock release conditions, the distribution that the client is held is discharged
Lock.
3. method described in any one of -2 claims according to claim 1, which is characterized in that the method also includes:
If the distributed lock is in unoccupied state, the version number of the distributed lock is updated, and record update
The current version number obtained afterwards;
When distributing the distributed lock to the client, the current version number is sent to the client, so that
The client carries the current version number when accessing the server;
When receiving the access request that the client is sent, the version number information for including in the access request, institute are obtained
State the version number that version number information characterizes the distributed lock that the client is currently recorded;
If the version number information and the current version number are consistent, the client is allowed to access the server;
If the version number information and the current version number are inconsistent, unavailable emphasis information is sent to the client, with
The version number for making the user of the client know that the client is currently recorded is invalid.
4. a kind of control method of distributed lock, which is characterized in that be applied to client, comprising:
Locking request is sent to server, the locking request is used to request distributed lock to the server;
Receive the distributed lock of the server distribution;
During holding the distributed lock, Xiang Suoshu server sends heartbeat packet, so that the server is in the institute received
In the case where stating heartbeat packet, extend the Session lease of the server according to the first preset duration.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
Receive the feedback signal for the heartbeat packet that the server is sent;
If receiving the feedback signal, extend the Session lease of the client according to the second preset duration.
6. according to method described in any one of claim 4-5 claim, which is characterized in that the method also includes:
The version number for the distributed lock that the server is sent is received, and records the version number;
Access request is sent to the server, the access request includes at least version number information, so that the server pair
The version number information is verified, wherein the version number information characterizes the distribution that the client is currently recorded
The version number of formula lock;
Receive the unavailable emphasis information that the server is sent when determining that the version number information is invalid;
According to the unavailable emphasis information, the locking request is sent to the server again.
7. a kind of control device of distributed lock, which is characterized in that be applied to server, comprising:
First receiving module, for receiving the locking request of client transmission, the locking request to the server for asking
Seek distributed lock;
Distribution module distributes the distributed lock to the client if being in unoccupied state for the distributed lock
End;
Second receiving module, the heartbeat packet sent for receiving the client;
The first adjustment module, if extending the server according to the first preset duration for receiving the heartbeat packet
Session lease;
First release module, for during the client holds the distributed lock, if the Session of the server is rented
It about expires, then discharges the distributed lock that the client is held.
8. a kind of control device of distributed lock, which is characterized in that be applied to client, comprising:
4th sending module, for sending locking request to server, the locking request is used for server request point
Cloth lock;
Third receiving module, for receiving the distributed lock of the server distribution;
5th sending module, for during holding the distributed lock, Xiang Suoshu server to send heartbeat packet, so that the clothes
Device be engaged in the case where the heartbeat packet received, extends the Session lease of the server according to the first preset duration.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor
The step of any one of claim 1-6 the method is realized when row.
10. a kind of electronic equipment characterized by comprising
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize described in any one of claim 1-6
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811534290.2A CN109766324A (en) | 2018-12-14 | 2018-12-14 | Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811534290.2A CN109766324A (en) | 2018-12-14 | 2018-12-14 | Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109766324A true CN109766324A (en) | 2019-05-17 |
Family
ID=66450660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811534290.2A Pending CN109766324A (en) | 2018-12-14 | 2018-12-14 | Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109766324A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110601914A (en) * | 2019-08-05 | 2019-12-20 | 深圳市大拿科技有限公司 | Method and system for monitoring survival state of server |
CN110941496A (en) * | 2019-12-16 | 2020-03-31 | 上海米哈游天命科技有限公司 | Distributed lock implementation method and device, computer equipment and storage medium |
CN111143388A (en) * | 2019-12-27 | 2020-05-12 | 上海米哈游天命科技有限公司 | Resource processing method, device, equipment and storage medium |
CN111190913A (en) * | 2019-12-30 | 2020-05-22 | 联动优势(北京)数字科技有限公司 | Distributed lock implementation method and system |
CN111209593A (en) * | 2020-01-10 | 2020-05-29 | 杭州溪塔科技有限公司 | Block chain-based distributed lock processing method, related device and electronic equipment |
CN111813509A (en) * | 2020-06-09 | 2020-10-23 | 四川虹美智能科技有限公司 | Distributed cluster management method, device, storage medium and computer readable medium |
CN111858079A (en) * | 2020-07-27 | 2020-10-30 | 北京达佳互联信息技术有限公司 | Distributed lock migration method and device, electronic equipment and storage medium |
CN113076187A (en) * | 2020-01-03 | 2021-07-06 | 阿里巴巴集团控股有限公司 | Distributed lock management method and device |
CN113342507A (en) * | 2021-07-07 | 2021-09-03 | 湖南四方天箭信息科技有限公司 | Distributed lock service implementation method and device and computer equipment |
CN113485812A (en) * | 2021-07-23 | 2021-10-08 | 重庆富民银行股份有限公司 | Partition parallel processing method and system based on large data volume task |
CN113918530A (en) * | 2021-12-14 | 2022-01-11 | 北京达佳互联信息技术有限公司 | Method and device for realizing distributed lock, electronic equipment and medium |
CN116400853A (en) * | 2023-02-21 | 2023-07-07 | 北京志凌海纳科技有限公司 | Distributed block storage system and manufacturing-oriented fault recovery time shortening method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252603A (en) * | 2008-04-11 | 2008-08-27 | 清华大学 | Cluster distributed type lock management method based on storage area network SAN |
CN106033422A (en) * | 2015-03-11 | 2016-10-19 | 中国移动通信集团内蒙古有限公司 | A database operation control method, device and system |
CN107181789A (en) * | 2017-03-31 | 2017-09-19 | 北京奇艺世纪科技有限公司 | A kind of distributed lock implementation method and device |
CN107544850A (en) * | 2016-06-29 | 2018-01-05 | 百度在线网络技术(北京)有限公司 | Method and apparatus for controlling distributed lock |
-
2018
- 2018-12-14 CN CN201811534290.2A patent/CN109766324A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252603A (en) * | 2008-04-11 | 2008-08-27 | 清华大学 | Cluster distributed type lock management method based on storage area network SAN |
CN106033422A (en) * | 2015-03-11 | 2016-10-19 | 中国移动通信集团内蒙古有限公司 | A database operation control method, device and system |
CN107544850A (en) * | 2016-06-29 | 2018-01-05 | 百度在线网络技术(北京)有限公司 | Method and apparatus for controlling distributed lock |
CN107181789A (en) * | 2017-03-31 | 2017-09-19 | 北京奇艺世纪科技有限公司 | A kind of distributed lock implementation method and device |
Non-Patent Citations (5)
Title |
---|
IT实战联盟: "京东技术:如何实现靠谱的分布式锁?(附SharkLock的设计选择)", 《HTTP://VLAMBDA.COM/WZ_WZZG2CLYML.HTML》 * |
京东技术: "如何实现靠谱的分布式锁?(附Sharklock的设计选择)", 《HTTPS://CLOUD.TENCENT.COM/DEVELOPER/ARTICLE/1348743》 * |
张红娟等: "数据库原理", 《数据库原理》 * |
程序员小新人学习: "如何实现靠谱的分布式锁?", 《HTTPS://KKNEWS.CC/CODE/BGAEPJJ.HTML》 * |
鞠明业等: "如何实现靠谱的分布式锁?(附SharkLock的设计选择)", 《HTTPS://WWW.SOHU.COM/A/256100676_671058》 * |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110601914A (en) * | 2019-08-05 | 2019-12-20 | 深圳市大拿科技有限公司 | Method and system for monitoring survival state of server |
CN110941496A (en) * | 2019-12-16 | 2020-03-31 | 上海米哈游天命科技有限公司 | Distributed lock implementation method and device, computer equipment and storage medium |
CN111143388A (en) * | 2019-12-27 | 2020-05-12 | 上海米哈游天命科技有限公司 | Resource processing method, device, equipment and storage medium |
CN111190913A (en) * | 2019-12-30 | 2020-05-22 | 联动优势(北京)数字科技有限公司 | Distributed lock implementation method and system |
CN113076187B (en) * | 2020-01-03 | 2024-01-09 | 阿里巴巴集团控股有限公司 | Distributed lock management method and device |
CN113076187A (en) * | 2020-01-03 | 2021-07-06 | 阿里巴巴集团控股有限公司 | Distributed lock management method and device |
CN111209593A (en) * | 2020-01-10 | 2020-05-29 | 杭州溪塔科技有限公司 | Block chain-based distributed lock processing method, related device and electronic equipment |
CN111813509A (en) * | 2020-06-09 | 2020-10-23 | 四川虹美智能科技有限公司 | Distributed cluster management method, device, storage medium and computer readable medium |
CN111858079A (en) * | 2020-07-27 | 2020-10-30 | 北京达佳互联信息技术有限公司 | Distributed lock migration method and device, electronic equipment and storage medium |
CN111858079B (en) * | 2020-07-27 | 2024-03-12 | 北京达佳互联信息技术有限公司 | Distributed lock migration method and device, electronic equipment and storage medium |
CN113342507A (en) * | 2021-07-07 | 2021-09-03 | 湖南四方天箭信息科技有限公司 | Distributed lock service implementation method and device and computer equipment |
CN113342507B (en) * | 2021-07-07 | 2024-03-29 | 湖南四方天箭信息科技有限公司 | Distributed lock service realization method and device and computer equipment |
CN113485812B (en) * | 2021-07-23 | 2023-12-12 | 重庆富民银行股份有限公司 | Partition parallel processing method and system based on large-data-volume task |
CN113485812A (en) * | 2021-07-23 | 2021-10-08 | 重庆富民银行股份有限公司 | Partition parallel processing method and system based on large data volume task |
CN113918530B (en) * | 2021-12-14 | 2022-05-13 | 北京达佳互联信息技术有限公司 | Method and device for realizing distributed lock, electronic equipment and medium |
CN113918530A (en) * | 2021-12-14 | 2022-01-11 | 北京达佳互联信息技术有限公司 | Method and device for realizing distributed lock, electronic equipment and medium |
CN116400853A (en) * | 2023-02-21 | 2023-07-07 | 北京志凌海纳科技有限公司 | Distributed block storage system and manufacturing-oriented fault recovery time shortening method |
CN116400853B (en) * | 2023-02-21 | 2023-11-07 | 北京志凌海纳科技有限公司 | Distributed block storage system and manufacturing-oriented fault recovery time shortening method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109766324A (en) | Control method, device, readable storage medium storing program for executing and the electronic equipment of distributed lock | |
US11777916B2 (en) | Wireless local area network WLAN access method, terminal, and server | |
CN111030936B (en) | Current-limiting control method and device for network access and computer-readable storage medium | |
US20220070304A1 (en) | Information Reminding Method and Apparatus, and Electronic Terminal | |
EP2933723A1 (en) | Method, device and terminal equipment for cleaning up memory | |
CN103944869A (en) | Wake on cloud | |
KR20170006813A (en) | Method and Apparatus for Supporting Secure Chat | |
US9510136B2 (en) | Access control in bluetooth® low energy devices | |
US11895364B2 (en) | Bluetooth connection method and television | |
US20160308768A1 (en) | Electronic device and method for operating communication of the same | |
US20160063281A1 (en) | System and method for improved security for a processor in a portable computing device (pcd) | |
WO2018176741A1 (en) | Voice service processing method, device, and terminal | |
US11888690B2 (en) | System and method for subscription limitation enforcement in distributed system | |
US11361091B2 (en) | Information processing device, access control method, system, and storage medium | |
CN107305608A (en) | The management method and device of terminal device | |
US9641606B2 (en) | Peer to peer secure synchronization between handheld devices | |
CN108712280B (en) | Network function management method and device, storage medium and intelligent terminal | |
WO2020034522A1 (en) | Method and apparatus for connecting to network, smart device, and user terminal | |
CN111522650A (en) | Service request processing method and device of distributed system and electronic equipment | |
US11689921B2 (en) | Cellular service management for secondary mobile wireless devices | |
JP6259674B2 (en) | Mobile terminal, program, and download data erasing method | |
US20220295378A1 (en) | Systems and methods for preventing undesired access barring alleviation | |
KR102227488B1 (en) | Method for Sending Message based on Communication Network | |
CN113596967A (en) | WIFI dormancy control method and device for MIFI equipment, computer equipment and storage medium | |
KR20170001481A (en) | Electronic device and communication method of thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190517 |
|
RJ01 | Rejection of invention patent application after publication |