Control method and device of bluetooth lock, electronic equipment and storage medium

By combining user permissions, line information, location, and status information verification in the Bluetooth lock management system, the problem of low security of Bluetooth locks is solved, and a higher level of security Bluetooth lock control is achieved.

CN116631104BActive Publication Date: 2025-12-12BEIJING HUITONG TIANXIA LOGISTIC CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310755655.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2025-12-12
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

Existing Bluetooth locks have low security in their unlocking methods, which may lead to the loss of items.

Method used

After establishing a communication connection between the terminal device and the Bluetooth lock, the system obtains the configuration information and Bluetooth lock status information pre-sent by the server. Combining the user's permission information, preset line information, the current location of the terminal device, and the Bluetooth lock status information, the system determines whether to instruct the Bluetooth lock to execute an operation command.

Benefits of technology

The security of the Bluetooth lock has been improved, ensuring that unlocking or locking operations are only allowed when the permissions, location, time, and status conditions are met, thus enhancing the security and accuracy of the operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116631104B_ABST
    Figure CN116631104B_ABST
Patent Text Reader

Abstract

The application provides a control method and device of a Bluetooth lock, an electronic device and a storage medium. The method comprises: obtaining configuration information sent by a server in advance and state information of the Bluetooth lock; determining whether to instruct the Bluetooth lock to perform an operation indicated by an operation instruction according to permission information of a user, preset route information, a current position of a terminal device and the state information of the Bluetooth lock; and if yes, sending a control instruction to the Bluetooth lock to control the Bluetooth lock to perform the operation indicated by the operation instruction. When a user performs an unlocking or locking operation on the Bluetooth lock, the user needs to consider not only the permission information of the user, but also the preset route information, the current position of the terminal and the state of the Bluetooth lock before determining whether to perform the unlocking or locking operation, which is safer than the current method in which a terminal device can scan and connect to a Bluetooth lock to perform an operation on the Bluetooth lock.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of Bluetooth, in particular, to a control method and device of a Bluetooth lock, an electronic device and a storage medium. BACKGROUND

[0002] In the modern logistics industry, in order to ensure the safety of logistics, logistics enterprises usually use locks to close packages, containers, cabinets and other logistics loading tools. In order to ensure the safety of goods, Bluetooth locks are increasingly widely used in logistics enterprises.

[0003] In the prior art, a mobile terminal is used to unlock a Bluetooth lock. When a user triggers an unlocking instruction on the mobile phone, the mobile phone receives the unlocking instruction and scans the Bluetooth lock within a preset distance from the mobile phone. After connecting with the Bluetooth lock, the unlocking operation can be performed.

[0004] However, the current unlocking method used by the Bluetooth lock has low security, which may result in loss of goods and other consequences. SUMMARY

[0005] The present application aims to solve the above problems in the prior art and provide a control method and device of a Bluetooth lock, an electronic device and a storage medium to improve the security of the Bluetooth lock.

[0006] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:

[0007] In a first aspect, the embodiments of the present application provide a control method of a Bluetooth lock, applied to a terminal device in a Bluetooth lock management system, the Bluetooth lock management system comprising a server, the terminal device and a Bluetooth lock, the terminal device being in communication connection with the server, and the method comprising:

[0008] After the terminal device and the Bluetooth lock establish a communication connection, in response to a user's operation instruction, the configuration information previously sent by the server is acquired, and the state information of the Bluetooth lock is acquired, wherein the configuration information comprises the user's permission information and preset line information;

[0009] According to the user's permission information, the preset line information, the current position of the terminal device and the state information of the Bluetooth lock, it is determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction.

[0010] If yes, a control instruction is sent to the Bluetooth lock to control the Bluetooth lock to perform the operation indicated by the operation instruction.

[0011] Optionally, the operation indicated by the operation instruction is determined to be executed by the Bluetooth lock according to the permission information of the user, the preset route information, the current location of the terminal device, and the state information of the Bluetooth lock, including:

[0012] The operation of the Bluetooth lock by the user is determined to be allowed according to the permission information of the user;

[0013] If yes, a preset geographical error range allowed by a preset geographical location is determined according to the preset route information.

[0014] If the current location is within the allowed geographical error range, it is determined whether the operation indicated by the operation instruction is executed by the Bluetooth lock according to the state information of the Bluetooth lock and the permission information of the user.

[0015] Optionally, the operation indicated by the operation instruction is determined to be executed by the Bluetooth lock according to the state information of the Bluetooth lock and the permission information of the user, including:

[0016] The estimated time and the time error range of the estimated time sent by the server are received.

[0017] If the current time is within the time error range of the estimated time, it is determined whether the operation indicated by the operation instruction is executed by the Bluetooth lock according to the state information of the Bluetooth lock and the permission information of the user.

[0018] Optionally, the preset geographical error range allowed by the preset geographical location is determined according to the preset route information, including:

[0019] At least one permission time period sent by the server is received.

[0020] If the current time is within the permission time period, the geographical error range allowed by the preset geographical location is determined according to the preset route information.

[0021] Optionally, if the current time is within the permission time period, the allowed geographical error range is determined according to the preset route information, including:

[0022] The first terminal local time and the first server reference time when the terminal device and the Bluetooth lock establish a communication connection are obtained.

[0023] The second terminal local time, the second server reference time when the terminal device responds to the operation instruction, and the third terminal local time when the user is determined to be allowed to operate the Bluetooth lock are obtained.

[0024] determine a first time according to the first server reference time, the first terminal local time and the third terminal local time;

[0025] determine a second time according to the second server reference time, the second terminal local time and the third terminal local time;

[0026] determine whether the time of the terminal device meets a preset condition according to the first time, the second time and a preset time range;

[0027] if yes, and the current time is within the permission time period, determine a preset geographical error range allowed by a preset geographical position according to the preset route information.

[0028] Optionally, determining the preset geographical error range allowed by the preset geographical position according to the preset route information comprises:

[0029] obtain a plurality of position information before and after the terminal device responds to the operation instruction;

[0030] if the plurality of position information are different, determine the preset geographical error range allowed by the preset geographical position according to the preset route information.

[0031] Optionally, the method further comprises:

[0032] in response to a permission application instruction of a user, send a permission application message to the server, so that the server allocates permission to the user and / or transfers the permission of the user according to the permission application message.

[0033] In a second aspect, the embodiments of the present application further provide a control device of a Bluetooth lock, and the device comprises:

[0034] an obtaining module, configured to, after a terminal device establishes a communication connection with the Bluetooth lock, obtain configuration information sent in advance by the server in response to an operation instruction of a user, and obtain state information of the Bluetooth lock, wherein the configuration information comprises: permission information of the user, preset route information;

[0035] a determining module, configured to determine whether to instruct the Bluetooth lock to perform an operation indicated by the operation instruction according to the permission information of the user, the preset route information, a current position of the terminal device and the state information of the Bluetooth lock;

[0036] a sending module, configured to, if yes, send a control instruction to the Bluetooth lock to control the Bluetooth lock to perform the operation indicated by the operation instruction.

[0037] Optionally, the determining module is specifically configured to:

[0038] determine whether to allow the user to operate the Bluetooth lock according to the permission information of the user;

[0039] If yes, determine a preset geographical error range allowed by a preset geographical position according to the preset route information;

[0040] If the current position is within the allowed geographical error range, determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0041] Optionally, the determining module is specifically configured to:

[0042] receive the estimated time and the time error range of the estimated time sent by the server;

[0043] If the current time is within the time error range of the estimated time, determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0044] Optionally, the determining module is specifically configured to:

[0045] receive at least one permission time period sent by the server;

[0046] If the current time is within the permission time period, determine a preset geographical error range allowed by a preset geographical position according to the preset route information.

[0047] Optionally, the determining module is specifically configured to:

[0048] obtain a first terminal local time and a first server reference time when the terminal device establishes a communication connection with the Bluetooth lock;

[0049] obtain a second terminal local time, a second server reference time and a third terminal local time when the terminal device responds to the operation instruction and when it is determined that the user is allowed to operate the Bluetooth lock;

[0050] determine a first time according to the first server reference time, the first terminal local time and the third terminal local time;

[0051] determine a second time according to the second server reference time, the second terminal local time and the third terminal local time;

[0052] determine whether the time of the terminal device meets a preset condition according to the first time, the second time and a preset time range;

[0053] If yes, and the current time is within the permission time period, then according to the preset line information, a preset geographical position allowed geographical error range is determined.

[0054] Optionally, the determining module is specifically configured to:

[0055] The plurality of position information is obtained before and after the terminal device responds to the operation instruction;

[0056] If the plurality of position information is different, then according to the preset line information, a preset geographical position allowed geographical error range is determined.

[0057] Optionally, the sending module is further configured to:

[0058] In response to a user's permission application instruction, a permission application message is sent to the server, so that the server allocates permissions to the user and / or transfers the user's permissions according to the permission application message.

[0059] In a third aspect, the embodiments of the present application further provide an electronic device, comprising a processor, a storage medium and a bus, the storage medium stores program instructions executable by the processor, when an application program is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the control method of the Bluetooth lock in the first aspect.

[0060] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program reads and executes the steps of the control method of the Bluetooth lock in the first aspect.

[0061] The present application has the following beneficial effects:

[0062] The control method, device, electronic device and storage medium of the Bluetooth lock provided by the present application can determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the user's permission information, the preset line information, the current position of the terminal device and the state information of the Bluetooth lock, so that when the user performs the unlocking or locking of the Bluetooth lock, the user needs to consider not only the user's permission information, but also the preset line information, the current position of the terminal and the state of the Bluetooth lock before determining whether to perform the unlocking or locking, which is higher in safety than the current method of scanning and connecting the terminal device to the Bluetooth lock to operate the Bluetooth lock. BRIEF DESCRIPTION OF DRAWINGS

[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as limiting the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor under the guidance of the drawings.

[0064] Figure 1 A system architecture schematic diagram provided for the embodiments of the present application;

[0065] Figure 2 A flowchart of a control method of a Bluetooth lock provided for the embodiments of the present application;

[0066] Figure 3 A flowchart of another control method of a Bluetooth lock provided for the embodiments of the present application;

[0067] Figure 4 A complete control method of a Bluetooth lock provided for the embodiments of the present application;

[0068] Figure 5 A device schematic diagram of a control method of a Bluetooth lock provided for the embodiments of the present application;

[0069] Figure 6 A structural block diagram of an electronic device provided for the embodiments of the present application. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the drawings in the present application only play the purpose of illustration and description, and do not limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportion. The flowchart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, under the guidance of the content of the present application, one or more other operations can be added to the flowchart, or one or more operations can be removed from the flowchart.

[0071] In addition, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0072] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0073] Figure 1 A system architecture diagram of a control method of a Bluetooth lock provided by the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, the control method of the Bluetooth lock is applied to a Bluetooth lock management system, which includes a server 10, a terminal device 11, and a Bluetooth lock 12. Figure 1

[0074] Optionally, the terminal device 11 can include, but is not limited to, a desktop computer, a notebook computer, a personal digital assistant (PDA), a smart phone, a smart television, and other terminal devices with a display screen.

[0075] Optionally, the terminal device 11 can be in communication connection with the server 10 through a network, so that the server 10 and the terminal device 11 exchange information and / or data. The network can include various connection types, such as wired networks, wireless networks, optical fiber networks, long-distance communication networks, wide-area networks, local-area networks, etc., or any combination thereof.

[0076] Optionally, the interaction process between the terminal device 11 and the server 10 can be that the data of an application (App) is sent by the terminal device 11 to the server 10 via the network, and vice versa, the server 10 sends data to the App on the terminal device 11 via the network. The terminal device APP in the present application can refer to an APP that needs to operate the Bluetooth lock.

[0077] Optionally, the terminal device 11 can be connected with the Bluetooth lock 12 through a Bluetooth protocol, and the Bluetooth lock 12 can interact with the APP on the terminal device.

[0078] It should be understood that Figure 1 The number of the server 10, the terminal device 11, and the Bluetooth lock 12 in FIG. 1 is only illustrative. According to the needs of implementation, there can be any number of servers 10, terminal devices 11, and Bluetooth locks 12.​

[0079] Optionally, Figure 1 The server 10 in the foregoing has functions of user information management, line management, and user permission management. The user information management function mainly refers to binding the identity card number or phone number of a user as a unique identifier to the user, where the user can include a vehicle driver or a management personnel. Through the user information management function, the user's information can be added, deleted, modified, and queried according to the needs, and the user's information can include the user's name, phone number, birthday, driver's license information, and vehicle information.

[0080] The line management can include setting the geographical position of a line, including the starting point, the ending point, and the passing point, and the line can be added, modified, deleted, and queried, and the management personnel can assign a line to a driver.

[0081] The user permission management function refers to configuring the use permission of a user, and the use permission of the user can include whether the user has the permission to open or close the lock, whether the user has the permission to open or close the lock at a preset geographical position, and configuring the position error range of the preset geographical position operation.

[0082] According to the functions of the foregoing server 10, the user information, the line information, and the permission information of the user can be sent to the APP of the terminal device 11 through the configuration of the server 10, and after the APP of the terminal device 11 receives the information sent by the server 10, the method provided in the application is used to control whether the Bluetooth lock is opened or closed.

[0083] Figure 2 A flowchart of a control method of a Bluetooth lock provided in an embodiment of the application is shown in the figure. The execution subject of the method is the terminal device as described above. As shown in the figure, the method includes the following steps. Figure 2

[0084] S201, after the terminal device and the Bluetooth lock establish a communication connection, the configuration information sent by the server in advance is acquired in response to the operation instruction of the user, and the state information of the Bluetooth lock is acquired.

[0085] The configuration information sent by the server in advance can include the permission information of the user and the preset line information.

[0086] ​Optionally, a user logs in on an APP of a terminal device, wherein the user refers to a vehicle driver, the vehicle driver uses a user identifier of the user, for example, an ID card number or a phone number of the driver; after the driver logs in on the APP of the terminal device successfully, the server is requested to configure user permission information and line information of the driver in advance, wherein the user permission information can include that the user has the permission of opening and closing the lock, only the permission of opening the lock, only the permission of closing the lock, and no permission to operate the Bluetooth lock.

[0087] Specifically: the APP of the terminal device can send a configuration request to the server, the configuration request can include user information; after the server receives the configuration request sent by the terminal device, the configuration information of the user can be obtained according to the user information in the configuration request and sent to the terminal device APP, and the terminal device APP saves the received configuration information, so as to control the Bluetooth lock according to the configuration information subsequently.

[0088] Optionally, after the terminal device and the Bluetooth lock establish a communication connection, a user's operation instruction is responded.

[0089] Optionally, the Bluetooth lock can be composed of a lock body, a lock tongue, a communication module and a start button. In order to achieve the power saving function, generally, the Bluetooth lock is in a sleep state, and only when the start button on the Bluetooth lock is operated or the lock tongue is manually inserted, the communication module of the Bluetooth lock can be activated to communicate.

[0090] Optionally, when the user needs to operate the Bluetooth lock, the user can first click the start button on the Bluetooth lock to activate the Bluetooth lock, and then the user can connect to the Bluetooth lock in the Bluetooth connection page of the terminal device APP. After the Bluetooth connection is successful, the Bluetooth lock sends the state information of the Bluetooth lock to the terminal device APP, wherein the state information of the Bluetooth lock can include that the Bluetooth lock is closed or opened.

