Below, with reference to accompanying drawing and embodiment, the present invention is described further：
The present invention provides a kind of blue-tooth intelligence horseshoe lock and (is also known as smart lock, electronic lock, bluetooth lock below or locks) scheme, its
Based on AES128 coded communications, bi-directional tokens, serializing instruction, to ensure that mobile phone is applied and smart lock secure communication.Prop up simultaneously
Bluetooth ble master slave modes are held, beacon (Bi Ken) agreement, when lock is in opening, is locked in beacon device broadcasts scopes
It is interior just to return the car, returned the car the behavior of parking cars with specification user.
Present invention generally comprises two partial contents：The unblock and locking of smart lock.
Electronic lock unlocking method, applied to electronics unlocking system, the system includes intelligent sliding moved end, electronic lock and long-range
Server；The intelligent sliding moved end can be but not limited to smart mobile phone, and the electronic lock can be but not limited to bluetooth lock.Such as
Shown in Fig. 1, comprise the following steps：
Step 101, intelligent sliding moved end obtain the identity information of electronic lock, and intelligent sliding moved end is by user profile and identity information
Send to remote server.
Intelligent sliding moved end can be from the mode of the identity information of remote server acquisition electronic lock：Intelligent sliding moved end is from remote
Journey server obtains the multiple electronic locks and its identity information of its geographic vicinity, and intelligent sliding moved end is from multiple electronic locks
One of electronic lock is selected, and obtains the identity information of the electronic lock.
Intelligent sliding moved end can also be from the mode of the identity information of remote server acquisition electronic lock：Electronic lock is applied
Walking-replacing tool on post the Quick Response Code of the identity information comprising electronic lock, intelligent sliding moved end is by scanning the Quick Response Code, directly
Obtain the identity information of the electronic lock.
All include the user profile of at least one on each intelligent sliding moved end, including the user account balance information,
Credit information and contact details etc..
Step 102, remote server are verified to user profile and identity information, and checking information is sent to intelligence
Whether the account that checking of the remote server to user profile includes verifying the user profile is registered user, the use
The work of riding instead of walk that the whether enough users of the amount of money are unlocked to electronic lock and applied using the electronic lock in the account of family information
Checking of the remote server to the identity information of electronic lock includes：Whether the state for verifying the electronic lock is locking,
Other users have been avoided to use the walking-replacing tool.
Step 103, intelligent sliding moved end send unlocking request information to remote server according to checking information.
Checking information is received when user is terminated by intelligent mobile, display can use the identity information correspondence of the electronic lock
Walking-replacing tool when, user can pass through intelligent sliding moved end and send unlocking request information to remote server.
Step 104, remote server send electronic lock identification information and safety check information extremely according to unlocking request information
Intelligent sliding moved end.
Step 105, intelligent sliding moved end are set up according to electronic lock identification information and electronic lock and connected.
Step 106, intelligent sliding moved end send unlocking information to electronic lock according to safety check information.
Remote server sends electronic lock identification information and safety check information to intelligent movable end, electronic lock identification information
It is used primarily for family and finds corresponding electronic lock, because when multiple walking-replacing tools one lead to and are parked at one, then needs electronics
Lock identification information goes to find corresponding accurate electronic lock；Sent further according to the operation of user, and by safety check information
Unlocking information is to electronic lock.
Step 107, electronic lock judge whether to unlock successfully, if it is send successfully feedback information to intelligent sliding moved end；
Otherwise failure feedback information is sent to intelligent sliding moved end, and return to step 106；Until third time sends failure feedback information to intelligence
Energy mobile terminal, then terminate.
After unlocking successfully, user can begin to use walking-replacing tool, and intelligent sliding moved end sends success feedback information to remote
Journey server, remote server simultaneously carries out charging；Until user stops using walking-replacing tool and electronic lock is locked, then count
Expense terminates.It is whole to be terminated using the flow of walking-replacing tool.
If unblock failure, electronic lock sends failure feedback information to intelligent sliding moved end, and intelligent sliding moved end can actively again
Transmission unlocking information is unlocked to electronic lock to be retried, if still unlocking failure after retrying twice, terminates flow.
In said process, low coverage is realized in intelligent sliding moved end (being referred to as the first communication ends) with electronic lock (being referred to as the second communication ends)
From information transfer.As shown in Fig. 2 the information transferring method of above-mentioned Near Field Communication comprises the following steps：
Step 201, the first communication ends generate one group of checking token at random, and transmission to the second communication ends are stored；The
Two communication ends generate one group of checking token at random, and transmission to the first communication ends are stored.
Checking token is made up of a number of random number.
Any one in step 202, the first communication ends and the second communication ends is as sender, and another is used as recipient；
Sender generates one group of random sequence number at random, and the checking token, random sequence number and the control information that are stored are sent to reception
Sender sends control information to the mode of reception, it is necessary to additional identification token and random sequence number；The checking token
It ensure that the security of control information；
The random sequence number is generated by sender according to uniqueness regular random, and to ensure to instruct uniqueness, sender is each
When sending command information, it is required for generating one group of random sequence number at random, it is ensured that the random sequence number with sending before is different.Prevent from connecing
Debit is collapsed by the Replay Attack of hacker.
The random sequence number that step 203, recipient's storage are this time received；Recipient judges the checking order that sender sends
Whether board and its checking token for generating at random identical, and judge random sequence number that this sender sends and storage it
Whether the random sequence number that preceding sender sends has identical；If first judged result is yes, and second judged result
It is no, is then verified, recipient performs control information；Otherwise control information is abandoned, flow terminates.
The device of the information transfer of Near Field Communication, such as Fig. 3 are realized the invention also discloses intelligent sliding moved end and electronic lock
It is shown, specifically include：
First token generation module, applied to the first communication ends, for generating one group of checking token at random, and sends to the
Two communication ends are stored；
Second token generation module, applied to the second communication ends, for generating one group of checking token at random, and sends to the
One communication ends are stored.
Serial number gencration module, applied to sender, for generating one group of random sequence number at random.First communication ends and second are led to
Any one in end is believed as sender, and another is used as recipient.
Sending module, applied to sender, for the checking token stored, random sequence number and control information send to
Store judge module, applied to recipient, the random sequence number this time received for storing；And judge that sender sends out
Whether the checking token sent and its checking token generated at random are identical, and judge the stochastic ordering that this sender sends
Number and storage before the random sequence number that sends of sender whether have identical；If first judged result is yes, Yi Ji
Two judged results are no, then are verified, and recipient performs control information；Otherwise control information is abandoned, flow terminates.
The invention also discloses tripper corresponding with above-mentioned electronic lock unlocking method, as shown in figure 4, specifically including：
Acquisition module, applied to intelligent sliding moved end, the identity information for obtaining electronic lock, user is believed in intelligent sliding moved end
Breath and identity information are sent to remote server.
Specifically, acquisition module include the first acquisition module and/or the second acquisition module, the first acquisition module, for from
Remote server obtains the multiple electronic locks and its identity information of its geographic vicinity, is selected wherein from multiple electronic locks
One electronic lock, and obtain the identity information of the electronic lock.
Second acquisition module, the Quick Response Code on applied walking-replacing tool is locked for scanning electron, the electronics is directly obtained
The identity information of lock.
Authentication module, applied to remote server, believes for being verified to user profile and identity information, and by checking
Breath is sent to intelligent sliding moved end.
First unlocked state, applied to intelligent sliding moved end, for sending unlocking request information to long-range according to checking information
Security information module, applied to remote server, for sending electronic lock identification information according to unlocking request information
With safety check information to intelligent sliding moved end.
Link block, applied to intelligent sliding moved end, is connected for being set up according to electronic lock identification information and electronic lock.
Second unlocked state, applied to intelligent sliding moved end, for sending unlocking information to electronics according to safety check information
Judge module, applied to electronic lock, for judging whether to unlock successfully, if it is sends successfully that feedback information is extremely
Intelligent sliding moved end；Otherwise failure feedback information is sent to intelligent sliding moved end, and returns to the second unlocked state；Until third time is sent
Failure feedback information then terminates to intelligent sliding moved end.
Mobile phone app (intelligent movable end) can while listening for lock and periphery beacon facility informations, mobile phone app and lock and
Beacon can be just in communication with each other in respective communication distance, when app receives legal beacon signals, and judge signal
When intensity reaches setting, just user is allowed to return the car, to reach fence function, specification user parks car, and otherwise, signal is strong
Degree is weak or without lock signal and beacon signals, then can not set up communication, now return the car and returned the car to be invalid, system will not also be pushed away
Breath deliver letters to user.
Specifically, mobile phone app and lock and beacon are first passed through and realizes that mutually communication is realized in respective communication distance
The beacon system of vehicles positioning, then again by signal intensity to carry out specification of returning the car.
The beacon system of vehicles positioning includes Beacon equipment and smart lock, and Beacon technologies are low-power consumption bluetooth skills
Art, beacon base station can create a signal area, and when equipment enters the region, corresponding application program will point out user
Whether need to access this signal network.Beacon technologies are prior art, and the present invention is applied on the road surface of traffic highway
On, multiple Beacon equipment are set according to actual conditions on same path, is returned the car, taken for user with providing multiple regions
Car, it is convenient popular.Smart lock is installed on a vehicle, and the vehicles are generally bicycle, electric car, and the smart lock can be with
Beacon equipment is communicated each other.Smart lock can detect the broadcast singal launched from Beacon equipment, and in inspection
When measuring the broadcast singal, the current position of the corresponding vehicles is obtained according to the signal intensity of received broadcast singal
Still further aspect, beacon system can also include the intercommunication of smart mobile phone, the smart mobile phone and smart lock,
The smart mobile phone receives the positional information from smart lock, and judges the corresponding vehicles of smart lock according to the positional information
Whether current parking is legal.
Illustrated below by a specific implementation case：
The vehicles are walked on a road, and the road surface of the road is provided with five Beacon equipment, is uniformly arranged.Fig. 5
Middle a, b, c, d, e represent five Beacon equipment respectively.Five Beacon equipment all send broadcast singal, each Beacon equipment
The broadcast singal launched covers certain region.Assuming that Beacon equipment a and Beacon equipment b most centre position is not wide
Signal is broadcast, when the vehicles run to the position, then smart lock can not be communicated with Beacon equipment, can not also calculate friendship
The current positional information of logical instrument, so can not return the car.And when the vehicles run to Beacon equipment b and Beacon equipment c
Between, now Beacon equipment c connection communications, then smart lock detect the broadcast singal transmitted by Beacon equipment c, broadcast
The intensity of signal determines that distance is nearer, then signal is stronger according to the distance between smart lock and the Beacon equipment.Smart lock root
The positional information of the vehicles is obtained according to signal intensity, feedback position information is into smart mobile phone.Due to each Beacon equipment
The broadcast singal launched all covers certain region, but has some regions although to have broadcast singal to be obtained with smart lock
Contact, but can not allow to return the car because of too remote apart from Beacon equipment, to prevent going wrong, therefore stored in smart mobile phone
Have where information is then legal, where information is illegal, and the positional information sent according to smart lock is carried out
Judge, just prompting can return the car when legal, otherwise continue the success that can not also return the car of returning the car even if user.In fact, namely root
Returned the car according to signal intensity, only when signal intensity is more than defined threshold value, can be only achieved the purpose returned the car.By this
Mode, can prevent arbitrarily parking, Beacon equipment is set due to having more so that website extensively, adds the website that can return the car, is
It is convenient that user's trip is provided, and provides enough safety guarantee.
The present invention also provides vehicles localization method, applied to the beacon positioned provided by the present invention for the vehicles
System, as shown in fig. 6, comprising the following steps：
Step 601, smart lock receive the broadcast singal transmitted by the Beacon equipment on road surface, and examine the broadcast singal
It is current that step 602, smart lock calculate the corresponding vehicles of smart lock according to the signal intensity of the broadcast singal
In the case where being also equipped with smart mobile phone, perform and also comprised the following steps after S2：
Step 603, smart lock send positional information to smart mobile phone；
Step 604, smart mobile phone judge whether the corresponding vehicles of smart lock currently close by parking according to the positional information
Method, if so, then display can return the car, otherwise, display can not return the car.In step 604, when determining illegal, intelligent hand
Machine also shows that legal parking space confidence ceases.
The locking means of the shared vehicles, i.e., the method for carrying out specification to returning the car, as shown in fig. 7, it includes following step
Lock signal in step 701, reception；When needing to be returned the car, have herein two kinds trigger return the car lock
Signal, one kind is, by directly moving lockset, then to trigger a upper lock signal and transmit to background server to enter the signal
Row judges that another locked by being clicked on mobile phone, to trigger a upper lock signal to background server, so as to point out
User prepares to lock；Only be depicted by mobile phone to carry out operation of locking in the present embodiment, but its be not restricted in
Such a mode, it is similar by way of the concrete mode for trigger signal of directly locking is locked with mobile phone trigger signal；
Step 702, determine whether to receive a verification broadcast singal, if it is, next step is performed, if it is not, then
Return the car unsuccessfully；
Step 7021, judge verify broadcast singal intensity whether reach preset value, if it is, perform step 703, such as
It is really no, then return the car unsuccessfully；When user prepares to lock, lock will be switched to holotype, and scan and receive the beacon on periphery
Device signal, mobile phone can also monitor lock and periphery beacon facility informations simultaneously, and mobile phone, lock and beacon equipment are only at it
It can be in communication with each other in communication distance, when mobile phone receives legal beacon signals, the legal beacon signals are can
With the signal parsed by mobile phone, and when judging that signal intensity reaches setting, the power of signal is according to distance
The distance of beacon equipment is judged, if far away, signal intensity is weak, even without, then identification of having no idea,
If from obtaining closely, signal intensity is big, just allows user to return the car to reach the function of fence, specification user parks car；
The judging distance of the beacon equipment of specific different places can accordingly be set according to actual landform
Meter, because each land-service road situation is different, so set apart from when can exist than larger difference, if all used
Same standard, some areas there may be the situation for parking confusion, therefore set phase according to different regions road parking situation
The judging distance answered is so that its more hommization, if signal intensity is weak or without lock signal and without beacon signals, nothing
Method sets up communication, now returns the car and is returned the car to be invalid, system will not also push information to user, user can not return the car；
Step 703, success of returning the car；When above-mentioned condition is all met, you can returned the car, background server can be sent
Corresponding signal to mobile phone notifies user to complete operation of returning the car.
A kind of locking device is provided the invention provides a kind of locking means of shared vehicles, as shown in figure 8, including
With lower module：
Receive signaling module：Server is arranged at, for receiving upper lock signal；
First judge module：Server is arranged at, for determining whether to receive a verification broadcast singal, if it is,
Next module is then performed, if it is not, then returning the car unsuccessfully；
Second judge module：Server is arranged at, whether the intensity for judging to verify broadcast singal reaches preset value, such as
It is really, then implementing result feedback module, if it is not, then returning the car unsuccessfully.
As a result feedback module：Return the car success.
It will be apparent to those skilled in the art that technical scheme that can be as described above and design, make other various
It is corresponding to change and deformation, and all these change and deformation should all belong to the protection domain of the claims in the present invention