Method, device and equipment for interaction between access control device and cloud server in disconnected state
Through Bluetooth communication between the access control device and the mobile terminal, data upload and cloud server interaction are realized when the network is disconnected, which solves the problem of opening failure caused by disconnection of the access control device and improves remote diagnosis and fault handling capabilities.
Patent Information
- Application Number
- CN202211694935.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-12-28
AI Technical Summary
When the access control device is disconnected, the access control device is out of the control of the cloud server, causing the problem of opening failure.
By establishing a Bluetooth communication connection between the access control device and the target mobile terminal, predict the communication duration and upload speed, intercept and add the data to be uploaded with head and tail marks, and transmit the data to the mobile terminal through Bluetooth communication, and use the mobile network to upload the data Go to the cloud server to realize data reorganization and redundancy verification.
Communication with the cloud server is realized when the access control equipment is disconnected, ensuring functional availability and improving remote diagnosis and fault handling capabilities.
Smart Images

Figure CN116152980B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of smart communities, and in particular to a method, apparatus, and device for interacting between an access control device and a cloud server in an off-network state. Background Art
[0002] Access control devices usually rely on the network to interact with cloud servers, and then report the access control status to the cloud server, or receive data and instructions from the cloud server. However, the network is affected by factors such as the operator's server, traffic cards, installation environment construction, and equipment failure. When the access control device is disconnected, the access control device is out of the control of the cloud server. The cloud server cannot send any data to the access control device, and the access control device cannot upload logs used for troubleshooting to the cloud server. As a result, there is a situation where the access control device fails to open. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, device and equipment for interaction between an access control device and a cloud server in a disconnected state, aiming to solve the technical problem that in related scenarios, when the access control device is disconnected, the access control device is out of the control of the cloud server and the access control device fails to open.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present disclosure provides a method for interacting between an access control device and a cloud server in an offline state. The method is applied to the access control device and includes:
[0005] When it is determined that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server, acquiring the target mobile terminal in response to a door opening verification action of the access control device;
[0006] Requesting to establish a Bluetooth communication connection with the target mobile terminal, and if the Bluetooth communication connection is successfully established with the target mobile terminal, obtaining the moving speed of the target mobile terminal within a preset time period before performing the door opening verification action;
[0007] Predicting a Bluetooth communication duration between the target mobile terminal and the access control device, and predicting an upload speed of data uploaded via the Bluetooth communication connection between the target mobile terminal and the access control device, based on the moving speed of the target mobile terminal;
[0008] intercepting the target data to be uploaded from the data to be reported based on the Bluetooth communication duration and the upload speed, and adding a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be uploaded, wherein the data size of the intercepted target data to be uploaded is such that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device, the header identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the header identifier of the next target data to be uploaded;
[0009] A cyclic redundancy check code is added to the target data to be uploaded after adding the header identifier and the tail identifier, and the target data to be uploaded after adding the cyclic redundancy check code is transmitted to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal uploads the target data to be uploaded after adding the cyclic redundancy check code to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded carrying an end identifier, it reorganizes the target data to be uploaded received multiple times according to the header identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0010] In one preferred embodiment, the step of acquiring the target mobile terminal in response to the door opening verification action of the access control device includes:
[0011] In response to a door opening verification action in which a user records a facial image through an image acquisition device on the access control device, the recorded facial image is compared with a verification facial image pre-stored in a memory of the access control device;
[0012] If the comparison result indicates that the user is a legal person entering or exiting, obtaining Bluetooth information of the mobile terminal used by the user to upload the verification face image;
[0013] According to the Bluetooth information of the mobile terminal, searching whether there is a mobile terminal that has uploaded the verification face image within the Bluetooth search range of the access control device;
[0014] In a case where the mobile terminal that uploaded the verification face image exists within the Bluetooth search range, the mobile terminal is used as the target mobile terminal.
[0015] In one preferred embodiment, the step of acquiring the target mobile terminal in response to the door opening verification action of the access control device includes:
[0016] In response to a user using a mobile terminal to request a door opening verification action of the access control device via near field communication (NFC), determining whether the mobile terminal is a legitimate mobile terminal based on NFC information of the mobile terminal;
[0017] In the case that the mobile terminal is a legitimate mobile terminal, the mobile terminal is used as the target mobile terminal.
[0018] In one preferred embodiment, the step of intercepting target data to be uploaded from the data to be reported based on the Bluetooth communication duration and the upload speed, and adding a header identifier and a footer identifier to the target data to be uploaded to obtain the target data to be uploaded includes:
[0019] According to the tail identifier of the previous target data to be uploaded, the starting data of the intercepted data this time is determined from the data to be reported;
[0020] Determine the size of the data to be transmitted based on the Bluetooth communication duration and the upload speed;
[0021] Starting from the starting data, intercepting the target data to be uploaded of the size of the currently transmitted data from the data to be reported;
[0022] Generate a head identifier of the target data to be uploaded this time according to the tail identifier of the previous target data to be uploaded, and generate a tail identifier of the target data to be uploaded this time according to a preset identifier generation rule;
[0023] Adding a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be packaged;
[0024] The target data to be uploaded is generated by performing packaging processing according to the interception times of the data to be reported and the target upload data to be packaged, wherein the interception times is the number of times the data to be reported is intercepted from the beginning to the current interception.
[0025] In one preferred embodiment, the method further comprises:
[0026] Receive cloud server instruction data transmitted by any target mobile terminal via a Bluetooth connection, the cloud server instruction data being obtained by the cloud server after subpackaging the issued instruction data, the cloud server instruction data carrying a header identifier and a footer identifier, and the data size of the cloud server instruction data being less than or equal to the data size of the target data to be uploaded transmitted by the access control device to the corresponding target mobile terminal;
[0027] Decrypting the cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection according to the preset encryption key to obtain the cloud server instruction data to be reassembled;
[0028] In the case that the received cloud server instruction data carries an end identifier, the multiple cloud server instruction data to be reorganized are reorganized according to the head identifier and tail identifier carried by each cloud server instruction data to obtain the target cloud server instruction data, and the target cloud server instruction data is used to patch or upgrade the software of the access control device.
[0029] In one preferred embodiment, when the received cloud server instruction data carries an end identifier, the step of reassembling the plurality of cloud server instruction data to be reassembled according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain the target cloud server instruction data includes:
[0030] In a case where the received cloud server instruction data carries an end identifier, reassembling the plurality of cloud server instruction data to be reassembled according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain the cloud server instruction data to be verified;
[0031] Calculate the MD5 value of the cloud server instruction data to be verified, and compare the MD5 value with the standard MD5 value carried in the cloud server instruction data carrying the end mark;
[0032] If the MD5 value of the cloud server instruction data to be verified is consistent with the standard MD5 value, the cloud server instruction data to be verified is used as the target cloud server instruction data;
[0033] When the MD5 value of the cloud server instruction data to be verified is inconsistent with the standard MD5 value, a data retransmission request is generated, and in response to the door opening verification action of the access control device, the data retransmission request is transmitted as the data to be reported.
[0034] In one preferred embodiment, the step of receiving cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection includes:
[0035] When any of the target mobile terminals enters the Bluetooth search range of the access control device, re-establishing a Bluetooth communication connection with the target mobile terminal;
[0036] In the case where the Bluetooth communication connection with the target mobile terminal is successfully re-established, in response to the target mobile terminal performing a door opening verification action on the access control device, sending a cloud server instruction data transmission request to the target mobile terminal via the Bluetooth communication connection;
[0037] Receive cloud server instruction data transmitted by the target mobile terminal via Bluetooth connection in response to the cloud server instruction data transmission request.
[0038] In one preferred embodiment, the step of adding a cyclic redundancy check code to the target data to be uploaded after adding the header identifier and the tail identifier, and transmitting the target data to be uploaded after adding the cyclic redundancy check code to the target mobile terminal through the Bluetooth communication connection includes:
[0039] The target data to be uploaded after adding the cyclic redundancy check code is encrypted once using the preset encryption key;
[0040] The target data to be uploaded that has been encrypted once is transmitted to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal performs a second encryption on the received target data to be uploaded that has been encrypted once according to the user identity and the mobile terminal token, and uploads the second-encrypted target data to be uploaded to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded that carries an end identifier, it reorganizes the second-encrypted target data to be uploaded that has been received multiple times according to the head identifier and the tail identifier, and performs a redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0041] A second aspect of the present disclosure provides a method for interacting between an access control device and a cloud server in an offline state, the method being applied to the cloud server, the method comprising:
[0042] receiving target data to be uploaded after adding a cyclic redundancy check code uploaded by any target mobile terminal, wherein the target data to be uploaded is transmitted to the target mobile terminal via Bluetooth communication when the access control device determines that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server, and the target mobile terminal uploads the data to the cloud server via the mobile network;
[0043] wherein, the data size of each target data to be uploaded is intercepted so that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device;
[0044] When any of the target data to be uploaded is received and carries an end identifier, the target data to be uploaded are reorganized according to the head identifier and tail identifier of the target data to be uploaded, the head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded;
[0045] The reorganized target data to be uploaded is subjected to redundancy check according to the cyclic redundancy check code to obtain complete data to be reported.
[0046] According to a third aspect of the present disclosure, there is provided a device for interacting between an access control device and a cloud server in an off-network state. The device is applied to the access control device and includes:
[0047] an acquisition module configured to acquire a target mobile terminal in response to a door opening verification action of the access control device when it is determined that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server;
[0048] a request module configured to request establishment of a Bluetooth communication connection with the target mobile terminal, and, if the Bluetooth communication connection is successfully established with the target mobile terminal, obtain a moving speed of the target mobile terminal within a preset time period before performing a door opening verification action;
[0049] a prediction module configured to predict a duration of Bluetooth communication between the target mobile terminal and the access control device, and to predict an upload speed of data uploaded via the Bluetooth communication connection between the target mobile terminal and the access control device, based on the moving speed of the target mobile terminal;
[0050] an interception module configured to intercept target data to be uploaded from the data to be reported based on the Bluetooth communication duration and the upload speed, and to add a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be uploaded, wherein the data size of the intercepted target data to be uploaded is such that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device, the header identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the header identifier of the next target data to be uploaded;
[0051] The transmission module is configured to add a cyclic redundancy check code to the target data to be uploaded after adding the header identifier and the tail identifier, and transmit the target data to be uploaded after adding the cyclic redundancy check code to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal uploads the target data to be uploaded after adding the cyclic redundancy check code to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded carrying an end identifier, it reorganizes the target data to be uploaded received multiple times according to the header identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0052] According to a fourth aspect of the present disclosure, there is provided a device for interacting between an access control device and a cloud server in an off-network state, the device being applied to a cloud server and comprising:
[0053] a receiving module configured to receive target data to be uploaded after adding a cyclic redundancy check code, uploaded by any target mobile terminal, wherein the target data to be uploaded is transmitted to the target mobile terminal via Bluetooth communication when the access control device determines that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server, and the target mobile terminal uploads the data to the cloud server via the mobile network;
[0054] wherein, the data size of each target data to be uploaded is intercepted so that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device;
[0055] a reassembly module configured to, upon receiving any of the target data to be uploaded carrying an end identifier, reassemble the target data to be uploaded according to a head identifier and a tail identifier of the target data to be uploaded, wherein the head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded;
[0056] The verification module is configured to perform redundancy verification on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0057] According to a fifth aspect of the present disclosure, there is provided an access control device, including:
[0058] a memory having a computer program stored thereon;
[0059] A processor is used to execute the computer program in the memory to implement the steps of the method in the first aspect.
[0060] According to a sixth aspect of the present disclosure, a cloud server is provided, including:
[0061] a memory having a computer program stored thereon;
[0062] A processor is used to execute the computer program in the memory to implement the steps of the method in the second aspect.
[0063] Beneficial effects:
[0064] The present invention provides a method, device, and equipment for interaction between access control devices and cloud servers in an offline state. Compared with the existing technology, it has the following advantages:
[0065] If the network connection between the access control device and the cloud server is disconnected and the access control device has data to be reported, the target mobile terminal is obtained in response to the door opening verification action of the access control device; if Bluetooth communication is successfully established with the target mobile terminal, the moving speed of the target mobile terminal within a preset time period before performing the door opening verification action is obtained; the Bluetooth communication time between the target mobile terminal and the access control device and the upload speed of the data uploaded through the Bluetooth communication between the target mobile terminal and the access control device are predicted based on the moving speed; the target data to be uploaded is intercepted from the data to be reported based on the Bluetooth communication time and the upload speed, and the target data to be uploaded is added with head and tail identifiers to obtain the target data to be uploaded; the target data to be uploaded is transmitted to the target mobile terminal via the Bluetooth communication connection, so that the target mobile terminal uploads the target data to be uploaded to the cloud server through the mobile network. When the access control device is disconnected from the Internet, it establishes a communication connection with the mobile terminal carried by the user through its own Bluetooth module. Then, the mobile terminal carried by the user passing through the access control device can be used to transfer the interactive information between the access control device and the cloud server, thereby realizing the communication between the access control device and the cloud server in the disconnected state, and realizing functions such as data sending, abnormal feedback, and upgrade software package acquisition, ensuring the availability of the access control device functions and improving the remote diagnosis and troubleshooting capabilities of the access control device.
[0066] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0068] Figure 1 This is a flowchart of a method for interaction between an access control device and a cloud server when the access control device is disconnected from the network according to an embodiment of the specification.
[0069] Figure 2 This is a flowchart of a method for interaction between an access control device and a cloud server when the cloud server side is disconnected from the network, according to an embodiment of the specification.
[0070] Figure 3 This is a block diagram of an apparatus for interacting between an access control device and a cloud server when the access control device is disconnected from the network, as shown in an embodiment of the specification.
[0071] Figure 4 This is a block diagram of an apparatus for interacting between an access control device and a cloud server when the cloud server is disconnected from the network, as shown in an embodiment of the specification. DETAILED DESCRIPTION
[0072] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0073] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.
[0074] In order to achieve the above purpose, the present invention provides a method for interacting between an access control device and a cloud server in a disconnected state. Figure 1 This is a flow chart showing a method for interaction between an access control device and a cloud server in a disconnected state according to an embodiment. Figure 1 As shown, the method includes:
[0075] In step S11, when it is determined that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server, the target mobile terminal is acquired in response to the door opening verification action of the access control device;
[0076] In step S12, a request is made to establish a Bluetooth communication connection with the target mobile terminal, and if the Bluetooth communication connection is successfully established with the target mobile terminal, a moving speed of the target mobile terminal within a preset time period before performing the door opening verification action is obtained;
[0077] In step S13, based on the moving speed of the target mobile terminal, the Bluetooth communication duration between the target mobile terminal and the access control device is predicted, as well as the upload speed of data uploaded via the Bluetooth communication connection between the target mobile terminal and the access control device is predicted;
[0078] In step S14, target data to be uploaded is intercepted from the data to be reported according to the Bluetooth communication duration and the upload speed, and a head identifier and a tail identifier are added to the target data to be uploaded to obtain the target data to be uploaded.
[0079] The size of the intercepted target data to be uploaded is such that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device. The header identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the header identifier of the next target data to be uploaded.
[0080] In step S15, a cyclic redundancy check code is added to the target data to be uploaded after the header identifier and the tail identifier are added, and the target data to be uploaded after the cyclic redundancy check code is added is transmitted to the target mobile terminal via a Bluetooth communication connection.
[0081] Among them, the target mobile terminal uploads the target data to be uploaded after adding the cyclic redundancy check code to the cloud server through the mobile network. When the cloud server receives any target data to be uploaded with an end identifier, it reorganizes the target data to be uploaded received multiple times according to the head identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0082] The above technical solution establishes a communication connection with the mobile terminal carried by the user through its own Bluetooth module when the access control device is disconnected from the Internet. Then, the mobile terminal carried by the user passing through the access control device can be used to transfer the interactive information between the access control device and the cloud server, thereby realizing the communication between the access control device and the cloud server in the disconnected state, and realizing functions such as data sending, abnormal feedback, and upgrade software package acquisition, thereby ensuring the availability of the access control device functions and improving the remote diagnosis and troubleshooting capabilities of the access control device.
[0083] In one preferred embodiment, in step S11, in response to the door opening verification action of the access control device, the step of acquiring the target mobile terminal includes:
[0084] In response to a door opening verification action in which a user records a facial image through an image acquisition device on the access control device, the recorded facial image is compared with a verification facial image pre-stored in a memory of the access control device;
[0085] If the comparison result indicates that the user is a legitimate person entering or leaving, obtain the Bluetooth information of the mobile terminal where the user uploaded the verification face image;
[0086] Based on the Bluetooth information of the mobile terminal, find out whether there is a mobile terminal that has uploaded the verification face image within the Bluetooth search range of the access control device;
[0087] When there is a mobile terminal that has uploaded a verification face image within the Bluetooth search range, the mobile terminal is used as a target mobile terminal.
[0088] In one preferred embodiment, in step S11, in response to the door opening verification action of the access control device, the step of acquiring the target mobile terminal includes:
[0089] In response to a user using a mobile terminal to request a door opening verification action of an access control device via near field communication (NFC), determining whether the mobile terminal is a legitimate mobile terminal based on NFC information of the mobile terminal;
[0090] In the case that the mobile terminal is a legitimate mobile terminal, the mobile terminal is used as a target mobile terminal.
[0091] In one preferred embodiment, in step S14, the step of intercepting target data to be uploaded from the data to be reported according to the Bluetooth communication duration and the upload speed, and adding a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be uploaded includes:
[0092] According to the tail identifier of the previous target data to be uploaded, the starting data of the intercepted data is determined from the data to be reported;
[0093] Determine the size of the data to be transmitted based on the Bluetooth communication duration and upload speed;
[0094] Starting from the starting data, the target data to be uploaded with the size of the data to be transmitted is intercepted from the data to be reported;
[0095] Generate the head identifier of the target data to be uploaded this time according to the tail identifier of the previous target data to be uploaded, and generate the tail identifier of the target data to be uploaded this time according to the preset identifier generation rule;
[0096] Add a header identifier and a footer identifier to the target data to be uploaded to obtain the target data to be packaged;
[0097] The target data to be uploaded is packaged and processed according to the interception times of the data to be reported and the target upload data to be packaged, where the interception times refers to the number of times the data to be reported is intercepted from the beginning to the current interception.
[0098] In one preferred embodiment, the method further comprises:
[0099] Receive cloud server command data transmitted by any target mobile terminal via Bluetooth connection. The cloud server command data is obtained by the cloud server after subpackaging the issued command data. The cloud server command data carries a header identifier and a footer identifier. The data size of the cloud server command data is less than or equal to the data size of the target data to be uploaded transmitted by the access control device to the corresponding target mobile terminal;
[0100] According to the preset encryption key, the cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection is decrypted to obtain the cloud server instruction data to be reassembled;
[0101] When the received cloud server instruction data carries an end identifier, multiple cloud server instruction data to be reassembled are reassembled according to the head identifier and tail identifier carried by each cloud server instruction data to obtain the target cloud server instruction data. The target cloud server instruction data is used to patch or upgrade the software of the access control device.
[0102] In one preferred embodiment, when the received cloud server instruction data carries an end identifier, the step of reassembling a plurality of cloud server instruction data to be reassembled according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain the target cloud server instruction data includes:
[0103] In the case where the received cloud server instruction data carries an end identifier, the plurality of cloud server instruction data to be reassembled are reassembled according to the head identifier and tail identifier carried by each cloud server instruction data to obtain the cloud server instruction data to be verified;
[0104] Calculate the MD5 value of the cloud server instruction data to be verified, and compare the MD5 value with the standard MD5 value carried in the cloud server instruction data carrying the end mark;
[0105] If the MD5 value of the cloud server instruction data to be verified is consistent with the standard MD5 value, the cloud server instruction data to be verified is used as the target cloud server instruction data;
[0106] When the MD5 value of the cloud server instruction data to be verified is inconsistent with the standard MD5 value, a data retransmission request is generated, and in response to the door opening verification action of the access control device, the data retransmission request is transmitted as the data to be reported.
[0107] In one preferred embodiment, the step of receiving cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection includes:
[0108] When any target mobile terminal enters the Bluetooth search range of the access control device, re-establish the Bluetooth communication connection with the target mobile terminal;
[0109] In the event that the Bluetooth communication connection with the target mobile terminal is successfully re-established, in response to the target mobile terminal's door opening verification action for the access control device, a cloud server instruction data transmission request is sent to the target mobile terminal via the Bluetooth communication connection;
[0110] Receive cloud server instruction data transmitted by the target mobile terminal via Bluetooth connection in response to the cloud server instruction data transmission request.
[0111] In one preferred embodiment, in step S15, the step of adding a cyclic redundancy check code to the target data to be uploaded after adding the header identifier and the tail identifier, and transmitting the target data to be uploaded after adding the cyclic redundancy check code to the target mobile terminal via a Bluetooth communication connection includes:
[0112] The target data to be uploaded after adding the cyclic redundancy check code is encrypted once using the preset encryption key;
[0113] The target data to be uploaded that has been encrypted once is transmitted to the target mobile terminal through a Bluetooth communication connection, so that the target mobile terminal performs a second encryption on the received target data to be uploaded according to the user identity and the mobile terminal token, and uploads the second-encrypted target data to be uploaded to the cloud server through the mobile network. When the cloud server receives any target data to be uploaded with an end identifier, it reorganizes the second-encrypted target data to be uploaded received multiple times according to the head identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0114] Based on the same inventive concept, the embodiment of the present disclosure also provides a method for interacting between an access control device and a cloud server in a disconnected state. Figure 2 This is a flowchart of a method for interaction between an access control device and a cloud server in an off-network state according to an embodiment of the specification. The method is applied to a cloud server and includes the following steps.
[0115] In step S21, the target data to be uploaded with a cyclic redundancy check code added thereto uploaded by any target mobile terminal is received.
[0116] The target data to be uploaded is transmitted to the target mobile terminal via Bluetooth communication when the access control device determines that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server, and the target mobile terminal uploads the data to the cloud server via the mobile network.
[0117] The data size of each target data to be uploaded is intercepted so that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the Bluetooth connection with the access control device.
[0118] In step S22 , when any target data to be uploaded is received and carries an end identifier, each target data to be uploaded is reorganized according to the head identifier and the tail identifier of the target data to be uploaded.
[0119] The head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded;
[0120] In step S23, redundancy check is performed on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0121] The following is an illustrative example of the disclosed method using a complete embodiment. A mobile phone is used as an example. After a user connects to the access control device using a mobile app, authenticates, and opens the door, the Bluetooth connection is not directly closed. Instead, the access control device uses Bluetooth to encrypt and transmit the data to be reported to the mobile phone during the passage. The mobile app then receives the data, adds its own authentication factor, and encrypts it again before reporting it to the cloud server.
[0122] The target data reported by the access control device is first added with a cyclic redundancy check (CRC). The data is then encrypted using a preset encryption key. The encrypted data is then transmitted to the mobile app via Bluetooth.
[0123] The mobile app then performs a secondary hybrid encryption on the encrypted target data, using the user's identity and acquired phone information, such as the unique device number and brand. The mobile app then uploads the encrypted data to the cloud server via HTTPS or the mobile network. During this step, an SSL certificate is used to lock the data and prevent it from being captured.
[0124] Furthermore, upon receiving the secondary encrypted target data from the mobile app, the cloud service attempts to verify and decrypt it using the same rules as the phone number associated with the user's registration or login, as well as the current logged-in user's information. This step ensures the authenticity and reliability of the user's identity and terminal. After successful verification, verification and decryption are performed using the device key stored on the cloud server. This step ensures the authenticity and reliability of the access control device.
[0125] Furthermore, the cloud server performs a CRC check on the decrypted data to verify that the checksum is correct. This step ensures data integrity and prevents tampering. Only after successful verification can the data uploaded by the access control device be processed. Furthermore, the target mobile terminal can return the complete received information to the access control device.
[0126] In another embodiment, whether the access control device reports the status return after reporting the data to be reported, or the cloud server actively sends the instruction data, the same logic is followed for sending.
[0127] First, the encryption of the data sent by the cloud server follows the multi-layer encryption method in the aforementioned embodiment, that is, the cloud server encrypts once, and the mobile app encrypts twice. The mobile app receives the instruction data sent by the cloud server, and uses the mobile phone information and the information of the current login person to verify and decrypt according to the same rules to prevent message forgery and tampering.
[0128] Furthermore, after receiving the cloud server command data transmitted by the mobile app, the access control device uses the device key to verify and decrypt it. A CRC check is performed on the decrypted data to ensure data integrity and that it has not been tampered with. If the device reports a reply message, the access control device can delete the reported log cache file.
[0129] The reporting or distribution of big data is carried out through file segmentation to avoid reporting or downloading failures caused by long messages and insufficient time for users to stay at the access control system.
[0130] For example, when the data exceeds the set threshold, the access control device intercepts the target data to be uploaded from the data to be reported based on the Bluetooth communication duration and upload speed. The second cloud server cuts the data to be reported according to the data size reported by the target mobile terminal to obtain several "batch data".
[0131] In addition to sending data for each batch after segmentation, additional verification data must also be sent. This means the number of interactions between the device and the cloud after segmentation is P+1. "P" represents the number of split batches, and "1" represents the additional verification data reported or sent. Each batch of data can carry a task number, a total batch number, and a current batch number. The task number is a unique number for reporting or sending complete data. The same task number indicates that these batches are split from the same data. The total batch number indicates the total number of batches currently split. The current batch number indicates the batch number to which the current data belongs.
[0132] By adding the above three fields, the device and server can know the current processing progress, and perform targeted resending for batches that were unsuccessful or timed out without response, or deduplicate duplicate data.
[0133] After all batches of data have been sent, an additional verification data needs to be sent, which includes the task number and the Md5 value of the original unprocessed data.
[0134] After receiving all batches of data from the device or cloud, it is sorted and assembled, then merged back into the original data. To prevent data tampering, the Md5 value of the assembled data is calculated and compared with the reissued Md5 value. Data operations can only be performed if they are consistent. The assembled data packet serves as the current original data and is encrypted through a cyclic redundancy check algorithm, device key encryption, user information, and terminal information encryption before communication.
[0135] Based on the same inventive concept, the embodiment of the present disclosure also provides a device for interacting between an access control device and a cloud server in a disconnected state. Figure 3 This is a block diagram of a device for interacting with a cloud server in an off-network state according to an embodiment of the specification. The device 300 is applied to an access control device and includes:
[0136] The acquisition module 310 is configured to acquire the target mobile terminal in response to the door opening verification action of the access control device when it is determined that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server;
[0137] The request module 320 is configured to request to establish a Bluetooth communication connection with the target mobile terminal, and if the Bluetooth communication connection is successfully established with the target mobile terminal, obtain the moving speed of the target mobile terminal within a preset time period before performing the door opening verification action;
[0138] The prediction module 330 is configured to predict the duration of Bluetooth communication between the target mobile terminal and the access control device, and to predict the upload speed of data uploaded via the Bluetooth communication connection between the target mobile terminal and the access control device, based on the moving speed of the target mobile terminal;
[0139] The interception module 340 is configured to intercept the target data to be uploaded from the data to be reported based on the Bluetooth communication duration and the upload speed, and add a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be uploaded, wherein the data size of the intercepted target data to be uploaded is such that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device, the header identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the header identifier of the next target data to be uploaded;
[0140] The transmission module 350 is configured to add a cyclic redundancy check code to the target data to be uploaded after adding the header identifier and the tail identifier, and transmit the target data to be uploaded after adding the cyclic redundancy check code to the target mobile terminal through a Bluetooth communication connection, so that the target mobile terminal uploads the target data to be uploaded after adding the cyclic redundancy check code to the cloud server through the mobile network. When the cloud server receives any target data to be uploaded carrying an end identifier, it reorganizes the target data to be uploaded received multiple times according to the header identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0141] In one preferred embodiment, the acquisition module 310 is configured to:
[0142] In response to a door opening verification action in which a user records a facial image through an image acquisition device on the access control device, the recorded facial image is compared with a verification facial image pre-stored in a memory of the access control device;
[0143] If the comparison result indicates that the user is a legal person entering or exiting, obtaining Bluetooth information of the mobile terminal used by the user to upload the verification face image;
[0144] According to the Bluetooth information of the mobile terminal, searching whether there is a mobile terminal that has uploaded the verification face image within the Bluetooth search range of the access control device;
[0145] In a case where the mobile terminal that uploaded the verification face image exists within the Bluetooth search range, the mobile terminal is used as the target mobile terminal.
[0146] In one preferred embodiment, the acquisition module 310 is configured to:
[0147] In response to a user using a mobile terminal to request a door opening verification action of the access control device via near field communication (NFC), determining whether the mobile terminal is a legitimate mobile terminal based on NFC information of the mobile terminal;
[0148] In the case that the mobile terminal is a legitimate mobile terminal, the mobile terminal is used as the target mobile terminal.
[0149] In one preferred embodiment, the interception module 340 is configured to:
[0150] According to the tail identifier of the previous target data to be uploaded, the starting data of the intercepted data this time is determined from the data to be reported;
[0151] Determine the size of the data to be transmitted based on the Bluetooth communication duration and the upload speed;
[0152] Starting from the starting data, intercepting the target data to be uploaded of the size of the currently transmitted data from the data to be reported;
[0153] Generate a head identifier of the target data to be uploaded this time according to the tail identifier of the previous target data to be uploaded, and generate a tail identifier of the target data to be uploaded this time according to a preset identifier generation rule;
[0154] Adding a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be packaged;
[0155] The target data to be uploaded is generated by performing packaging processing according to the interception times of the data to be reported and the target upload data to be packaged, wherein the interception times is the number of times the data to be reported is intercepted from the beginning to the current interception.
[0156] In one preferred embodiment, the apparatus 300 further includes: an instruction receiving module configured to:
[0157] Receive cloud server instruction data transmitted by any target mobile terminal via a Bluetooth connection, the cloud server instruction data being obtained by the cloud server after subpackaging the issued instruction data, the cloud server instruction data carrying a header identifier and a footer identifier, and the data size of the cloud server instruction data being less than or equal to the data size of the target data to be uploaded transmitted by the access control device to the corresponding target mobile terminal;
[0158] Decrypting the cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection according to the preset encryption key to obtain the cloud server instruction data to be reassembled;
[0159] In the case that the received cloud server instruction data carries an end identifier, the multiple cloud server instruction data to be reorganized are reorganized according to the head identifier and tail identifier carried by each cloud server instruction data to obtain the target cloud server instruction data, and the target cloud server instruction data is used to patch or upgrade the software of the access control device.
[0160] In one preferred embodiment, the instruction receiving module is configured to:
[0161] In a case where the received cloud server instruction data carries an end identifier, reassembling the plurality of cloud server instruction data to be reassembled according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain the cloud server instruction data to be verified;
[0162] Calculate the MD5 value of the cloud server instruction data to be verified, and compare the MD5 value with the standard MD5 value carried in the cloud server instruction data carrying the end mark;
[0163] If the MD5 value of the cloud server instruction data to be verified is consistent with the standard MD5 value, the cloud server instruction data to be verified is used as the target cloud server instruction data;
[0164] When the MD5 value of the cloud server instruction data to be verified is inconsistent with the standard MD5 value, a data retransmission request is generated, and in response to the door opening verification action of the access control device, the data retransmission request is transmitted as the data to be reported.
[0165] In one preferred embodiment, the instruction receiving module is configured to:
[0166] When any of the target mobile terminals enters the Bluetooth search range of the access control device, re-establishing a Bluetooth communication connection with the target mobile terminal;
[0167] In the case where the Bluetooth communication connection with the target mobile terminal is successfully re-established, in response to the target mobile terminal performing a door opening verification action on the access control device, sending a cloud server instruction data transmission request to the target mobile terminal via the Bluetooth communication connection;
[0168] Receive cloud server instruction data transmitted by the target mobile terminal via Bluetooth connection in response to the cloud server instruction data transmission request.
[0169] In one preferred embodiment, the transmission module 350 is configured to:
[0170] The target data to be uploaded after adding the cyclic redundancy check code is encrypted once using the preset encryption key;
[0171] The target data to be uploaded that has been encrypted once is transmitted to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal performs a second encryption on the received target data to be uploaded that has been encrypted once according to the user identity and the mobile terminal token, and uploads the second-encrypted target data to be uploaded to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded that carries an end identifier, it reorganizes the second-encrypted target data to be uploaded that has been received multiple times according to the head identifier and the tail identifier, and performs a redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
[0172] Based on the same inventive concept, the embodiment of the present disclosure also provides a device for interacting between an access control device and a cloud server in a disconnected state. Figure 4 This is a block diagram of a device for interacting with a cloud server in an off-network state according to an embodiment of the specification. The device 400 is applied to a cloud server and includes:
[0173] The receiving module 410 is configured to receive target data to be uploaded after adding a cyclic redundancy check code, which is uploaded by any target mobile terminal. The target data to be uploaded is transmitted to the target mobile terminal via Bluetooth communication when the access control device determines that the access control device and the cloud server are disconnected from the network and the access control device has data to be reported to the cloud server, and the target mobile terminal uploads the data to the cloud server via the mobile network.
[0174] The data size of each target data to be uploaded is intercepted so that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the Bluetooth connection with the access control device.
[0175] The reassembly module 420 is configured to, when receiving any target data to be uploaded that carries an end identifier, reassemble the target data to be uploaded according to the head identifier and tail identifier of the target data to be uploaded, where the head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded;
[0176] The check module 430 is configured to perform redundancy check on the reorganized target data to be uploaded according to a cyclic redundancy check code to obtain complete data to be reported.
[0177] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0178] Those skilled in the art should understand that the device embodiments described above are merely illustrative. For example, the division of modules is merely a logical function division. The actual module division is not limited by the above division method. Multiple modules can be combined or one module can be divided into multiple sub-modules.
[0179] Furthermore, modules described as separate components may or may not be physically separate. Furthermore, each module may be implemented in whole or in part via software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. When implemented using hardware, it may be implemented in whole or in part in the form of an integrated circuit or chip.
[0180] The present disclosure also provides an access control device, including:
[0181] a memory having a computer program stored thereon;
[0182] The processor is used to execute the computer program in the memory to implement the steps of the method for interaction between the access control device and the cloud server in the disconnected state executed by the access control device side in any of the aforementioned embodiments.
[0183] The present disclosure also provides a cloud server, including:
[0184] a memory having a computer program stored thereon;
[0185] The processor is used to execute the computer program in the memory to implement the steps of the method for interaction between the access control device and the cloud server in the disconnected state executed by the cloud server side in any of the aforementioned embodiments.
[0186] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, various changes, modifications, replacements and variations can be made to these embodiments, and these changes, modifications, replacements and variations all fall within the scope of protection of the present disclosure.
[0187] It should also be noted that the various specific technical features described in the above specific embodiments may be combined in any suitable manner, unless there is any contradiction, and these combinations shall also be considered as the contents disclosed in this disclosure. To avoid unnecessary repetition, this disclosure will not further describe various possible combinations. The technical scope of this application is not limited to the contents of the specification and must be determined based on the scope of the claims.
Claims
1. A method for interacting between an access control device and a cloud server in an off-network state, characterized in that: The method is applied to a door access control device, and the method comprises: When it is determined that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server, in response to the door opening verification action of the access control device, obtaining the target mobile terminal; Requesting to establish a Bluetooth communication connection with the target mobile terminal, and if the Bluetooth communication connection with the target mobile terminal is successfully established, obtaining the moving speed of the target mobile terminal within a preset time period before performing a door opening verification action; According to the moving speed of the target mobile terminal, predict the Bluetooth communication duration between the target mobile terminal and the access control device, and predict the upload speed of data uploaded through the Bluetooth communication connection between the target mobile terminal and the access control device; According to the Bluetooth communication duration and the upload speed, the target data to be uploaded is intercepted from the data to be reported, and a head identifier and a tail identifier are added to the target data to be uploaded to obtain the target data to be uploaded, wherein the data size of the intercepted target data to be uploaded enables the access control device to transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the Bluetooth connection with the access control device, the head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded; A cyclic redundancy check code is added to the target data to be uploaded after adding the header identifier and the tail identifier, and the target data to be uploaded after adding the cyclic redundancy check code is transmitted to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal uploads the target data to be uploaded after adding the cyclic redundancy check code to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded carrying an end identifier, the cloud server reorganizes the target data to be uploaded received multiple times according to the header identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
2. The method according to claim 1, characterized in that: The step of acquiring the target mobile terminal in response to the door opening verification action of the access control device comprises: In response to a door opening verification action in which a user records a face image through an image acquisition device on the access control device, the recorded face image is compared with a verification face image pre-stored in a memory of the access control device; If the comparison result indicates that the user is a legal person entering or leaving, obtaining Bluetooth information of the mobile terminal used by the user to upload the verification face image; According to the Bluetooth information of the mobile terminal, searching whether there is a mobile terminal that has uploaded the verification face image within the Bluetooth search range of the access control device; When the mobile terminal that uploaded the verification face image exists within the Bluetooth search range, the mobile terminal is used as the target mobile terminal.
3. The method according to claim 2, characterized in that The step of acquiring the target mobile terminal in response to the door opening verification action of the access control device comprises: In response to a user using a mobile terminal to request a door opening verification action of the access control device through a near field communication (NFC) method, determining whether the mobile terminal is a legitimate mobile terminal according to NFC information of the mobile terminal; In the case that the mobile terminal is a legitimate mobile terminal, the mobile terminal is used as the target mobile terminal.
4. The method according to claim 1, characterized in that: The step of intercepting target data to be uploaded from the data to be reported according to the Bluetooth communication duration and the upload speed, and adding a head identifier and a tail identifier to the target data to be uploaded to obtain the target data to be uploaded includes: According to the tail identifier of the last target data to be uploaded, the starting data of the data to be intercepted this time is determined from the data to be reported; Determine the size of the data to be transmitted this time according to the Bluetooth communication duration and the upload speed; Starting from the starting data, intercepting the target data to be uploaded of the size of the data to be transmitted this time from the data to be reported; Generate a head identifier of the target data to be uploaded this time according to the tail identifier of the previous target data to be uploaded, and generate a tail identifier of the target data to be uploaded this time according to a preset identifier generation rule; Adding a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be packaged; The target data to be uploaded is generated by performing packaging processing according to the interception times of the data to be reported and the target uploaded data to be packaged, wherein the interception times refers to the number of times the data to be reported is intercepted from the beginning to the current interception.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Receive cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection, the cloud server instruction data is obtained after the cloud server sub-packets the issued instruction data, the cloud server instruction data carries a head identifier and a tail identifier, and the data size of the cloud server instruction data is less than or equal to the data size of the target data to be uploaded transmitted by the access control device to the corresponding target mobile terminal; Decrypting the cloud server instruction data transmitted by any of the target mobile terminals via the Bluetooth connection according to the preset encryption key to obtain the cloud server instruction data to be reassembled; In the case where the received cloud server instruction data carries an end identifier, multiple cloud server instruction data to be reassembled are reassembled according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain target cloud server instruction data, and the target cloud server instruction data is used to patch or upgrade the software of the access control device.
6. The method according to claim 5, characterized in that In the case where the received cloud server instruction data carries an end identifier, the step of reorganizing the plurality of cloud server instruction data to be reorganized according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain the target cloud server instruction data includes: In the case where the received cloud server instruction data carries an end identifier, the plurality of cloud server instruction data to be reassembled are reassembled according to the head identifier and the tail identifier carried by each cloud server instruction data to obtain the cloud server instruction data to be verified; Calculate the MD5 value of the cloud server instruction data to be verified, and compare the MD5 value with the standard MD5 value carried in the cloud server instruction data carrying the end mark; When the MD5 value of the cloud server instruction data to be verified is consistent with the standard MD5 value, the cloud server instruction data to be verified is used as the target cloud server instruction data; When the MD5 value of the cloud server instruction data to be verified is inconsistent with the standard MD5 value, a data retransmission request is generated, and in response to the door opening verification action of the access control device, the data retransmission request is transmitted as the data to be reported.
7. The method according to claim 5, characterized in that The step of receiving cloud server instruction data transmitted by any target mobile terminal via Bluetooth connection includes: When any of the target mobile terminals enters the Bluetooth search range of the access control device, re-establishing a Bluetooth communication connection with the target mobile terminal; In the case where the Bluetooth communication connection with the target mobile terminal is successfully re-established, in response to the target mobile terminal's door opening verification action for the access control device, a cloud server instruction data transmission request is sent to the target mobile terminal via the Bluetooth communication connection; Receive the cloud server instruction data transmitted by the target mobile terminal via the Bluetooth connection in response to the cloud server instruction data transmission request.
8. The method according to any one of claims 1 to 4, characterized in that The step of adding a cyclic redundancy check code to the target data to be uploaded after adding the header identifier and the tail identifier, and transmitting the target data to be uploaded after adding the cyclic redundancy check code to the target mobile terminal through the Bluetooth communication connection includes: The target data to be uploaded after adding the cyclic redundancy check code is encrypted once using the preset encryption key; The target data to be uploaded that has been encrypted once is transmitted to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal performs a second encryption on the received target data to be uploaded that has been encrypted once according to the user identity and the mobile terminal token, and uploads the second encrypted target data to be uploaded to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded that carries an end identifier, the cloud server reorganizes the second encrypted target data to be uploaded that have been received multiple times according to the head identifier and the tail identifier, and performs a redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
9. A method for interacting between an access control device and a cloud server in an off-network state, characterized in that: The method is applied to a cloud server, and the method comprises: Receive target data to be uploaded after adding a cyclic redundancy check code uploaded by any target mobile terminal, the target data to be uploaded is transmitted to the target mobile terminal through Bluetooth communication when the access control device determines that the access control device and the cloud server are disconnected from the network and the access control device has data to be reported to the cloud server, and the target mobile terminal uploads it to the cloud server through the mobile network, wherein the target data to be uploaded is obtained by the target mobile terminal in response to the door opening verification action of the access control device when the target mobile terminal determines that the access control device and the cloud server are disconnected from the network and the access control device has data to be reported to the cloud server. A target mobile terminal is obtained, a request is made to establish a Bluetooth communication connection with the target mobile terminal, and when the Bluetooth communication connection is successfully established with the target mobile terminal, a moving speed of the target mobile terminal within a preset time period before performing a door opening verification action is obtained, and according to the moving speed of the target mobile terminal, a Bluetooth communication time period between the target mobile terminal and the access control device is predicted, as well as an upload speed of data uploaded through the Bluetooth communication connection between the target mobile terminal and the access control device is predicted, and according to the Bluetooth communication time period and the upload speed, target data to be uploaded is intercepted from the data to be reported, and a header identifier and a tail identifier and a cyclic redundancy check code are added to the target data to be uploaded to obtain the data; The data size of each target data to be uploaded is intercepted so that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device; In the case where any of the target data to be uploaded is received and carries an end identifier, the target data to be uploaded are reorganized according to the head identifier and the tail identifier of the target data to be uploaded, the head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded; The reorganized target data to be uploaded is subjected to a redundancy check according to the cyclic redundancy check code to obtain complete data to be reported.
10. A device for interacting between a door access control device and a cloud server in an off-network state, characterized in that: The device is applied to access control equipment, and the device comprises: an acquisition module configured to acquire a target mobile terminal in response to a door opening verification action of the access control device when it is determined that the access control device is disconnected from the cloud server and the access control device has data to be reported to the cloud server; a request module configured to request to establish a Bluetooth communication connection with the target mobile terminal, and if the Bluetooth communication connection with the target mobile terminal is successfully established, obtain a moving speed of the target mobile terminal within a preset time period before performing a door opening verification action; A prediction module, configured to predict the Bluetooth communication duration between the target mobile terminal and the access control device according to the moving speed of the target mobile terminal, and predict the upload speed of data uploaded through the Bluetooth communication connection between the target mobile terminal and the access control device; The interception module is configured to intercept the target data to be uploaded from the data to be reported according to the Bluetooth communication duration and the upload speed, and add a header identifier and a tail identifier to the target data to be uploaded to obtain the target data to be uploaded, wherein the data size of the intercepted target data to be uploaded enables the access control device to transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the Bluetooth connection with the access control device, the header identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the header identifier of the next target data to be uploaded; The transmission module is configured to add a cyclic redundancy check code to the target data to be uploaded after adding a header identifier and a tail identifier, and transmit the target data to be uploaded after adding the cyclic redundancy check code to the target mobile terminal through the Bluetooth communication connection, so that the target mobile terminal uploads the target data to be uploaded after adding the cyclic redundancy check code to the cloud server through the mobile network. When the cloud server receives any of the target data to be uploaded carrying an end identifier, the cloud server reorganizes the target data to be uploaded received multiple times according to the header identifier and the tail identifier, and performs redundancy check on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
11. A device for interacting between an access control device and a cloud server in an off-network state, characterized in that: The device is applied to a cloud server, and the device includes: A receiving module is configured to receive target data to be uploaded after adding a cyclic redundancy check code uploaded by any target mobile terminal, wherein the target data to be uploaded is transmitted to the target mobile terminal through Bluetooth communication when the access control device determines that the access control device and the cloud server are disconnected from the network and the access control device has data to be reported to the cloud server, and enables the target mobile terminal to upload the data to the cloud server through the mobile network, wherein the target data to be uploaded is received by the target mobile terminal in response to the door opening verification of the access control device when the access control device determines that the access control device and the cloud server are disconnected from the network and the access control device has data to be reported to the cloud server. action, obtaining a target mobile terminal, requesting to establish a Bluetooth communication connection with the target mobile terminal, and if the Bluetooth communication connection with the target mobile terminal is successfully established, obtaining the moving speed of the target mobile terminal within a preset time period before performing a door opening verification action, predicting the Bluetooth communication time period between the target mobile terminal and the access control device according to the moving speed of the target mobile terminal, and predicting the upload speed of data uploaded through the Bluetooth communication connection between the target mobile terminal and the access control device, intercepting the target data to be uploaded from the data to be reported according to the Bluetooth communication time period and the upload speed, and adding a head identifier and a tail identifier and a cyclic redundancy check code to the target data to be uploaded; The data size of each target data to be uploaded is intercepted so that the access control device can transmit the target data to be uploaded to the target mobile terminal via Bluetooth before the target mobile terminal disconnects the current Bluetooth connection with the access control device; a reorganization module configured to reorganize each of the target data to be uploaded according to a head identifier and a tail identifier of the target data to be uploaded when receiving any of the target data to be uploaded that carries an end identifier, wherein the head identifier is used to match the tail identifier of the previous target data to be uploaded, and the tail identifier is used to match the head identifier of the next target data to be uploaded; The verification module is configured to perform redundancy verification on the reorganized target data to be uploaded according to the cyclic redundancy check code to obtain complete data to be reported.
12. A door access control device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.
13. A cloud server, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to claim 9.
Citation Information
Patent Citations
Method for Bluetooth automatic unlocking verification and automatic cloud customer synchronization
CN106878471A
Mobile terminal network communication substitution system and method
CN114390495A
Intelligent access control method and device, mobile terminal and storage medium
CN115359590A
Method for smart device to access network, mobile terminal, cloud server, device, and system
WO2018127200A1
Communication system, method and device for miniature intelligent sensor
WO2022001674A1