[0091] Optionally, if the terminal device APP fails to connect to the Bluetooth lock, it means that the user cannot operate the Bluetooth lock on the terminal device APP.

[0092] Optionally, the operation instruction of the user refers to the instruction that the user enters the operation Bluetooth lock page when the user needs to operate the Bluetooth lock on the terminal device APP, the operation Bluetooth lock page can refer to the second page of the terminal device APP, and when the user enters the operation Bluetooth lock page, the configuration information sent by the server in advance is obtained, the configuration information sent in advance refers to the configuration information sent by the user when logging in on the terminal device APP.

[0093] S202, determining whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the permission information of the user, the preset route information, the current position of the terminal device, and the state information of the Bluetooth lock.

[0094] Optionally, whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction can be determined according to the permission information of the user, the preset route information, the current position of the terminal device, and the state information of the Bluetooth lock by using a preset method. The operation indicated by the operation instruction can include locking or unlocking.

[0095] The preset route information refers to route information that the user needs to travel, and can include starting point position information, ending point position information, and passing point position information.

[0096] If it is determined to instruct the Bluetooth lock to perform the operation indicated by the operation instruction, S203 is performed; if it is determined not to instruct the Bluetooth lock to perform the operation indicated by the operation instruction, the Bluetooth lock will not perform the locking or unlocking operation, and will remain in the same state as before.

[0097] S203, sending a control instruction to the Bluetooth lock to control the Bluetooth lock to perform the operation indicated by the operation instruction.

[0098] Optionally, the terminal device APP can send a control instruction to the communication module of the Bluetooth lock, and the Bluetooth lock can perform the operation indicated by the operation instruction after receiving the control instruction.

[0099] In this embodiment, by determining whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the permission information of the user, the preset route information, the current position of the terminal device, and the state information of the Bluetooth lock, the user can not only consider the permission information of the user when performing the unlocking or locking of the Bluetooth lock, but also need to combine the preset route information, the current position of the terminal, and the state of the Bluetooth lock to determine whether to perform the unlocking or locking, which is safer than the current method of scanning and connecting to the Bluetooth lock by using the terminal device to operate the Bluetooth lock.

[0100] Figure 3 Another flowchart of a control method of a Bluetooth lock provided by the embodiment of the application is shown in FIG. 3. Figure 3 As shown in FIG. 3, S202 of determining whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the permission information of the user, the preset route information, the current position of the terminal device, and the state information of the Bluetooth lock can include the following steps.

[0101] S301, determining whether to allow the user to operate the Bluetooth lock according to the permission information of the user.

[0102] The permission information of the user refers to whether the user has the permission to operate the Bluetooth lock, which can include the permission to open the lock or the permission to close the lock. If the user can perform any operation of opening or closing the Bluetooth lock, it can be indicated that the user is allowed to operate the Bluetooth lock. If the user cannot open or close the Bluetooth lock, it can be indicated that the user is not allowed to operate the Bluetooth lock.

[0103] Optionally, if it is determined according to the permission information of the user that the user is allowed to operate the Bluetooth lock, S302 is performed; if the user is not allowed to operate the Bluetooth lock, the process ends.

[0104] S302, determining a permitted geographical error range of a preset geographical position according to preset route information.

[0105] The preset route information can include at least one preset geographical position, for example, can include start position information, end position information and passing point position information. The permitted geographical error range of the preset geographical position refers to that the user is allowed to operate the Bluetooth lock within the position error range of the preset geographical position. For example, for the start point of a route, the permitted geographical error range of the start point can be 2 km, that is, the user is allowed to operate the Bluetooth lock within the range of 2 km from the start point.

[0106] S303, determining whether the current position is within the permitted geographical error range of the preset geographical position. If yes, S304 is performed; if not, the process ends.

[0107] S304, determining whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0108] Optionally, the current position within the permitted geographical error range refers to that the current position of the terminal device is within the geographical position error range of the preset geographical position. Then, whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction is determined according to the state information of the Bluetooth lock and the permission information of the user obtained by the terminal device previously.

[0109] For example, if the user A can only open the lock within 2 km from the start of the line, if the current position of the terminal device held by the user A is a geographic position 500 m from the start, it is determined that the current position of the user A is within the geographic position error range of the preset geographic position, and then it is determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user. Specifically, if the current state of the Bluetooth lock is closed, the Bluetooth lock can perform the operation of opening the lock according to the permission of the user A that can only open the lock within 2 km from the start of the line. It should be noted that if it is determined that the user has the permission to operate the lock within the position range, the Bluetooth lock will be directly opened or closed, and the user does not need to click the open or close button on the terminal device. If the current state of the Bluetooth lock is open, the Bluetooth lock will not perform other operations according to the permission of the user A that can only open the lock within 2 km from the start of the line, and the previous open state will be maintained.

[0110] For another example, continuing with the above example that the user A can only open the lock within 2 km from the start of the line, if the current position of the terminal device held by the user A is a geographic position 3 km from the start, it is determined that the current position of the user A is not within the geographic position error range of the preset geographic position, and the user cannot operate the Bluetooth lock at the current position.

