CN111833488A - Lock opening and closing method and device, electronic lock and storage medium - Google Patents

Lock opening and closing method and device, electronic lock and storage medium Download PDF

Info

Publication number
CN111833488A
CN111833488A CN201911420680.1A CN201911420680A CN111833488A CN 111833488 A CN111833488 A CN 111833488A CN 201911420680 A CN201911420680 A CN 201911420680A CN 111833488 A CN111833488 A CN 111833488A
Authority
CN
China
Prior art keywords
request
lock
serial number
closing
current
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.)
Granted
Application number
CN201911420680.1A
Other languages
Chinese (zh)
Other versions
CN111833488B (en
Inventor
杨志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Qian Technology Co ltd
Original Assignee
Beijing Qisheng Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Qisheng Technology Co Ltd filed Critical Beijing Qisheng Technology Co Ltd
Priority to CN201911420680.1A priority Critical patent/CN111833488B/en
Publication of CN111833488A publication Critical patent/CN111833488A/en
Application granted granted Critical
Publication of CN111833488B publication Critical patent/CN111833488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00571Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit

Abstract

The method determines the serial number corresponding to each lock opening/closing request based on each lock opening/closing request, judges whether the same operation request is received or not according to the serial numbers, and executes the corresponding lock opening or closing operation of the request under different conditions, prevents repeated lock opening or closing operation caused by that the device lock receives multiple channels of requests at the same time, ensures the normal use of the device lock, and reduces the probability of failure of the device lock.

Description

Lock opening and closing method and device, electronic lock and storage medium
Technical Field
The disclosure relates to the field of mobile internet, and in particular, to a locking and unlocking method and device, an electronic lock, and a storage medium.
Background
In the prior art, when the mobile device performs an unlocking operation on various shared devices such as a shared bicycle, a shared electric vehicle, and a shared charging device, the unlocking and locking request may be issued through multiple channels such as bluetooth, a short message, and a third-party scanning two-dimensional code. However, due to various reasons such as network connection quality and signal delay, the lock opening and closing requests sent through multiple channels are likely to arrive at the sharing device in sequence, and at this time, the sharing device receives multiple requests with the same purpose, so that the device lock can continuously perform multiple same lock opening or lock closing operations, normal use of the device lock is affected, and faults are likely to occur.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method and an apparatus for locking and unlocking, an electronic lock, and a storage medium, so as to solve the problem in the prior art that a multi-channel locking and unlocking request caused by a communication problem causes multiple corresponding operations on a device, affects normal use of a device lock, and is prone to failure.
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme: a method of opening and closing a lock, comprising: receiving a current lock opening/closing request sent by a user in a preset mode; determining a first serial number of the received current on/off lock request; judging whether the first serial number of the current lock opening/closing request is the same as a second serial number of a last lock opening/closing request of the current lock opening/closing request; and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the first serial number is different from the second serial number.
Further, after the determining whether the first serial number of the current lock on/off request is the same as the second serial number of the last lock on/off request of the current lock on/off request, the method further includes: detecting whether the last lock on/off request is successfully executed in the case that the first serial number is the same as the second serial number; ignoring the current lock on/off request if the last lock on/off request was successfully executed; and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the last lock opening/closing request is not successfully executed.
Further, the first serial number and the second serial number include at least: the type code of the lock on/off request, the lock code, and the user ID.
Further, the preset mode at least comprises one of the following modes: wireless transmission mode, short message transmission mode, network communication mode.
The embodiment of the present disclosure further discloses a switch lock device, including: the receiving module is used for receiving a current lock opening/closing request sent by a user in a preset mode; a determining module, configured to determine a first serial number of the received current lock on/off request; a judging module, configured to judge whether the first serial number of the current lock on/off request is the same as a second serial number of a previous lock on/off request of the current lock on/off request; and the execution module is used for correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the first serial number is different from the second serial number.
Further, the execution module is further configured to: detecting whether the last lock on/off request is successfully executed in the case that the first serial number is the same as the second serial number; ignoring the current lock on/off request if the last lock on/off request was successfully executed; and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the last lock opening/closing request is not successfully executed.
Further, the first serial number and the second serial number include at least: the type code of the lock on/off request, the lock code, and the user ID.
Further, the preset mode at least comprises one of the following modes: wireless transmission mode, short message transmission mode, network communication mode.
The embodiment of the present disclosure further discloses an electronic lock, which at least includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the lock opening and closing method when executing the computer program on the memory.
The embodiment of the disclosure also discloses a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the locking and unlocking method is executed.
The beneficial effects of this disclosed embodiment lie in: the corresponding serial number of each lock opening/closing request is determined based on the serial number, whether the same operation request is received or not is judged according to the serial number, and the corresponding lock opening or lock closing operation of the request is executed under different conditions, so that repeated lock opening or lock closing operation caused by the fact that the device lock receives multiple channels of requests at the same time is prevented, normal use of the device lock is guaranteed, and the probability of failure of the device lock is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for locking and unlocking in a first embodiment of the present disclosure;
FIG. 2 is a flow chart of another embodiment of a method for locking and unlocking a lock according to a first embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a switch lock device according to a second embodiment of the disclosure;
fig. 4 is a schematic structural diagram of an electronic lock according to a third embodiment of the present disclosure.
Detailed Description
Various aspects and features of the present application are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It should also be understood that, although the present application has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of application, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
A first embodiment of the present disclosure provides a lock opening and closing method, which is mainly applied to unlocking an equipment lock for sharing and using by different users through multiple ways, such as a shared bicycle, a shared electric vehicle, a shared automobile, a shared power supply, and the like, and a flowchart of the method is shown in fig. 1, and mainly includes steps S101 to S104:
s101, receiving a current lock opening/closing request sent by a user in a preset mode;
s102, determining a first serial number of the received current lock opening/closing request;
s103, judging whether a first serial number of the current lock opening/closing request is the same as a second serial number of a last lock opening/closing request of the current lock opening/closing request or not;
and S104, correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the first serial number is different from the second serial number.
When a user wants to use a certain sharing device or wants to stop using a certain sharing device, the user can send an unlocking request or a locking request to a device lock of the sharing device in a preset mode such as a wireless transmission mode, a short message transmission mode, a network communication mode and the like, and after paying a certain fee, the user can use or return the sharing device. Specifically, the wireless transmission mode may specifically include bluetooth transmission, infrared transmission, Near Field Communication (NFC) transmission, and the like, and the network Communication mode may specifically include two-dimensional code or barcode scanning, and the like. In actual use, the following often occurs: when a user unlocks the shared bicycle by scanning the two-dimensional code, the unlocking of the corresponding shared bicycle is not performed after the unlocking request is sent, at the moment, the user may perform code scanning operation again or resend the unlocking request in other modes, but due to network delay and the like, the shared bicycle may receive multiple unlocking requests sent by the user at different times through different channels at the same time, and at the moment, the shared bicycle continuously executes unlocking operation according to all the unlocking requests, so that the user cannot normally use the shared bicycle even if the shared bicycle is in an unlocking state.
In order to solve the above problems, in this embodiment, after receiving a current lock opening/closing request sent by a user in a preset manner, a serial number corresponding to the received current lock opening/closing request is determined, and then it is determined whether the serial number of the current lock opening/closing request is the same as a serial number of a previous lock opening/closing request of the current lock opening/closing request, if the serial numbers are different, it is verified that the current request and the previous request belong to different users or are requests that desire to perform different operations on an equipment lock from the previous request, and at this time, an unlocking or locking operation corresponding to the current request is performed again, so that it is possible to prevent repeated unlocking or locking operations from being performed due to multiple requests received by the equipment lock at the same time, ensure normal use of the equipment lock, and reduce a probability of failure thereof.
Specifically, no matter what manner the unlocking request or the locking request sent by the user is sent, a corresponding serial number needs to be determined for each unlocking request or locking request. In this embodiment, the serial number at least includes the following codes or codes: firstly, a type code of an on/off lock request is used for indicating whether a user currently wants to open or close the equipment lock, the first position in the serial number can be set as a code for indicating the type of the on/off lock request, when the position code is set to be 1, the request is an unlocking request, and when the position code is 0, the request is an off lock request; secondly, the serial number also comprises a code for executing the equipment lock of the current request, and the equipment lock of each sharing equipment has a unique code, so that the same request can be prevented from controlling two different pieces of equipment; in addition, the serial number should also include the ID of the requesting user, each user having a different ID to characterize the identity of the user. In this embodiment, the first serial number and the second serial number are serial numbers corresponding to different requests, respectively, and may be determined according to the type of the lock opening/closing request, the device lock code, and the user ID carried in the request after the device lock receives the request, or may be directly generated according to the above contents and carried in the request when the user sends the request, and the device lock directly obtains the serial number carried in the request after receiving the request. Since the transmission mode is not limited in the process of serial number determination, namely, a plurality of unlocking requests sent by the same user to the same equipment are sent by the same user through different channels, the corresponding serial numbers are the same.
Fig. 2 shows a flowchart of another embodiment of the method for opening and closing the lock, which mainly includes steps S201 to S207:
s201, receiving a current lock opening/closing request sent by a user in a preset mode;
s202, determining a first serial number of the received current lock opening/closing request;
s203, judging whether a first serial number of the current lock opening/closing request is the same as a second serial number of a last lock opening/closing request of the current lock opening/closing request, and executing S204 under different conditions, or executing S205 under the same condition;
s204, correspondingly executing unlocking or locking operation according to the current lock opening/closing request;
s205, detecting whether the last lock opening/closing request is successfully executed, if so, executing S206, otherwise, executing S207;
s206, ignoring the current lock opening/closing request;
and S207, correspondingly executing unlocking or locking operation according to the current lock opening/closing request.
It should be noted that S201 to S204 in fig. 2 are the same as S101 to S104 in fig. 1, and the description thereof is not repeated.
Under the condition that the first serial number of the current lock opening/closing request is the same as the second serial number of the last lock opening/closing request of the current lock opening/closing request, the fact that the current request is a request which is sent by the same user and has the same purpose as the previous request can be proved, whether the previous request is executed successfully or not can be detected, and whether the current request is processed or not is determined according to the execution result of the previous request.
Specifically, under the condition that the previous request is successfully executed, the device lock of the sharing device is required to be opened according to the previous unlocking request or closed according to the previous locking request, and the current locking/unlocking request with the same serial number as the previous locking/unlocking request is received and ignored, that is, the currently received locking/unlocking request is not processed any more, so that the device lock is prevented from executing multiple locking/unlocking operations and affecting the normal use of a user; if the previous request is not successfully executed, that is, the device lock does not complete unlocking after receiving the previous unlocking request, or does not complete locking after receiving the previous locking request, at this time, even if the serial number of the currently received locking/unlocking request is the same as that of the previous locking/unlocking request, the device lock executes the unlocking or locking operation of the corresponding device lock according to the currently received locking/unlocking request, so as to complete the operation that the user actually wants to execute on the device lock.
In the embodiment, under the condition that the first serial number of the current lock opening/closing request is the same as the second serial number of the last lock opening/closing request of the current lock opening/closing request, in order to prevent the device lock from not correctly executing the last request due to communication or other reasons, different processing is performed on the current request according to the execution result of the last request, so that even under the condition that the device lock receives multiple channels of requests at the same time, the operation that a user wants to be realized can be correctly realized while the request is prevented from being repeatedly executed, and under the condition that the use experience of the user is improved, the risk that the device lock fails is reduced.
A second embodiment of the present disclosure provides a locking and unlocking device, which can be installed in an equipment lock that is unlocked in multiple ways for different users to share and use, such as a shared bicycle, a shared electric vehicle, a shared automobile, and a shared power supply, and is used to control the opening or closing of the equipment lock, and a schematic structural diagram of the locking and unlocking device is shown in fig. 3, and mainly includes: a receiving module 10, configured to receive a current lock opening/closing request sent by a user in a preset manner; a determining module 20, coupled to the receiving module 10, for determining a first serial number of the received current lock on/off request; a determining module 30, coupled to the determining module 20, for determining whether a first serial number of a current lock on/off request is the same as a second serial number of a previous lock on/off request of the current lock on/off request; and the executing module 40 is coupled with the judging module 30 and is used for correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the first serial number is different from the second serial number.
When a user wants to use a certain sharing device or wants to stop using a certain sharing device, the user can send an unlocking request or a locking request to a device lock of the sharing device in a preset mode such as a wireless transmission mode, a short message transmission mode, a network communication mode and the like, and after paying a certain fee, the user can use or return the sharing device. Specifically, the wireless transmission mode may specifically include bluetooth transmission, infrared transmission, Near Field Communication (NFC) transmission, and the like, and the network Communication mode may specifically include two-dimensional code or barcode scanning, and the like. In actual use, the following often occurs: when a user unlocks the shared bicycle by scanning the two-dimensional code, the unlocking of the corresponding shared bicycle is not performed after the unlocking request is sent, at the moment, the user may perform code scanning operation again or resend the unlocking request in other modes, but due to network delay and the like, the shared bicycle may receive multiple unlocking requests sent by the user at different times through different channels at the same time, and at the moment, the shared bicycle continuously executes unlocking operation according to all the unlocking requests, so that the user cannot normally use the shared bicycle even if the shared bicycle is in an unlocking state.
In order to solve the above problem, in this embodiment, after receiving a current lock opening/closing request sent by a user in a preset manner, a receiving module 10 of the lock opening/closing apparatus determines, by a determining module 20, a first serial number corresponding to the received current lock opening/closing request, and then a determining module 30 determines whether the first serial number of the current lock opening/closing request is the same as a second serial number of a previous lock opening/closing request of the current lock opening/closing request, if the first serial number of the current lock opening/closing request is not the same as the second serial number of the previous lock opening/closing request of the current lock opening/closing request, it is proved that the current request and the previous request belong to different users or are requests that wish to perform different operations on an apparatus lock, and at this time, an executing module 40 executes an unlocking or locking operation corresponding to the current request, controls the apparatus lock to open or close, so as to prevent the apparatus lock from repeatedly performing the unlocking or locking, the normal use of the equipment lock is ensured, and the probability of the equipment lock breaking down is reduced.
Specifically, regardless of the manner in which the user makes the unlocking request or the locking request, the corresponding serial number needs to be determined by the determination module 20 for each unlocking request or locking request. In this embodiment, the serial number at least includes the following codes or codes: firstly, a type code of an on/off lock request is used for indicating whether a user currently wants to open or close the equipment lock, the first position in the serial number can be set as a code for indicating the type of the on/off lock request, when the position code is set to be 1, the request is an unlocking request, and when the position code is 0, the request is an off lock request; secondly, the serial number also comprises a code for executing the equipment lock of the current request, and the equipment lock of each sharing equipment has a unique code, so that the same request can be prevented from controlling two different pieces of equipment; in addition, the serial number should also include the ID of the requesting user, each user having a different ID to characterize the identity of the user. In this embodiment, the first serial number and the second serial number are serial numbers corresponding to different requests, respectively, and may be determined by the determining module 20 according to the type of the lock on/off request, the device lock code, and the user ID carried in the request after the receiving module 10 receives the request, or may be directly generated according to the above contents and carried in the request when the user sends the request, and the determining module 20 directly obtains the serial number carried in the request after the receiving module 10 receives the request. Since the transmission mode is not limited in the process of serial number determination, namely, a plurality of unlocking requests sent by the same user to the same equipment are sent by the same user through different channels, the corresponding serial numbers are the same.
In the case that the determining module 30 determines that the first serial number of the current lock on/off request is the same as the second serial number of the previous lock on/off request of the current lock on/off request, it can be proved that the current request is actually a request which is sent by the same user and has the same purpose as the previous request, and at this time, the executing module 40 can detect whether the previous request is successfully executed, and determine whether to process the current request according to the execution result of the previous request.
Specifically, under the condition that the previous request is successfully executed, the device lock of the sharing device should be already opened according to the previous unlocking request or closed according to the previous locking request, and at this time, the execution module 40 ignores the current locking/unlocking request with the same serial number as the previous locking/unlocking request, that is, the currently received locking/unlocking request is not processed any more, so that the device lock is prevented from executing multiple locking/unlocking operations and affecting the normal use of the user; if the previous request is not successfully executed, that is, the device lock does not complete unlocking after receiving the previous unlocking request, or the device lock does not complete locking after receiving the previous locking request, at this time, even if the serial number of the currently received lock opening/closing request is the same as that of the previous lock opening/closing request, the execution module 40 executes the unlocking or locking operation of the corresponding device lock according to the currently received lock opening/closing request, so as to complete the operation that the user actually desires to execute on the device lock.
In the embodiment, under the condition that the first serial number of the current lock opening/closing request is the same as the second serial number of the last lock opening/closing request of the current lock opening/closing request, in order to prevent the device lock from not correctly executing the last request due to communication or other reasons, different processing is performed on the current request according to the execution result of the last request, so that even under the condition that the device lock receives multiple channels of requests at the same time, the operation that a user wants to be realized can be correctly realized while the request is prevented from being repeatedly executed, and under the condition that the use experience of the user is improved, the risk that the device lock fails is reduced.
A third embodiment of the present disclosure discloses an electronic lock, which is mainly used as an equipment lock of a shared bicycle, a shared electric vehicle, a shared automobile, a shared power supply, and the like, and can receive an unlocking or locking instruction issued in various different manners and correspondingly perform an opening or closing operation. Specifically, the schematic structural diagram of the electronic lock is shown in fig. 4, and includes at least a memory 100 and a processor 200, where the memory 100 stores a computer program, and the processor 200 implements the following steps S1 to S4 when executing the computer program on the memory 100:
s1, receiving the current lock opening/closing request sent by the user in a preset mode;
s2, determining a first serial number of the received current lock opening/closing request;
s3, judging whether the first serial number of the current lock opening/closing request is the same as the second serial number of the last lock opening/closing request of the current lock opening/closing request;
and S4, when the first serial number is different from the second serial number, correspondingly executing unlocking or locking operation according to the current lock opening/closing request.
The processor 200, after performing the step of determining on the memory 100 whether the first serial number of the current on/off lock request is the same as the second serial number of the last on/off lock request of the current on/off lock request, further executes the following computer program: detecting whether the last lock on/off request is successfully executed in the case that the first serial number is the same as the second serial number; ignoring the current lock on/off request if the last lock on/off request was successfully executed; and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the last lock opening/closing request is not successfully executed.
Specifically, the first serial number and the second serial number at least include: a type code of the lock open/close request, a lock code, and a user ID; the preset mode at least comprises one of the following modes: the electronic lock comprises a wireless transmission mode, a short message transmission mode and a network communication mode, wherein the wireless transmission mode can specifically comprise a Bluetooth transmission mode, an infrared transmission mode, an NFC transmission mode and the like, and the network communication mode can specifically comprise a two-dimensional code scanning mode or a bar code scanning mode and the like, so that the electronic lock is further provided with a wireless transmission device (such as a Bluetooth device, an infrared device, an NFC device and the like), a network communication device and the like.
In the embodiment, the serial number corresponding to each lock opening/closing request is determined, whether the same operation request is received or not is judged according to the serial number, and the unlocking or locking operation corresponding to the request is executed under different conditions, so that the repeated unlocking or locking operation caused by the fact that the device lock receives multiple channels of requests at the same time is prevented, the normal use of the device lock is ensured, and the failure probability of the device lock is reduced.
A fourth embodiment of the present disclosure provides a storage medium that may be installed in various sharing devices, the storage medium having stored thereon a computer program that, when executed by a processor, performs a switch lock method as in the first embodiment of the present disclosure, including the following steps S11 to S14:
s11, receiving the current lock opening/closing request sent by the user in a preset mode;
s12, determining a first serial number of the received current lock opening/closing request;
s13, judging whether the first serial number of the current lock opening/closing request is the same as the second serial number of the last lock opening/closing request of the current lock opening/closing request;
and S14, when the first serial number is different from the second serial number, correspondingly executing unlocking or locking operation according to the current lock opening/closing request.
After the computer program is executed by the processor to judge whether the first serial number of the current lock on/off request is the same as the second serial number of the last lock on/off request of the current lock on/off request, the computer program is further executed by the processor to perform the following steps: detecting whether the last lock on/off request is successfully executed in the case that the first serial number is the same as the second serial number; ignoring the current lock on/off request if the last lock on/off request was successfully executed; and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the last lock opening/closing request is not successfully executed.
Specifically, the first serial number and the second serial number at least include: a type code of the lock open/close request, a lock code, and a user ID; the preset mode at least comprises one of the following modes: the electronic lock comprises a wireless transmission mode, a short message transmission mode and a network communication mode, wherein the wireless transmission mode can specifically comprise a Bluetooth transmission mode, an infrared transmission mode, an NFC transmission mode and the like, and the network communication mode can specifically comprise a two-dimensional code scanning mode or a bar code scanning mode and the like, so that the electronic lock is further provided with a wireless transmission device (such as a Bluetooth device, an infrared device, an NFC device and the like), a network communication device and the like.
In the embodiment, the serial number corresponding to each lock opening/closing request is determined, whether the same operation request is received or not is judged according to the serial number, and the unlocking or locking operation corresponding to the request is executed under different conditions, so that the repeated unlocking or locking operation caused by the fact that the device lock receives multiple channels of requests at the same time is prevented, the normal use of the device lock is ensured, and the failure probability of the device lock is reduced.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The storage medium may be included in the electronic device; or may exist separately without being assembled into the electronic device.
The storage medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the storage medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that the storage media described above in this disclosure can be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any storage medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
While the present disclosure has been described in detail with reference to the embodiments, the present disclosure is not limited to the specific embodiments, and those skilled in the art can make various modifications and alterations based on the concept of the present disclosure, and the modifications and alterations should fall within the scope of the present disclosure as claimed.

Claims (10)

1. A method of opening and closing a lock, comprising:
receiving a current lock opening/closing request sent by a user in a preset mode;
determining a first serial number of the received current on/off lock request;
judging whether the first serial number of the current lock opening/closing request is the same as a second serial number of a last lock opening/closing request of the current lock opening/closing request;
and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the first serial number is different from the second serial number.
2. The lock opening and closing method according to claim 1, wherein after determining whether the first serial number of the current lock opening/closing request is the same as a second serial number of a last lock opening/closing request of the current lock opening/closing request, further comprising:
detecting whether the last lock on/off request is successfully executed in the case that the first serial number is the same as the second serial number;
ignoring the current lock on/off request if the last lock on/off request was successfully executed;
and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the last lock opening/closing request is not successfully executed.
3. A method according to claim 1, wherein the first serial number and the second serial number comprise at least: the type code of the lock on/off request, the lock code, and the user ID.
4. A method as claimed in any one of claims 1 to 3, wherein the predetermined pattern includes at least one of: wireless transmission mode, short message transmission mode, network communication mode.
5. A switch lock device, comprising:
the receiving module is used for receiving a current lock opening/closing request sent by a user in a preset mode;
a determining module, configured to determine a first serial number of the received current lock on/off request;
a judging module, configured to judge whether the first serial number of the current lock on/off request is the same as a second serial number of a previous lock on/off request of the current lock on/off request;
and the execution module is used for correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the first serial number is different from the second serial number.
6. The switch-lock apparatus as claimed in claim 5, wherein the execution module is further configured to:
detecting whether the last lock on/off request is successfully executed in the case that the first serial number is the same as the second serial number;
ignoring the current lock on/off request if the last lock on/off request was successfully executed;
and correspondingly executing unlocking or locking operation according to the current lock opening/closing request under the condition that the last lock opening/closing request is not successfully executed.
7. The switch-lock device as claimed in claim 5, wherein at least one of said first serial number and said second serial number comprises: the type code of the lock on/off request, the lock code, and the user ID.
8. A switch lock device according to any one of claims 5 to 7, characterized in that the predetermined manner comprises at least one of: wireless transmission mode, short message transmission mode, network communication mode.
9. An electronic lock comprising at least a memory, a processor, the memory having a computer program stored thereon, wherein the processor implements the locking and unlocking method of any of claims 1 to 4 when executing the computer program on the memory.
10. A storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of switching a lock according to any one of claims 1 to 4.
CN201911420680.1A 2019-12-31 2019-12-31 Lock opening and closing method and device, electronic lock and storage medium Active CN111833488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911420680.1A CN111833488B (en) 2019-12-31 2019-12-31 Lock opening and closing method and device, electronic lock and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911420680.1A CN111833488B (en) 2019-12-31 2019-12-31 Lock opening and closing method and device, electronic lock and storage medium

Publications (2)

Publication Number Publication Date
CN111833488A true CN111833488A (en) 2020-10-27
CN111833488B CN111833488B (en) 2023-01-06

Family

ID=72912349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911420680.1A Active CN111833488B (en) 2019-12-31 2019-12-31 Lock opening and closing method and device, electronic lock and storage medium

Country Status (1)

Country Link
CN (1) CN111833488B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116378514A (en) * 2023-04-24 2023-07-04 德州锦城电装股份有限公司 Method and device for processing unlocking door lock, electronic equipment and medium
CN117253302A (en) * 2023-03-21 2023-12-19 小米汽车科技有限公司 Digital car key synchronization method and device, electronic equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881870A (en) * 2005-11-18 2006-12-20 华为技术有限公司 Method for safety communication between devices
CN101289908A (en) * 2007-04-19 2008-10-22 株式会社电装 Remote control system and method
CN103863248A (en) * 2012-12-07 2014-06-18 本田制锁有限公司 Remote control device for vehicle
CN106126061A (en) * 2016-06-21 2016-11-16 武汉斗鱼网络科技有限公司 A kind of interaction control method preventing adopting consecutive click chemical reaction and device
CN106920311A (en) * 2017-03-09 2017-07-04 北京云闪科技有限公司 A kind of intelligent car position lock control method, device, system and intelligent space lock
CN107097876A (en) * 2017-04-26 2017-08-29 成都步共享科技有限公司 A kind of shared bicycle unlocking system and method based on dynamic password
CN107187422A (en) * 2017-04-18 2017-09-22 北京摩拜科技有限公司 Control method for vehicle, equipment, system and vehicle
CN107592275A (en) * 2017-11-09 2018-01-16 深圳门之间科技有限公司 One kind is lined up control method and its system
CN108416876A (en) * 2018-02-05 2018-08-17 浙江齐享科技有限公司 A kind of management method and system of electric boosted shared vehicle
US20180341937A1 (en) * 2015-09-01 2018-11-29 Samsung Electronics Co., Ltd. Method and apparatus for performing settlement transaction
CN109155789A (en) * 2016-03-04 2019-01-04 康维达无线有限责任公司 Request processing in service layer
CN109408761A (en) * 2018-10-16 2019-03-01 翟红鹰 A kind of filter method of repetitive requests, system, equipment and storage medium
CN109688109A (en) * 2018-11-21 2019-04-26 武汉极意网络科技有限公司 The verification method and device of identifying code based on client-side information identification
CN109887178A (en) * 2017-12-15 2019-06-14 北京嘀嘀无限科技发展有限公司 A kind of vehicle having interim car locking function is shared, charging method and system
CN110053583A (en) * 2019-04-03 2019-07-26 广州小鹏汽车科技有限公司 People-car interaction method, system and vehicle when a kind of vehicle unlocks

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881870A (en) * 2005-11-18 2006-12-20 华为技术有限公司 Method for safety communication between devices
CN101289908A (en) * 2007-04-19 2008-10-22 株式会社电装 Remote control system and method
CN103863248A (en) * 2012-12-07 2014-06-18 本田制锁有限公司 Remote control device for vehicle
US20180341937A1 (en) * 2015-09-01 2018-11-29 Samsung Electronics Co., Ltd. Method and apparatus for performing settlement transaction
CN109155789A (en) * 2016-03-04 2019-01-04 康维达无线有限责任公司 Request processing in service layer
CN106126061A (en) * 2016-06-21 2016-11-16 武汉斗鱼网络科技有限公司 A kind of interaction control method preventing adopting consecutive click chemical reaction and device
CN106920311A (en) * 2017-03-09 2017-07-04 北京云闪科技有限公司 A kind of intelligent car position lock control method, device, system and intelligent space lock
CN107187422A (en) * 2017-04-18 2017-09-22 北京摩拜科技有限公司 Control method for vehicle, equipment, system and vehicle
CN107097876A (en) * 2017-04-26 2017-08-29 成都步共享科技有限公司 A kind of shared bicycle unlocking system and method based on dynamic password
CN107592275A (en) * 2017-11-09 2018-01-16 深圳门之间科技有限公司 One kind is lined up control method and its system
CN109887178A (en) * 2017-12-15 2019-06-14 北京嘀嘀无限科技发展有限公司 A kind of vehicle having interim car locking function is shared, charging method and system
CN108416876A (en) * 2018-02-05 2018-08-17 浙江齐享科技有限公司 A kind of management method and system of electric boosted shared vehicle
CN109408761A (en) * 2018-10-16 2019-03-01 翟红鹰 A kind of filter method of repetitive requests, system, equipment and storage medium
CN109688109A (en) * 2018-11-21 2019-04-26 武汉极意网络科技有限公司 The verification method and device of identifying code based on client-side information identification
CN110053583A (en) * 2019-04-03 2019-07-26 广州小鹏汽车科技有限公司 People-car interaction method, system and vehicle when a kind of vehicle unlocks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117253302A (en) * 2023-03-21 2023-12-19 小米汽车科技有限公司 Digital car key synchronization method and device, electronic equipment and storage medium
CN116378514A (en) * 2023-04-24 2023-07-04 德州锦城电装股份有限公司 Method and device for processing unlocking door lock, electronic equipment and medium

Also Published As

Publication number Publication date
CN111833488B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
CN111361525B (en) Vehicle locking control method and device, storage medium and electronic equipment
CN111833488B (en) Lock opening and closing method and device, electronic lock and storage medium
CN103297468A (en) Operation method for group resources and group server
CN111565404A (en) Data distribution method and device
US10791455B2 (en) Method for triggering network policy update, management function entity and core network device
CN108513361B (en) Channel access method, device and storage medium
CN110177010B (en) Link switching method and device
CN104619045A (en) Access control method and device for mobile terminal
CN105828402A (en) Blind redirection method, core network and base station
US10136318B1 (en) Authentication device selection to facilitate authentication via an updateable subscriber identifier
US10979280B2 (en) Managing devices through secondary communication channels
CN113489689B (en) Authentication method and device for access request, storage medium and electronic equipment
WO2022022912A1 (en) Service request handling
US20230308429A1 (en) Method and apparatus related to authorisation tokens for service requests
CN112581659A (en) Digital key user passing method, device, system and storage medium
CN112825571A (en) Network function management, registration and request method, device, network element and medium
US10091718B2 (en) System and method for wireless network selection
US20230083529A1 (en) Selection of service-providing network functions in a 3gpp communication network
CN114071453B (en) Information processing method, device, equipment and readable storage medium
CN114205902A (en) Response method and device for discovery request in 5G network, electronic equipment and medium
EP2150090B1 (en) Multimode terminal with optimized connections
WO2019159373A1 (en) Communication control method and communication system
CN105323848B (en) Data channel control method and device and server
CN115484652B (en) Cell switching method, device, server and storage medium
CN115396979A (en) Communication method, device, server and storage medium

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
TA01 Transfer of patent application right

Effective date of registration: 20221207

Address after: 510240 No. 3-4, dasonggang, Jiangnan Avenue Middle Road, Haizhu District, Guangzhou, Guangdong Province (office only)

Applicant after: Guangzhou Qian Technology Co.,Ltd.

Address before: Room 203, 2 / F, building 34, yard 8, Dongbei Wangxi Road, Haidian District, Beijing 100193

Applicant before: Beijing Qisheng Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant