Central control equipment binding method and device, equipment and storage medium

Through the blocking lock mechanism of decrypted QR code information verification and message queue telemetry transmission protocol, the simple, safe and efficient binding of central control equipment is achieved, the problems of complex and security risks of traditional binding methods are solved, and the device binding is improved efficiency and accuracy.

CN119094546APending Publication Date: 2024-12-06HUNAN NEW CLOUDNET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411076318.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The binding method of traditional central control equipment is complex and has security risks. Especially when the expiration time caused by network reasons fails to process MQTT binding messages in time, the server cannot perform binding operations.

Method used

By obtaining the QR code information generated by the mobile application, decryption verification is performed, the binding request is sent and the blocking lock operation is performed using the message queue telemetry transmission protocol, the target lock is generated to realize the binding initialization of the central control device, and upon receiving the successful command The lock is released for final binding to ensure the safety and accuracy of the device.

Benefits of technology

It realizes the simplicity, security and efficient binding of central control equipment. Through the uniqueness of QR code and the low latency and high reliability of message queue telemetry transmission protocol, the efficiency and accuracy of device binding are improved, while isolating the external The malicious request ensures the security of device binding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094546A_ABST
    Figure CN119094546A_ABST
Patent Text Reader

Abstract

The invention discloses a central control equipment binding method and device, equipment and a storage medium, is applied to a server side, and relates to the technical field of the Internet of Things, and the method comprises the steps: obtaining two-dimensional code information obtained after a mobile application side scans and analyzes a two-dimensional code picture, decrypting the two-dimensional code information, and verifying an equipment identification code according to the decrypted information; after the verification is passed, a binding request is sent to the central control equipment based on an equipment identification code and a message queue telemetering transmission protocol, lock blocking operation is carried out, a first target lock is generated, so that the central control equipment carries out binding initialization operation, and indication information that the central control equipment can be bound and a success instruction after the binding initialization operation is completed are sent to the server side; and releasing the first target lock according to the indication information, carrying out lock blocking operation again, generating a second target lock, releasing the second target lock after receiving a success instruction, binding the central control equipment with the server side, and sending display information of successful binding. According to the invention, simple and safe equipment binding is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a central control device binding method, device, equipment and storage medium. Background Art

[0002] With the rapid development of Internet of Things technology, central control devices have been widely used in life and other fields. However, the traditional central control device binding method is often complicated to operate and has security risks. In the current technology, after the server receives the code scanning request from the mobile APP (application, mobile software), it will request the central control device through MQTT (Message Queuing TelemetryTransport, message queue telemetry transmission). The binding operation can only be performed after the central control device responds, which greatly improves the security performance. However, a synchronous blocking lock is generally set, and an expiration time needs to be set. In the case of network reasons, the expiration time has passed but the MQTT binding message is received. At this time, the server will not perform the binding operation. Therefore, how to develop a simple and efficient central control device binding method is an urgent problem to be solved. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a central control device binding method, apparatus, device and storage medium, which can realize the binding of the central control device simply, safely and efficiently. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a central control device binding method, which is applied to a server, comprising:

[0005] Obtain the QR code information obtained by scanning and parsing the QR code image generated by the central control device by the mobile application, decrypt the QR code information, and verify the device identification code in the QR code information according to the corresponding decrypted information;

[0006] After the verification is passed, a binding request is sent to the central control device based on the device identification code and the message queue telemetry transmission protocol, and a blocking lock operation is performed to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends to the server an indication that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed;

[0007] Release the first target lock according to the indication information, perform the blocking lock operation again, generate a corresponding second target lock, release the second target lock after receiving the success instruction, bind the central control device to the server, and send a display message of successful binding to the mobile application.

[0008] Optionally, before obtaining the QR code information obtained by the mobile application end scanning and parsing the QR code image generated by the central control device, the method further includes:

[0009] The QR code image including the device identification code and the binding request is generated by the central control device, and the QR code image is displayed on the device screen so that the user can scan and parse the QR code image through the scanning function of the mobile application.

[0010] Optionally, after verifying the device identification code in the QR code information according to the corresponding decrypted information, the method further includes:

[0011] If the device identification code in the two-dimensional code information fails to be verified, information indicating that the device identification code is incorrect is directly returned to the mobile application end.

[0012] Optionally, before sending a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed, the method further includes:

[0013] Verify whether the central control device is bound for the first time;

[0014] If the central control device is bound for the first time, executing the step of sending a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed;

[0015] If the central control device is not bound for the first time, a prompt indicating that the binding failed is directly returned to the mobile application end.

[0016] Optionally, performing the blocking lock operation to generate a corresponding first target lock includes:

[0017] The blocking lock operation is performed by implementing the CompletableFuture.supplyAsync() method and the redisson.trylock() method to generate a corresponding first target lock;

[0018] Accordingly, the blocking lock operation is performed again to generate a corresponding second target lock, including:

[0019] The blocking lock operation is performed again by using the redisson.trylock() method to generate a corresponding second target lock.

[0020] Optionally, the method further includes:

[0021] If the indication information sent by the central control device is not received within the preset timeout period, the first target lock is directly released, and a prompt indicating that the binding failed is returned to the mobile application end;

[0022] If the success instruction sent by the central control device is not received within the preset expiration time, the second target lock is directly released, and a prompt of binding failure is returned to the mobile application end.

[0023] Optionally, sending a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed to the server includes:

[0024] After the binding initialization operation is completed, the central control device sends a successful instruction of initialization completion to the message queue telemetry transmission protocol, so that the message queue telemetry transmission protocol forwards the successful instruction to the server.

[0025] In a second aspect, the present application discloses a central control device binding device, which is applied to a server, including:

[0026] The device identification code verification module is used to obtain the two-dimensional code information obtained after the mobile application terminal scans and analyzes the two-dimensional code image generated by the central control device, decrypt the two-dimensional code information, and verify the device identification code in the two-dimensional code information according to the corresponding decrypted information;

[0027] An information and instruction sending module, used to send a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after verification, and perform a blocking lock operation to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends to the server an indication that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed;

[0028] A binding module is used to release the first target lock according to the indication information, perform the blocking lock operation again, generate a corresponding second target lock, release the second target lock after receiving the success instruction, bind the central control device with the server, and send a display message of successful binding to the mobile application end.

[0029] In a third aspect, the present application discloses an electronic device, including:

[0030] Memory, used to store computer programs;

[0031] A processor is used to execute the computer program to implement the aforementioned central control device binding method.

[0032] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which implements the aforementioned central control device binding method when executed by a processor.

[0033] When binding a central control device, the present application first obtains the QR code information obtained after the mobile application side scans and analyzes the QR code image generated by the central control device, decrypts the QR code information, and verifies the device identification code in the QR code information according to the corresponding decrypted information; then after the verification is passed, a binding request is sent to the central control device based on the device identification code and the message queue telemetry transmission protocol, and a blocking lock operation is performed to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends to the server an indication that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed; finally, the first target lock is released according to the indication information, the blocking lock operation is performed again, a corresponding second target lock is generated, the second target lock is released after receiving the success instruction, the central control device is bound to the server, and a display message of successful binding is sent to the mobile application side. It can be seen that in this application, users only need to scan the QR code through the mobile application to complete the device binding, without having to enter a lengthy device identification code or go through a cumbersome pairing process, and the operation is simple and convenient; at the same time, the low latency and high reliability characteristics of the message queue telemetry transmission protocol are utilized to achieve rapid transmission of device information and improve the efficiency of device binding. In addition, the device identification code in the QR code is unique, ensuring the accuracy of device binding. Through the secondary double verification mechanism of the server-side blocking lock, other external malicious requests are isolated to ensure the security of device binding. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0035] Figure 1 A flow chart of a central control device binding method disclosed in this application;

[0036] Figure 2 A flowchart of a specific central control device binding method disclosed in this application;

[0037] Figure 3 This is a schematic diagram of the structure of a central control device binding device disclosed in this application;

[0038] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.

[0040] In the current technology, after the server receives the code scanning request from the mobile APP, it will request the central control device through MQTT. The binding operation can only be performed after the central control device responds, which greatly improves the security performance. However, a synchronous blocking lock is generally set, and an expiration time needs to be set. In the case of network reasons, the expiration time has passed but the MQTT binding message is received. At this time, the server will not perform the binding operation. In order to solve the above technical problems, the present application discloses a central control device binding method, device, equipment and storage medium, which can realize the binding of the central control device simply, safely and efficiently.

[0041] See also Figure 1 As shown, an embodiment of the present invention discloses a central control device binding method, which is applied to a server, and includes:

[0042] Step S11, obtaining the QR code information obtained by scanning and parsing the QR code image generated by the central control device by the mobile application, decrypting the QR code information, and verifying the device identification code in the QR code information according to the corresponding decrypted information.

[0043] In this embodiment, the central control device generates a QR code image containing a device identification code and a binding request, and displays the QR code image on the device screen, so that the user can open the APP, start the code scanning function, scan the QR code on the central control device, and obtain the scanned QR code information. The server decrypts the QR code information and verifies the legitimacy of the device code according to the corresponding decryption rules based on the decrypted information. If the device identification code in the QR code information fails to pass the verification, it proves that the current device code is illegal, and directly returns the device identification code error information to the mobile application end. In this way, the device identification code in the QR code is unique, which ensures the accuracy of device binding.

[0044] Step S12: after verification, a binding request is sent to the central control device based on the device identification code and the message queue telemetry transmission protocol, and a blocking lock operation is performed to generate a corresponding first target lock, so that the central control device can perform a binding initialization operation after obtaining the binding request, and send an indication to the server that it can be bound, as well as a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed.

[0045] In this embodiment, if the device identification code in the QR code information is verified, the central control device to be bound is determined by the device identification code, and then the binding request is asynchronously sent to the bound central control device through the message queue telemetry transmission protocol. And before sending the binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed, the server also needs to verify whether the central control device is bound for the first time; if the central control device is bound for the first time, the step of sending the binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed is executed; if the central control device is not bound for the first time, a prompt indicating that the binding failed is directly returned to the mobile application end. It should be pointed out that while sending the binding request, the server performs the blocking lock operation by implementing the CompletableFuture.supplyAsync() method and the redisson.trylock() method to generate the corresponding first target lock, that is, the server performs code lock blocking by implementing the CompletableFuture.supplyAsync() method and the redisson.trylock() method, and sets a timeout. The server releases the first target lock only when it receives the indication information sent by the central control device that it can be bound within the preset timeout. If the indication information sent by the central control device is not received within the preset timeout, the first target lock is directly released, and a prompt indicating that the binding failed is returned to the mobile application.

[0046] After the central control device receives the binding instruction from the server through MQTT, it first sends the indication information that it can be bound to the server, so that the server can perform subsequent operations according to the indication information. Then the corresponding binding initialization operation is performed, and the instruction is sent back to the server through MQTT to tell the server that the initialization is successful. That is, after the binding initialization operation is completed, the central control device sends a successful instruction of initialization completion to the message queue telemetry transmission protocol, so that the message queue telemetry transmission protocol forwards the successful instruction to the server. Here, the low latency and high reliability characteristics of the MQTT protocol are utilized to achieve rapid transmission of device information and improve the efficiency of device binding.

[0047] Step S13, release the first target lock according to the indication information, perform the blocking lock operation again, generate a corresponding second target lock, release the second target lock after receiving the success instruction, bind the central control device to the server, and send a display message of successful binding to the mobile application end.

[0048] In this embodiment, the server first receives the indication information sent by the central control device that it can be bound, and uses the redisson.trylock() method to perform the blocking lock operation again to generate a corresponding second target lock for accepting the final binding. After that, the server receives the MQTT initialization success notification sent by the central control device, releases the generated redis.trylock lock, that is, the second target lock, and performs the real binding operation synchronously after releasing the lock. After the binding is successful, it returns a success to the mobile APP to show that the binding is successful. It should be noted here that if the success instruction sent by the central control device is not received within the preset expiration time, the second target lock is directly released, and a prompt of binding failure is returned to the mobile application. In this way, through the authentication of releasing the lock twice, that is, the secondary double verification mechanism of the server, other external malicious requests are isolated to ensure the security of device binding.

[0049] To summarize, when binding a central control device, the present application first obtains the QR code information obtained after the mobile application side scans and analyzes the QR code image generated by the central control device, decrypts the QR code information, and verifies the device identification code in the QR code information according to the corresponding decrypted information; then after the verification is passed, a binding request is sent to the central control device based on the device identification code and the message queue telemetry transmission protocol, and a blocking lock operation is performed to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends an indication information that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed to the server; finally, the first target lock is released according to the indication information, the blocking lock operation is performed again, the corresponding second target lock is generated, the second target lock is released after receiving the success instruction, the central control device is bound to the server, and a display information of successful binding is sent to the mobile application side. It can be seen that in this application, users only need to scan the QR code through the mobile application to complete the device binding, without having to enter a lengthy device identification code or go through a cumbersome pairing process, and the operation is simple and convenient; at the same time, the low latency and high reliability characteristics of the message queue telemetry transmission protocol are utilized to achieve rapid transmission of device information and improve the efficiency of device binding. In addition, the device identification code in the QR code is unique, ensuring the accuracy of device binding. Through the secondary double verification mechanism of the server-side blocking lock, other external malicious requests are isolated to ensure the security of device binding.

[0050] Based on the above embodiment, the present application realizes that device binding can be completed by scanning a QR code through a mobile application, without having to enter a lengthy device identification code or perform a cumbersome pairing process. Next, the specific central control device binding process will be described.

[0051] like Figure 2 As shown, the central control device of this application first generates a QR code containing the unique device identification code and binding request information, and displays it on the device screen. The user opens the APP, starts the code scanning function, and scans the QR code on the central control device. Then the mobile application parses the scanned QR code information, and the server verifies the legitimacy of the device code through the corresponding decryption rules, and verifies whether the device has been bound. If it has been bound, it directly returns to prompt that the binding failed. After the server verifies, the MQTT message is asynchronously sent to the bound central control device through the device code, and the server implements the CompletableFuture.supplyAsync() method and the redisson.trylock() method to perform code lock blocking. The lock will be released only after the central control device sends information that it can be bound, and a timeout is set. If the set expiration time is exceeded, the lock will be released, telling the mobile terminal that the binding failed, and the redisson.trylock() method is used again for secondary code lock blocking, waiting for the central control terminal to send a successful binding designation, and performing the final binding operation on the server. A timeout is also set. If the set expiration time has not been exceeded and the initialization success instruction transmitted by the central control device has not been received, the lock will be released, prompting the mobile terminal that the binding failed.

[0052] The central control device receives the binding instruction from the server through MQTT, performs the corresponding binding initialization operation, and returns the instruction to the server through MQTT to inform the server that the initialization is successful. The server receives the MQTT binding success notification sent by the central control end, releases the generated redis.trylock lock, and performs the actual binding operation synchronously after releasing the lock. After the binding is successful, it returns success to the mobile APP to show that the binding is successful.

[0053] It can be seen that this application can complete device binding by scanning the QR code through the mobile application. There is no need to enter a lengthy device identification code or go through a cumbersome pairing process, and the operation is simple. At the same time, the low latency and high reliability characteristics of the message queue telemetry transmission protocol are utilized to achieve rapid transmission of device information and improve the efficiency of device binding. And the uniqueness of the device identification code in the QR code is utilized to ensure the accuracy of device binding. Through the secondary double verification mechanism of the server-side blocking lock, other external malicious requests are isolated to ensure the security of device binding.

[0054] See also Figure 3 As shown, an embodiment of the present invention discloses a central control device binding device, which is applied to a server, and includes:

[0055] The device identification code verification module 11 is used to obtain the two-dimensional code information obtained after the mobile application terminal scans and analyzes the two-dimensional code image generated by the central control device, decrypt the two-dimensional code information, and verify the device identification code in the two-dimensional code information according to the corresponding decrypted information;

[0056] The information and instruction sending module 12 is used to send a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed, and perform a blocking lock operation to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends to the server an indication that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed;

[0057] The binding module 13 is used to release the first target lock according to the indication information, perform the blocking lock operation again, generate a corresponding second target lock, release the second target lock after receiving the success instruction, bind the central control device with the server, and send a display message of successful binding to the mobile application end.

[0058] To summarize, when binding a central control device, the present application first obtains the QR code information obtained after the mobile application side scans and analyzes the QR code image generated by the central control device, decrypts the QR code information, and verifies the device identification code in the QR code information according to the corresponding decrypted information; then after the verification is passed, a binding request is sent to the central control device based on the device identification code and the message queue telemetry transmission protocol, and a blocking lock operation is performed to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends an indication information that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed to the server; finally, the first target lock is released according to the indication information, the blocking lock operation is performed again, the corresponding second target lock is generated, the second target lock is released after receiving the success instruction, the central control device is bound to the server, and a display information of successful binding is sent to the mobile application side. It can be seen that in this application, users only need to scan the QR code through the mobile application to complete the device binding, without having to enter a lengthy device identification code or go through a tedious pairing process, and the operation is simple and convenient; at the same time, the low latency and high reliability characteristics of the message queue telemetry transmission protocol are utilized to achieve rapid transmission of device information and improve the efficiency of device binding. And the uniqueness of the device identification code in the QR code is utilized to ensure the accuracy of device binding. Through the secondary double verification mechanism of the server-side blocking lock, other external malicious requests are isolated to ensure the security of device binding.

[0059] In some specific embodiments, the device may further include:

[0060] The QR code scanning module is used to generate the QR code image containing the device identification code and the binding request through the central control device, and display the QR code image through the device screen so that the user can scan and analyze the QR code image through the scanning function of the mobile application end.

[0061] In some specific embodiments, the device may further include:

[0062] The error information returning module is used to directly return the device identification code error information to the mobile application end if the device identification code in the two-dimensional code information fails to be verified.

[0063] In some specific embodiments, the device may further include:

[0064] A verification module, used to verify whether the central control device is bound for the first time;

[0065] A binding request sending step execution module, used for executing the step of sending a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after verification if the central control device is bound for the first time;

[0066] The first binding failure prompt module is used to directly return a binding failure prompt to the mobile application end if the central control device is not bound for the first time.

[0067] In some specific embodiments, the information and instruction sending module 12 may specifically include:

[0068] A first target lock generating unit, configured to perform the blocking lock operation by implementing the CompletableFuture.supplyAsync() method and the redisson.trylock() method, and generate a corresponding first target lock;

[0069] Accordingly, the binding module 13 may specifically include:

[0070] The second target lock generating unit is used to generate a corresponding second target lock by performing the blocking lock operation again using the redisson.trylock() method.

[0071] In some specific embodiments, the device may further include:

[0072] A second binding failure prompt module, configured to directly release the first target lock and return a binding failure prompt to the mobile application end if the indication information sent by the central control device is not received within a preset timeout period;

[0073] The third binding failure prompt module is used to directly release the second target lock and return a binding failure prompt to the mobile application end if the success instruction sent by the central control device is not received within a preset expiration time.

[0074] In some specific embodiments, the information and instruction sending module 12 may specifically include:

[0075] A success instruction forwarding unit is used to send a success instruction of initialization completion to the message queue telemetry transmission protocol through the central control device after the binding initialization operation is completed, so that the message queue telemetry transmission protocol forwards the success instruction to the server.

[0076] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be considered as any limitation on the scope of use of the present application.