[0111] For another example, if the current position of the user A is within the geographic position error range of the preset geographic position, it is determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user. Specifically, if the current state of the Bluetooth lock is closed, the permission of the user is that the user A can only close the lock within 2 km from the start of the line, and the user A cannot operate the Bluetooth lock, and the Bluetooth lock continues to maintain the previous closed state.

[0112] For another example, the current position of the user A is within the geographic position error range of the preset geographic position, the permission of the user A is that the user A can close or open the lock within 2 km from the start of the line, if the current state of the Bluetooth lock is open, the Bluetooth lock can respond to the operation instruction of closing the lock, and the Bluetooth lock can be directly closed. If the current state of the Bluetooth lock is closed, the Bluetooth lock can respond to the operation instruction of opening the lock, and the Bluetooth lock can be directly opened.

[0113] In this embodiment, by determining whether the Bluetooth lock performs the operation indicated by the operation instruction according to the preset line information, the allowed geographic error range, and the permission information of the user, the user can be prevented from operating the Bluetooth lock at a non-allowed geographic position, and the security of the Bluetooth lock is further improved. By operating the lock according to the current state of the Bluetooth lock, the process of operating the lock can be faster and more convenient.

[0114] Optionally, the determining whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user in S304 can include:

[0115] Optionally, after S303 and S304, that is, after determining that the current position is within the error range of the preset geographical position, it is judged whether the current time is within the time error range of the estimated time. If yes, it is determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user. If no, the process ends.

[0116] Optionally, the estimated time and the time error range of the estimated time sent by the server are received. If the current time is within the time error range of the estimated time, it is determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0117] The server can increase the control of the estimated time and the time error range of the estimated time. The server can calculate the time of the vehicle from the starting point to the ending point or the passing point according to the speed of the vehicle. A certain time error range can be configured for each time. The time error range can be 1 hour or 1 day, or an estimated value, such as a percentage.

[0118] For example, user A needs 15 hours from the starting point to the ending point. User A estimates to arrive at the ending point at 14:00 on June 12, 23. The configured time error range is 2 hours. Therefore, the time error range of the estimated time is between 12:00 and 16:00 on June 12, 23.

[0119] Optionally, when the user satisfies that the current position of the terminal device is within the geographical error range allowed by the preset geographical position, the time error range of the estimated time obtained can be compared with the current time. If the current time is within the time error range of the estimated time, it is determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0120] Continuing with the above example, if the current time of user A from the starting point to the ending point is 13:00 on June 12, 23, it can be determined whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user. If the current time of user A from the starting point to the ending point is 18:00 on June 12, 23, user A cannot operate the Bluetooth lock, and it is not necessary to determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0121] In the embodiment, before determining whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user after determining that the geographical position meets the error range of the preset geographical position, that is, a comparison condition of the current time and the estimated time and the time error range of the estimated time is added between S303 and S304, that is, in the embodiment, the current position needs to be determined, and the current time needs to be determined, so that the condition for the user to operate the Bluetooth lock is more stringent, and the security of the Bluetooth lock is further improved.

[0122] Optionally, in S302, the error range of the geographical position allowed by the preset geographical position according to the preset route information can include:

[0123] Optionally, at least one permission time period is received, and if the current time is within the permission time period, the error range of the geographical position allowed by the preset geographical position is determined according to the preset route information.

[0124] Optionally, the permission time period can be preset by the server, and one or more time periods can be set. Different time periods can be set as permission to only open the lock, only close the lock, both open and close the lock, and cannot operate the lock. When the user successfully logs in to the terminal device APP, the server can send the preset time period permission to the terminal device APP.

[0125] For example, the permission time period can include only opening the lock between 12:00 pm and 14:00 pm, only closing the lock between 15:00 pm and 15:30 pm, opening and closing the lock between 16:00 pm and 17:00 pm, and not having the permission to operate the Bluetooth lock between 14:00 pm and 15:00 pm.

[0126] Optionally, if the current time of the terminal device of the user is within the preset time period, S302 and S303 can be continued to be executed, so that S304 can be continued to be executed. If the current position is within the allowed error range, whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user is determined.

[0127] In the embodiment, by adding the judgment of the permission time period before determining whether the current position is within the error range of the preset geographical position, it is ensured that the user needs to meet the requirement of the permission time period regardless of the position of the user, so that the condition for the user to operate the Bluetooth lock is more stringent, and the security of the Bluetooth lock is higher.

[0128] Optionally, in the embodiment, if the current time is within the permission time period, the error range of the geographical position allowed by the preset geographical position according to the preset route information can include:

[0129] Optionally, the first terminal local time when the terminal device establishes a communication connection with the Bluetooth lock and the first server reference time are acquired.

[0130] The first terminal local time can refer to the time set on the terminal device, which can be customized by the user on the terminal device according to the user's own needs, and the first server reference time can refer to the current Beijing time acquired by the server through a time acquisition interface.

[0131] Optionally, the time when the terminal device establishes a communication connection with the Bluetooth lock can refer to the time when the user opens the APP on the terminal device, and the time on the terminal device at this moment is taken as the first terminal local time localtime1, and the current Beijing time acquired by the server is taken as the first server reference time servicetime1.

