Disclosure of Invention
In view of this, the embodiment of the invention provides an unlocking and locking method and device, so as to solve the problem of car renting and returning failures caused by damage of two-dimensional codes.
Therefore, the embodiment of the invention provides the following technical scheme:
according to a first aspect, an embodiment of the present invention provides an unlocking method, including:
sending a magnetic field signal to the radio frequency tag; receiving identification information fed back by the radio frequency tag;
generating an unlocking request according to the identification information; and sending the unlocking request to a server.
Optionally, in the unlocking method in the embodiment of the present invention, generating the unlocking request according to the identification information includes:
acquiring authentication information;
and generating an unlocking request comprising the identification information and the authentication information.
According to a second aspect, an embodiment of the present invention provides an unlocking apparatus, including:
the radio frequency coil is used for generating a magnetic field signal sent to the radio frequency tag and receiving identification information fed back by the radio frequency tag; at least one first processor, and a first memory communicatively coupled to the at least one first processor; wherein the first memory stores instructions executable by the one first processor to enable the at least one first processor to generate an unlocking request based on the identification information; and the transmitting unit is used for transmitting the unlocking request to the server.
Optionally, in the unlocking apparatus in the embodiment of the present invention, the first memory stores instructions executable by the one first processor, and the instructions are executed by the at least one first processor to enable the at least one first processor to:
acquiring authentication information;
and generating an unlocking request comprising the identification information and the authentication information.
According to a third aspect, an embodiment of the present invention provides a locking method, including:
after receiving the magnetic field signal, sending pre-stored identification information; and after receiving an unlocking instruction sent by the server, controlling the corresponding lock to be opened.
Optionally, in the locking method in the embodiment of the present invention, after receiving the unlocking instruction sent by the server, controlling the corresponding lock to be unlocked includes:
after receiving an unlocking instruction sent by a server, extracting identification information of a corresponding lock from the unlocking instruction;
matching the identification information of the corresponding lock with the pre-stored identification information;
and if the matching is successful, controlling the corresponding lock to be opened.
According to a fourth aspect, an embodiment of the present invention provides a lock apparatus, including:
the radio frequency tag is used for sending pre-stored identification information after receiving the magnetic field signal; at least one second processor, and a second memory communicatively coupled to the at least one second processor; the second memory stores instructions executable by the second processor, and the instructions are executed by the at least one second processor, so that the at least one second processor can control the corresponding lock to be opened after receiving an unlocking instruction sent by the server.
Optionally, the locking device of the embodiments of the present invention, the locking device is used on a bicycle.
Optionally, the locking device according to the embodiment of the present invention further includes:
the state acquisition device is used for acquiring the motion state information of the bicycle; the second processor is further capable of: judging whether the bicycle is in a static state or not according to the motion state information;
if the bicycle is in a static state within a preset time length, sending a bicycle locking request to a server; and after receiving the vehicle locking instruction fed back by the server, controlling the corresponding lock to be locked.
Optionally, in the locking device according to the embodiment of the present invention, the state acquisition device includes a positioning sensor and/or a vibration sensor; the positioning sensor is used for acquiring horizontal position change information of the bicycle; the vibration sensor is used for acquiring vertical position change information of the bicycle; and the second processor judges that the bicycle is in a static state when the horizontal position change information or the vertical position change information is 0.
Optionally, in the locking device according to the embodiment of the present invention, the radio frequency tag is disposed in the protective case.
Optionally, in the locking device according to the embodiment of the present invention, a luminous film is disposed on the protective casing.
According to a fifth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the unlocking method of the first aspect or any one of the alternatives of the first aspect, the locking method of the third aspect or any one of the alternatives of the third aspect.
According to a sixth aspect, embodiments of the present invention further provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the unlocking method of the first aspect or any of the alternatives of the first aspect, the locking method of the third aspect or any of the alternatives of the third aspect.
The technical scheme of the embodiment of the invention has the following advantages:
the unlocking method provided by the embodiment of the invention comprises the steps of firstly sending a magnetic field signal to the radio frequency tag, receiving the identification information fed back by the radio frequency tag, then generating an unlocking request according to the identification information, and sending the unlocking request to the server. The identification information fed back by the radio frequency tag is received through the near field communication technology, even if the radio frequency tag is stained and smeared, the radio frequency tag is not influenced to feed back complete identification information, the server can lock an object needing unlocking according to an unlocking request containing the identification information, and sends an unlocking instruction aiming at the unlocking object to realize directional unlocking. The problem that in the prior art, a series of problems such as car renting or car returning failure and the like caused by failure in reading identification information due to damage of the two-dimensional code are solved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an unlocking method which can be applied to public bicycle leasing. Of course, the unlocking method in the embodiment of the present invention is not limited to this. In the prior art, public bicycle renting usually adopts an intelligent lock to lock a bicycle, and the intelligent lock comprises a control part and a locking part. The user obtains the identification information of the bicycle stored by the two-dimensional code by scanning the two-dimensional code on the bicycle through the intelligent terminal, the intelligent terminal can be a handheld terminal such as a smart phone, and an application program which can generate an unlocking request containing the identification information according to the identification information and send the unlocking request to the server is installed in the intelligent terminal. After receiving the unlocking request, the server verifies the unlocking request, sends an unlocking instruction to the control part of the intelligent lock after the verification is passed, and controls the locking part to be opened through the control part. A plurality of fixed leasing points are not required to be arranged for leasing and returning the car, and the user can conveniently realize the leasing and returning the car by downloading the leasing software. However, the two-dimensional code technology is difficult to prevent artificial damage, for example, the two-dimensional code is scratched or smeared or stained by an operator, and the identification information of the bicycle cannot be accurately acquired, so that the bicycle renting or returning fails.
In order to solve the above problem, as shown in fig. 1, an unlocking method in an embodiment of the present invention includes:
and S11, sending a magnetic field signal to the radio frequency tag. Specifically, an NFC-enabled smart terminal, such as a smart phone, may be selected to transmit a magnetic field signal to a radio frequency tag (NFC tag). After receiving the magnetic field signal, the radio frequency tag generates induced current, and identification information pre-stored in the radio frequency tag is sent out through NFC near field communication between the radio frequency tag and the intelligent terminal. And because the radio frequency tag is a passive device, extra power supply is not needed, the structure is simple, the cost is low, and the radio frequency tag is not easy to damage.
And S12, receiving identification information fed back by the radio frequency tag.
And S13, generating an unlocking request according to the identification information.
And S14, sending an unlocking request to the server. Specifically, the unlocking request is generated according to the identification information, so that the server can conveniently determine the object (such as the intelligent lock corresponding to the identification information) to be unlocked through the unlocking request, and can feed back the corresponding unlocking instruction on the basis.
According to the unlocking method in the embodiment of the invention, the identification information fed back by the radio frequency tag is received through the near field communication technology, even if the radio frequency tag is stained and smeared, the radio frequency tag is not influenced to feed back complete identification information, the server can lock an object to be unlocked according to an unlocking request containing the identification information, and an unlocking instruction aiming at the unlocked object is sent out, so that directional unlocking is realized. The problem that in the prior art, a series of problems such as car renting or car returning failure and the like caused by failure in reading identification information due to damage of the two-dimensional code are solved.
Optionally, step S14 further includes:
and S141, acquiring authentication information. Specifically, the authentication information may include an ID number of the smart terminal, payment information, and the like.
And S142, generating an unlocking request comprising the identification information and the authentication information. Specifically, after receiving the unlocking request including the identification information and the authentication information, the server verifies the authentication information (for example, whether the intelligent terminal user pays the related fee for renting the car or not is verified), and if the verification is passed, the server generates the unlocking instruction corresponding to the identification information, so that the safety performance of the unlocking process is improved while directional unlocking is realized.
Fig. 2 is an unlocking device capable of executing the unlocking method according to an embodiment of the present invention, including:
and the radio frequency coil 11 is used for generating a magnetic field signal sent to the radio frequency tag and receiving identification information fed back by the radio frequency tag.
At least one first processor 12, and a first memory 13 communicatively coupled to the at least one first processor 12; wherein,
the first memory 13 stores instructions executable by one of the first processors 12, the instructions being executable by at least one of the first processors 12 to enable the at least one of the first processors 12 to generate an unlocking request based on the identification information.
And the transmitting unit 14 is used for sending an unlocking request to the server.
Optionally, the first memory 13 stores instructions executable by the first processor 12, the instructions being executable by the at least one first processor 12 to enable the at least one first processor 12 to:
and acquiring authentication information.
An unlocking request including identification information and authentication information is generated.
Specifically, the first processor 12, the first memory 13, the radio frequency coil 11 and the transmitting unit 14 may be connected by a bus or other means, and the bus connection is exemplified in fig. 2.
The first processor 12 may be a Central Processing Unit (CPU). The first Processor 12 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The first memory 13, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The first processor 12 executes various functional applications and data processing of the server, i.e. a processing method for implementing the list item operations of the above-described method embodiments, by running the non-transitory software programs, instructions and modules stored in the first memory 13.
The first memory 13 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the processing apparatus operated by the list items, and the like. Further, the first memory 13 may comprise a high speed random access memory, and may also comprise a non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the first memory 13 may optionally include memory located remotely from the first processor 12, which may be connected over a network to a processing device operating the list items. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the first memory 13 and, when executed by the one or more first processors 12, perform the method as shown in fig. 1.
The product can execute the unlocking method provided by the embodiment of the invention, and has the corresponding functional module and beneficial effect of executing the unlocking method. For details of the technique not described in detail in the embodiment, reference may be made to the related description in the embodiment shown in fig. 1.
Optionally, the unlocking device in the embodiment of the present invention may be a terminal device such as a smart phone with an NFC module, and an application program capable of executing the unlocking method is stored in a memory of the unlocking device. When the application program is used, the NFC module of the smart phone generates a magnetic field signal and sends the magnetic field signal to the radio frequency tag, after identification information fed back by the radio frequency tag is received, an unlocking request is generated according to the identification information, and the unlocking request is sent to a remote server through the communication module of the smart phone.
The embodiment of the invention also provides a locking method, which can be applied to public bicycle leasing. Of course, the locking method in the embodiment of the present invention is not limited thereto. As shown in fig. 3, the locking method in the embodiment of the present invention includes:
and S21, sending pre-stored identification information after receiving the magnetic field signal.
And S22, after receiving an unlocking instruction sent by the server, controlling the corresponding lock to be opened.
According to the locking method in the embodiment of the invention, the prestored identification information is sent after the magnetic field signal is received, the server can lock the object to be unlocked according to the unlocking request containing the identification information, and the unlocking signal is sent in a directional manner, so that a series of problems such as car renting or car returning failure and the like caused by failure in reading the identification information due to damage of the two-dimensional code are avoided.
Optionally, in the locking method in the embodiment of the present invention, step S22 further includes:
s221, after receiving an unlocking instruction sent by the server, extracting identification information of the corresponding lock from the unlocking instruction. Specifically, because the unlocking request sent to the server includes the identification information, the server can determine the corresponding lock which needs to send the unlocking instruction to realize directional unlocking. Therefore, identification information of the corresponding lock (for example, information such as the number of the lock to be unlocked) can be extracted from the unlocking command.
And S222, matching the identification information of the corresponding lock with the pre-stored identification information.
And S223, if the matching is successful, controlling the corresponding lock to be opened. Specifically, because the identification information pre-stored in the radio frequency tag is the identification information included in the unlocking request sent to the server, by matching the identification information of the corresponding lock included in the unlocking instruction with the pre-stored identification information included in the unlocking request, it can be further determined whether the unlocking instruction sent by the server matches the received unlocking request. If the matching is successful, the unlocking instruction fed back is matched with the unlocking request sent out, the corresponding lock can be controlled to be opened to realize directional unlocking, and the accuracy of the directional unlocking is improved.
Fig. 4 is a locking device capable of executing the above locking method according to an embodiment of the present invention, including:
and the radio frequency tag 21 is used for sending pre-stored identification information after receiving the magnetic field signal.
At least one second processor 22, and a second memory 23 communicatively coupled to the at least one second processor 22; wherein,
the second memory 23 stores instructions executable by one second processor 22, the instructions being executed by at least one second processor 22 to enable the at least one second processor 22 to control the corresponding lock to be opened upon receiving an unlocking instruction sent by the server.
Specifically, the second processor 22, the second memory 23 and the radio frequency tag 21 may be connected by a bus or other means, and the bus connection is taken as an example in fig. 4.
The second processor 22 may be a Central Processing Unit (CPU). The first Processor 12 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The second memory 23, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The second processor 22 executes various functional applications and data processing of the server, i.e. a processing method for implementing the list item operations of the above-described method embodiments, by running non-transitory software programs, instructions and modules stored in the second memory 23.
The second memory 23 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the processing apparatus operated by the list items, and the like. Further, the second memory 23 may comprise high speed random access memory, and may also comprise non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the second memory 23 may optionally include memory located remotely from the second processor 22, which may be connected over a network to a processing device operated by the list items. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the second memory 23 and, when executed by the one or more second processors 22, perform the method as shown in fig. 3.
The product can execute the locking method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the locking method. For details of the technique not described in detail in the embodiment, reference may be made to the related description in the embodiment shown in fig. 3.
As an alternative embodiment, the locking device of the present embodiment is used on a bicycle. Specifically, the locking device in the embodiment of the invention is applied to bicycles for public bicycle leasing, a plurality of fixed leasing points are not required to be arranged for renting and returning bicycles, a user can conveniently unlock and lock the bicycle by downloading bicycle leasing software, and a series of problems such as failure in renting or returning bicycles and the like caused by failure in reading identification information due to damage of two-dimensional codes are avoided.
As shown in fig. 5, another locking device is provided in the embodiment of the present invention, which includes, in addition to the above-mentioned radio frequency tag 21, second processor 22 and third memory 23:
and the state acquisition device 24 is used for acquiring the motion state information of the bicycle.
The second processor 22 is also capable of:
judging whether the bicycle is in a static state or not according to the motion state information;
if the bicycle is in a static state within a preset time length, sending a bicycle locking request to a server; and
and after receiving the vehicle locking instruction fed back by the server, controlling the corresponding lock to be locked.
In the locking device in this embodiment, the state acquisition device can acquire the motion state information of the bicycle in real time, and if the bicycle is in a static state for a preset time (for example, 3 minutes), the control device sends a bicycle locking request to the server, and controls the corresponding lock to be locked after receiving a bicycle locking instruction fed back by the server, so that even if a renter forgets to lock the bicycle, automatic bicycle locking can be realized.
As an alternative embodiment, the state acquisition device may include a positioning sensor and/or a vibration sensor; the positioning sensor is used for acquiring horizontal position change information of the bicycle; the vibration sensor is used for acquiring vertical position change information of the bicycle; and the second processor judges that the bicycle is in a static state when the horizontal position change information or the vertical position change information is 0. Specifically, through installing positioning sensor or vibration sensor on the bicycle, can gather the position change or the vibration condition of bicycle in real time, controlling means just can be accurate according to positioning sensor and/or the data of vibration sensor collection and judge whether the bicycle is in quiescent condition.
The embodiment of the present invention further provides another locking device, which includes the above-mentioned radio frequency tag 21, second processor 22 and third memory 23, or includes the above-mentioned radio frequency tag 21, second processor 22, third memory 23 and state acquisition device 24, and the radio frequency tag 21 is placed in a protective shell. Particularly, the radio frequency tag is arranged in the protective shell, so that the radio frequency tag can be effectively prevented from being damaged and stained manually, and the service life of the radio frequency tag is prolonged.
As an alternative embodiment, the protective shell is provided with a luminous film. Specifically, through set up the membrane of night light on protecting sheathing, even also can help the user to fix a position locking device fast in the environment that light is relatively poor, realize unblanking fast.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the list item operation in any method embodiment. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard disk (Hard disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.