[0077] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the central control device binding method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0078] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0079] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0080] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the central control device binding method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0081] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the central control device binding method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.

[0082] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0083] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0084] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0085] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0086] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A central control device binding method, characterized in that: Applied to the server, including: Obtain the QR code information obtained by scanning and parsing the QR code image generated by the central control device by the mobile application, decrypt the QR code information, and verify the device identification code in the QR code information according to the corresponding decrypted information; After the verification is passed, a binding request is sent to the central control device based on the device identification code and the message queue telemetry transmission protocol, and a blocking lock operation is performed to generate a corresponding first target lock, so that the central control device performs a binding initialization operation after obtaining the binding request, and sends to the server an indication that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed; Release the first target lock according to the indication information, perform the blocking lock operation again, generate a corresponding second target lock, release the second target lock after receiving the success instruction, bind the central control device to the server, and send a display message of successful binding to the mobile application.

2. The central control device binding method according to claim 1, characterized in that: Before obtaining the two-dimensional code information obtained by the mobile application end scanning and parsing the two-dimensional code image generated by the central control device, the method further includes: The QR code image including the device identification code and the binding request is generated by the central control device, and the QR code image is displayed on the device screen so that the user can scan and parse the QR code image through the scanning function of the mobile application.

3. The central control device binding method according to claim 1, characterized in that: After verifying the device identification code in the two-dimensional code information according to the corresponding decrypted information, the method further includes: If the device identification code in the two-dimensional code information fails to be verified, information indicating that the device identification code is incorrect is directly returned to the mobile application end.

4. The central control device binding method according to claim 1, characterized in that: Before sending a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed, the method further includes: Verify whether the central control device is bound for the first time; If the central control device is bound for the first time, executing the step of sending a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after the verification is passed; If the central control device is not bound for the first time, a prompt indicating that the binding failed is directly returned to the mobile application end.

5. The central control device binding method according to claim 1, characterized in that: The performing of the blocking lock operation to generate a corresponding first target lock includes: The blocking lock operation is performed by implementing the CompletableFuture.supplyAsync() method and the redisson.trylock() method to generate a corresponding first target lock; Accordingly, the blocking lock operation is performed again to generate a corresponding second target lock, including: The blocking lock operation is performed again by using the redisson.trylock() method to generate a corresponding second target lock.

6. The central control device binding method according to claim 1, characterized in that: Also includes: If the indication information sent by the central control device is not received within the preset timeout period, the first target lock is directly released, and a prompt indicating that the binding failed is returned to the mobile application end; If the success instruction sent by the central control device is not received within the preset expiration time, the second target lock is directly released, and a prompt of binding failure is returned to the mobile application end.

7. The central control device binding method according to any one of claims 1 to 6, characterized in that: Sending a successful instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed to the server includes: After the binding initialization operation is completed, the central control device sends a successful instruction of initialization completion to the message queue telemetry transmission protocol, so that the message queue telemetry transmission protocol forwards the successful instruction to the server.

8. A central control device binding device, characterized in that: Applied to the server, including: The device identification code verification module is used to obtain the two-dimensional code information obtained after the mobile application terminal scans and analyzes the two-dimensional code image generated by the central control device, decrypt the two-dimensional code information, and verify the device identification code in the two-dimensional code information according to the corresponding decrypted information; An information and instruction sending module, used to send a binding request to the central control device based on the device identification code and the message queue telemetry transmission protocol after verification, and perform a blocking lock operation to generate a corresponding first target lock, so that the central control device performs an initial binding operation after obtaining the binding request, and sends to the server an indication that it can be bound and a success instruction forwarded based on the message queue telemetry transmission protocol after the binding initialization operation is completed; A binding module is used to release the first target lock according to the indication information, perform the blocking lock operation again, generate a corresponding second target lock, release the second target lock after receiving the success instruction, bind the central control device with the server, and send a display message of successful binding to the mobile application end.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, used to execute the computer program to implement the central control device binding method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the central control device binding method as described in any one of claims 1 to 7.