[0132] Optionally, the second terminal local time when the terminal device responds to the operation instruction, the second server reference time, and the third terminal local time when it is determined that the user is allowed to operate the Bluetooth lock are acquired.

[0133] Optionally, when the user needs to operate the Bluetooth lock, the time on the terminal device at this moment is taken as the second terminal local time localtime2 when the user enters the secondary page of the terminal device APP to operate the lock, and the current Beijing time acquired by the server at this moment is taken as the second server reference time servicetime2; the third terminal local time localtime3 is taken as the time on the terminal device at this moment when it is determined that the user is allowed to operate the Bluetooth lock after determining whether the user has the operation right of the Bluetooth lock and before determining the permission time period or the estimated time.

[0134] Optionally, the first time is determined according to the first server reference time, the first terminal local time, and the third terminal local time, and the first time is the sum of the difference between the third terminal local time and the first terminal local time and the first server reference time, specifically servicetime1+(localtime3-localtime1).

[0135] Optionally, the second time is determined according to the second server reference time, the second terminal local time, and the third terminal local time, and the second time is the sum of the difference between the third terminal local time and the first terminal local time and the second server reference time, specifically servicetime2+(localtime3-localtime2).

[0136] Optionally, according to the first time, the second time and the preset time range, it is judged whether the time of the terminal device meets the preset condition, if yes, and the current time is within the permission time period, then the preset geographical position allowed geographical error range is determined according to the preset line information.

[0137] Optionally, if the first time and the second time are both within the preset time range, the time of the terminal device is normal, and the current time is within the permission time period, then the preset geographical position allowed geographical error range can be determined according to the preset line information.

[0138] In the embodiment, whether the time on the terminal device is normal is determined by judging whether the terminal local time is consistent with the server time, and only when the time on the terminal device is normal, the subsequent permission time period judgment can be performed, which avoids that the time on the terminal device is inaccurate due to the user setting the mobile phone on the terminal device, thereby avoiding errors in the time judgment result and improving the accuracy of the time judgment and the security of the Bluetooth lock.

[0139] Optionally, the determination of whether the user is allowed to operate the Bluetooth lock according to the user's permission information in the above S301 can include:

[0140] Optionally, a plurality of position information of the terminal device before and after responding to the operation instruction is acquired.

[0141] Specifically, the position information of the terminal device before responding to the operation instruction can refer to the position information of the terminal device when the terminal device APP is started, and the position information includes the longitude and latitude and altitude of the terminal device on the geographical position, which can be taken as the first position information; after responding to the operation instruction, the position information of the terminal device can be acquired multiple times at a preset time interval when the user needs to operate the lock to enter the secondary page of the terminal APP which can operate the lock, and after it is determined that the user is allowed to operate the Bluetooth lock according to the user's permission information, for example, the position information of the terminal device can be acquired three times at an interval of 1 second, and the three times of position information can be taken as the second position information, the third position information and the fourth position information.

[0142] Optionally, if the plurality of position information is different, that is, two or more of the plurality of position information is different, then the preset geographical position allowed geographical error range is determined according to the preset line information.

[0143] For example, if the first position information and the second position information are different, and two of the third position information and the fourth position information are different or three of the third position information and the fourth position information are different or all of the third position information and the fourth position information are different, it indicates that the position of the terminal device changes at different times, that is, the terminal device is normal, and the following step S303 can be continued, that is, the preset geographical position allowed geographical error range is determined according to the preset line information, so that it can be judged whether the current position is in the preset geographical position allowed geographical error range.

[0144] If the first position information and the second position information are different, and the third position information and the fourth position information are not changed, it can be indicated that the terminal device uses virtual positioning, at this time, the Bluetooth lock cannot be continued to be operated, and the user is prompted that the terminal device environment is not safe.

[0145] In the embodiment, by judging whether the terminal device uses virtual positioning, it can be determined whether the environment of the terminal device is safe, so that the Bluetooth lock can perform other more permission determination in the case of safe terminal device, and the safety of the Bluetooth lock can be further improved.

[0146] Optionally, the method can further include:

[0147] Optionally, in response to the permission application instruction of the user, a permission application message is sent to the server, so that the server allocates the permission to the user and / or transfers the permission of the user according to the permission application message.

[0148] Optionally, when the user is in an emergency, the user can apply for higher permission or transfer the user's permission to other users on the terminal device APP. For example, when user A has a traffic accident, user B is urgently dispatched for support, at this time, the goods kept by user A need to be transferred to user B, at this time, user B has no unlocking permission and no operation permission, and needs to apply for higher permission according to the situation. The user can send a permission application message to the server through the terminal device APP, the server re-allocates or transfers the permission of the user according to the received permission application message, and re-sends the updated user permission to the terminal device APP of the user.

[0149] Optionally, the permission applied by the user in the emergency has a number of times or a time limit, and the number of times and / or the time of the Bluetooth lock operated by the user can be set according to the application message.

[0150] In the embodiment, by allocating or transferring the permission of the user in the emergency, the processing mechanism in the emergency is increased, so that the goods can be delivered on time and the safety of the goods is ensured.

[0151] In order to more clearly illustrate the priority relationship between the above-mentioned embodiments, the following table is usedFigure 4 To make a complete description, Figure 4 A complete control method of a Bluetooth lock is provided for the embodiments of the present application, as shown in the method, the method comprises: Figure 4 As shown in the method, the method comprises:

[0152] S401, log in the terminal device APP and connect with the Bluetooth lock.

[0153] S402, determine whether the user is allowed to operate the Bluetooth lock according to the user's permission information, if yes, execute the following S403, if not, end.

[0154] S403, determine whether the time of the terminal device is normal according to the first time, the second time and the preset time range, if yes, execute the following S404, if not, end.

[0155] S404, determine whether the current time is within the permission time period, if yes, execute the following S405, if not, end.

[0156] S405, determine whether to use virtual positioning, if yes, end, if not, execute the following S406.

[0157] S406, determine whether the current position is within the error range of the preset geographical position, if yes, execute the following S407, if not, end.

[0158] S407, determine whether the current time is within the time error range of the estimated time, if yes, execute the following S408, if not, end.

[0159] S408, determine whether to instruct the Bluetooth lock to execute the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user, if yes, execute the operation indicated by the operation instruction, if not, end.

[0160] The specific steps of S401-S408 above have been described in the specific embodiments above, and will not be repeated here.

[0161] Figure 5 A device schematic diagram of a control method of a Bluetooth lock is provided for the embodiments of the present application, as shown in the device, the device comprises: Figure 5 As shown in the device, the device comprises:

[0162] The acquisition module 501 is configured to, after the terminal device and the Bluetooth lock establish a communication connection, acquire the configuration information sent by the server in advance in response to the operation instruction of the user, and acquire the state information of the Bluetooth lock, wherein the configuration information comprises: the permission information of the user, the preset line information;

[0163] The determining module 502 is configured to determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the permission information of the user, the preset route information, the current position of the terminal device, and the state information of the Bluetooth lock.

[0164] The sending module 503 is configured to send a control instruction to the Bluetooth lock to control the Bluetooth lock to perform the operation indicated by the operation instruction.

[0165] Optionally, the determining module 501 is specifically configured to:

[0166] determine whether the user is allowed to operate the Bluetooth lock according to the permission information of the user;

[0167] If yes, determine a preset geographical error range allowed by a preset geographical position according to the preset route information.

[0168] If the current position is within the allowed geographical error range, determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0169] Optionally, the determining module 501 is specifically configured to:

[0170] receive the estimated time and the time error range of the estimated time sent by the server;

[0171] If the current time is within the time error range of the estimated time, determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user.

[0172] Optionally, the determining module 501 is specifically configured to:

[0173] receive at least one permission time period sent by the server;

[0174] If the current time is within the permission time period, determine a preset geographical error range allowed by a preset geographical position according to the preset route information.

[0175] Optionally, the determining module 501 is specifically configured to:

[0176] obtain a first terminal local time and a first server reference time when the terminal device establishes a communication connection with the Bluetooth lock;

[0177] obtain a second terminal local time, a second server reference time, and a third terminal local time when the terminal device responds to the operation instruction and when it is determined that the user is allowed to operate the Bluetooth lock;

[0178] determine a first time according to the first server reference time, the first terminal local time and the third terminal local time;

[0179] determine a second time according to the second server reference time, the second terminal local time and the third terminal local time;

[0180] determine whether the time of the terminal device meets a preset condition according to the first time, the second time and a preset time range;

[0181] if yes, and the current time is within the permission time period, determine a preset geographical error range allowed by a preset geographical position according to the preset line information.

[0182] Optionally, the determining module 501 is specifically configured to:

[0183] obtain a plurality of position information before and after the terminal device responds to the operation instruction;

[0184] if the plurality of position information are different, determine a preset geographical error range allowed by a preset geographical position according to the preset line information.

[0185] Optionally, the sending module 503 is further specifically configured to:

[0186] in response to a permission application instruction of a user, send a permission application message to the server, so that the server allocates permission to the user and / or transfers the permission of the user according to the permission application message.

[0187] Figure 6 A structural block diagram of an electronic device 600 is provided in the embodiments of the present application. The electronic device may, for example, be the terminal device described in the foregoing embodiments. As shown in the structural block diagram, the electronic device may include a processor 601 and a memory 602. Figure 6

[0188] Optionally, a bus 403 may also be included, wherein the memory 602 is configured to store machine readable instructions executable by the processor 601. When the electronic device 400 is running, the processor 601 communicates with the memory 602 through the bus 603, and the machine readable instructions are executed by the processor 601 to perform the method steps in the method embodiments described above.

[0189] The embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon. When the computer program is run by a processor, the method steps in the control method embodiments of the Bluetooth lock described above are performed.

[0190] ​Those skilled in the art can clearly understand the specific working process of the system and the device described above for the convenience and brevity of description, and the corresponding process in the method embodiment can be referred to, and the present application will not be repeated. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and the actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some communication interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0191] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. When the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0192] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A control method of a Bluetooth lock, characterized by, The application relates to a terminal device applied to a Bluetooth lock management system, wherein the Bluetooth lock management system comprises a server, the terminal device and a Bluetooth lock, the terminal device is in communication connection with the server, and the method comprises the following steps: After the terminal device and the Bluetooth lock establish a communication connection, the state information of the Bluetooth lock is acquired in response to an operation instruction of a user, and the configuration information previously sent by the server is acquired, wherein the configuration information comprises permission information of the user and preset line information; Whether the Bluetooth lock is instructed to execute an operation indicated by the operation instruction is determined according to the permission information of the user, the preset line information, the current position of the terminal device and the state information of the Bluetooth lock; If yes, a control instruction is sent to the Bluetooth lock to control the Bluetooth lock to execute the operation indicated by the operation instruction; The determination of whether the Bluetooth lock is instructed to execute the operation indicated by the operation instruction according to the permission information of the user, the preset line information, the current position of the terminal device and the state information of the Bluetooth lock comprises the following steps: Whether the user is allowed to operate the Bluetooth lock is determined according to the permission information of the user; If yes, a preset geographical position is allowed to have a geographical error range according to the preset line information; If the current position is within the allowed geographical error range, whether the Bluetooth lock is instructed to execute the operation indicated by the operation instruction is determined according to the state information of the Bluetooth lock and the permission information of the user; The determination of the allowed geographical error range of the preset geographical position according to the preset line information comprises the following steps: At least one permission time period sent by the server is received; If the current time is within the permission time period, the allowed geographical error range of the preset geographical position is determined according to the preset line information; If the current time is within the permission time period, the allowed geographical error range is determined according to the preset line information, which comprises the following steps: A first terminal local time and a first server reference time when the terminal device and the Bluetooth lock establish a communication connection are acquired; A second terminal local time, a second server reference time and a third terminal local time when the terminal device responds to the operation instruction are acquired; A first time is determined according to the first server reference time, the first terminal local time and the third terminal local time; A second time is determined according to the second server reference time, the second terminal local time and the third terminal local time; Whether the time of the terminal device meets a preset condition is judged according to the first time, the second time and a preset time range; If yes, and the current time is within the permission time period, the allowed geographical error range of the preset geographical position is determined according to the preset line information.

2. The control method of the Bluetooth lock according to claim 1, characterized in that, The determination of whether the Bluetooth lock is instructed to execute the operation indicated by the operation instruction according to the state information of the Bluetooth lock and the permission information of the user comprises the following steps: A predicted time and a time error range of the predicted time sent by the server are received; If the current time is within a time error range of the estimated time, whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction is determined according to the state information of the Bluetooth lock and the permission information of the user.

3. The control method of the Bluetooth lock according to claim 1, characterized in that, According to the preset route information, a preset geographical position allowed geographical error range is determined, including: Obtaining a plurality of position information before and after the terminal device responds to the operation instruction; If the plurality of position information is different, according to the preset route information, a preset geographical position allowed geographical error range is determined.

4. A method of controlling a Bluetooth lock according to any one of claims 1-3, characterized in that, Also includes: In response to the user's permission application instruction, the server sends a permission application message to the server, so that the server allocates permissions to the user and / or transfers the user's permissions according to the permission application message.

5. A control device of a Bluetooth lock characterized by comprising: Including: The acquisition module is configured to, after the terminal device establishes a communication connection with the Bluetooth lock, in response to the user's operation instruction, acquire the configuration information sent by the server in advance, and acquire the state information of the Bluetooth lock, wherein the configuration information includes: the user's permission information, the preset route information; The determination module is configured to determine whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction according to the user's permission information, the preset route information, the current position of the terminal device and the state information of the Bluetooth lock. The sending module is configured to, if so, send a control instruction to the Bluetooth lock to control the Bluetooth lock to perform the operation indicated by the operation instruction. The determination module is specifically configured to: Determine whether the user is allowed to operate the Bluetooth lock according to the user's permission information; If so, according to the preset route information, a preset geographical position allowed geographical error range is determined. If the current position is within the allowed geographical error range, whether to instruct the Bluetooth lock to perform the operation indicated by the operation instruction is determined according to the state information of the Bluetooth lock and the permission information of the user. The determination module is specifically configured to: Receive at least one permission time period sent by the server; If the current time is within the permission time period, according to the preset route information, a preset geographical position allowed geographical error range is determined. The determination module is specifically configured to: Obtain a first terminal local time and a first server reference time when the terminal device establishes a communication connection with the Bluetooth lock; Obtain a second terminal local time, a second server reference time when the terminal device responds to the operation instruction, and a third terminal local time when it is determined that the user is allowed to operate the Bluetooth lock; Determine a first time according to the first server reference time, the first terminal local time and the third terminal local time; Determine a second time according to the second server reference time, the second terminal local time and the third terminal local time; Determine whether the time of the terminal device meets the preset condition according to the first time, the second time and the preset time range; If so, and the current time is within the permission time period, according to the preset route information, a preset geographical position allowed geographical error range is determined.

6. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is run by the processor to execute the steps of the control method of the Bluetooth lock according to any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is run by the processor to execute the steps of the control method of the Bluetooth lock according to any one of claims 1-4.

Citation Information

Patent Citations

  • Intelligent unlocking method and intelligent lock

    CN105931330A

  • Wireless power supply and wireless unlocking type smart lock and remote monitoring method

    CN110264599A

  • Data processing method of device and computer readable storage medium

    CN112822630A

  • Bluetooth lock unlocking method and system and Bluetooth lock

    CN115273287A