Device access method, device access apparatus, and computer storage medium
By dividing the device access system into an access layer and a business management layer, and storing registration information in both layers, the problem of time wasted due to service upgrades during device access is solved, enabling rapid recovery of device access and smooth business upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2023-01-10
- Publication Date
- 2026-04-24
AI Technical Summary
Existing device access technologies require re-registration during service upgrades due to the complexity and diversity of communication protocols, resulting in wasted time and service delays.
The device access system is divided into an access layer and a business management layer. Registration information is generated and stored to achieve layer-by-layer backup, quickly restore device access, and avoid the re-registration process when upgrading or restarting services.
It enables rapid restoration of device access after upgrades at the access layer or business management layer, reducing waiting time and ensuring smooth upgrades and rapid recovery of services.
Smart Images

Figure CN116319327B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of device management, and in particular to a device access method, a device access device, and a computer storage medium. Background Technology
[0002] With the continuous development of the internet, in order to achieve interconnection between people, things, and devices, a vast network has emerged—the Internet of Things (IoT)—that extends and expands upon the internet, combining various information sensing devices with the network. IoT devices are applied in a wide range of fields, including infrastructure sectors such as industry, agriculture, environment, transportation, logistics, and security. Their application has effectively promoted the intelligent development of these sectors, enabling more rational use and allocation of limited resources, thereby improving industry efficiency and effectiveness.
[0003] In one application scenario, IoT devices need to be connected to a corresponding platform to enable subsequent related services. However, existing device access technologies suffer from complex and diverse access protocols used by communication devices. When upgrading services, already connected devices need to be re-registered, which delays subsequent device control operations and results in a significant waste of time. Summary of the Invention
[0004] The main technical problem addressed by this application is how to enable access devices with different communication protocols to quickly restore services during service upgrades. To this end, this application provides a device access method, a device access apparatus, and a computer storage medium.
[0005] To address the aforementioned technical problems, this application provides a device access method. This method is applied to a device access system, which includes an access layer and a service management layer. The method includes: responding to a device access request from a target device, the access layer sends the target device's access request to the service management layer to register the target device; the service management layer sends the registration result of the target device to the access layer; the access layer generates registration information for the target device based on the registration result and sends the registration information to the service management layer, thus completing the target device's access to the device access system; wherein the registration information is used to restore the target device's access to the device access system after an upgrade of the access layer or the service management layer.
[0006] The registration information includes the target device's serial number, address, interface information, and / or access layer registration process information.
[0007] The device access method further includes: after the access layer upgrade is completed, the access layer sends a service registration request to the business management layer; the business management layer sends the registration information of the target device to the access layer according to the service registration request, so that the access layer can restore the access of the target device in the access layer according to the registration information.
[0008] The device access method further includes, after the access layer restores the target device's access to the access layer based on the registration information, the service management layer sends a device control command to the access layer in response to the device control command; and the access layer sends a device control command to the target device to achieve device control over the target device.
[0009] When the access layer is a TCP protocol access layer, the device access method further includes: after the access layer upgrade is completed, the access layer sends a service registration request to the business management layer; the business management layer sends the registration information of the target device to the access layer according to the service registration request; the access layer determines whether it has received the heartbeat signal of the target device; if so, the access layer restores the access of the target device according to the heartbeat signal and registration information of the target device.
[0010] The device access method further includes, after the business management layer sends the target device's registration information to the access layer based on the service registration request, the access layer determines whether it has received the target device's heartbeat signal and session information, wherein the session information includes the target device's status information; if so, the access layer restores the target device's access based on the target device's heartbeat signal, session information, and registration information.
[0011] The device access method further includes: after the service management layer is upgraded, the access layer sends a service registration request to the service management layer; the access layer sends the registration information to the service management layer so that the service management layer can restore the target device's access to the service management layer based on the registration information.
[0012] The device access method further includes, after the business management layer restores the target device's access to the business management layer based on the registration information, the business management layer sends a device control command to the access layer in response to the device control command; and the access layer sends a device control command to the target device to achieve device control over the target device.
[0013] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a device access device, which includes a processor and a memory. The memory is coupled to the processor and stores program data. The processor is used to execute the program data to implement the device access method as described above.
[0014] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a computer-readable storage medium that stores program data, which, when executed, is used to implement the above-mentioned device access method.
[0015] The beneficial effects of this application are as follows: Unlike existing technologies, the device access method provided in this application is applied to a device access device. In response to a device access request from a target device, the access layer sends the target device's access request to the service management layer to register the target device. The service management layer sends the registration result of the target device to the access layer. The access layer generates registration information for the target device based on the registration result and sends the registration information to the service management layer, completing the target device's access to the device access system. The registration information is used to restore the target device's access to the device access system after an upgrade of the access layer or the service management layer. Compared to conventional device access methods, this application's method of storing the registration information generated during target device registration in both the access layer and the service management layer enables layered backup of the registration information. This allows for rapid restoration of registered devices during service upgrades at the access layer or the service management layer, thus achieving rapid service recovery. This device access method divides the business layer used in traditional device access methods into two layers: an access layer and a business management layer. It also backs up the registration information generated during device registration in layers. When the access layer or the business management layer experiences service upgrades or restarts, it can quickly restore the connected devices based on the stored registration information without waiting for the device heartbeat timeout to re-register the devices. This enables rapid recovery of services and avoids any time wastage during subsequent device control. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] in:
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the device access method provided in this application;
[0019] Figure 2 This is a schematic diagram of the device access system in the device access device provided in this application;
[0020] Figure 3 This is a schematic diagram of the device registration process in the device access method provided in this application;
[0021] Figure 4 This is a flowchart illustrating the second embodiment of the device access method provided in this application;
[0022] Figure 5 This is a schematic diagram of the access layer upgrade process using the UDP protocol in the device access method provided in this application;
[0023] Figure 6 This is a schematic diagram of the access layer upgrade process using the TCP protocol in the device access method provided in this application;
[0024] Figure 7 This is a schematic diagram of the process for upgrading the service management layer in the device access method provided in this application;
[0025] Figure 8 This is a flowchart illustrating the third embodiment of the device access method provided in this application;
[0026] Figure 9 This is a schematic diagram of the structure of the first embodiment of the device access device provided in this application;
[0027] Figure 10 This is a schematic diagram of the structure of the second embodiment of the device access device provided in this application;
[0028] Figure 11 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0030] The device access method described in this application is applied to Internet of Things (IoT) devices. IoT devices are non-standard computing devices that can wirelessly connect to a network and have the ability to transmit data. The Internet of Things extends internet connectivity from standard devices such as desktops, laptops, smartphones, and tablets to any range of traditional or non-internet-enabled physical devices and everyday objects. These devices are embedded with IoT technology and can communicate and interact via the internet. They can also be remotely monitored and controlled. Common IoT devices include smart home devices, industrial sensors, smart cars, smart cameras, manufacturing robots, medical / fitness equipment, etc., and are not limited thereto.
[0031] Device access service is a cloud service that connects, collects / forwards, and remotely controls a massive number of devices through an IoT platform. It enables bidirectional communication between a large number of devices and the cloud, and allows device data to be collected and uploaded to the cloud. It also supports upper-layer applications to call APIs to remotely control devices and provides a rule engine that seamlessly integrates with other cloud services. It can be applied to various IoT scenarios.
[0032] See Figures 1 to 3 , Figure 1 This is a flowchart illustrating the first embodiment of the device access method provided in this application; Figure 2 This is a schematic diagram of the device access system in the device access device provided in this application; Figure 3 This is a schematic diagram of the device registration process in the device access method provided in this application.
[0033] Both the device access system and the device access device in this application embodiment can serve as the execution subject of the device access method provided in this application embodiment. The device access system can be mounted on the device access device and is the core part therein.
[0034] Specifically, the device access system includes an access layer and a service management layer. The service management layer is mainly responsible for setting target tasks, but the implementation of specific targets usually requires the intervention of device management personnel. The access layer can provide device-to-network access for multiple service applications and other network applications.
[0035] Step 11: In response to the device access request of the target device, the access layer sends the device access request of the target device to the business management layer to register the target device in the business management layer.
[0036] Specifically, the target device can be any of the IoT devices mentioned above. The device access device receives the device access request sent by the target device and registers the target device. Device registration refers to the user registering device information in the IoT platform through the console or by calling an interface with device access functionality. After the device information exists in the IoT platform, the actual physical device is then connected, thus enabling the IoT platform and the terminal physical device to connect and communicate.
[0037] Step 12: The business management layer sends the registration results of the target device to the access layer.
[0038] Specifically, after receiving the device access request from the target device sent by the access layer, the business management layer registers the device and returns the registration result to the access layer. The access layer then returns the registration result to the target device to complete the registration process of the target device in the device access device.
[0039] Step 13: The access layer generates registration information for the target device based on the registration results and sends the registration information to the business management layer to complete the access of the target device in the device access system; the registration information is used to restore the access of the target device in the device access system after the access layer or business management layer is upgraded.
[0040] Specifically, after the target device successfully registers, the access layer generates the target device's registration information and sends the registration information to the business management layer. The registration information includes the target device's serial number, address, interface information, and / or access layer registration process information, which can be used to restore the target device's access to the device access system after the access layer or business management layer is upgraded.
[0041] See Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the device access method provided in this application;
[0042] Step 41: After the access layer upgrade is completed, the access layer sends a service registration request to the business management layer.
[0043] Specifically, after the target device completes registration, the device access system will also upgrade the access layer. The access layer can provide access for target devices using different communication protocols separately. For example, a TCP protocol access layer and a UDP protocol access layer can be used to provide access for target devices using corresponding communication protocols.
[0044] Step 42: The business management layer sends the target device's registration information to the access layer based on the service registration request, so that the access layer can restore the target device's access at the access layer based on the registration information.
[0045] After the access layer is upgraded, it can quickly restore the devices already connected in the access layer based on the received registration information. This eliminates the need for device access devices to waste time waiting for the target device's heartbeat signal to time out before re-registering these devices, thus enabling rapid service recovery.
[0046] by Figure 5 For example, Figure 5 This is a schematic diagram of the access layer upgrade process using the UDP protocol in the device access method provided in this application. After the UDP protocol access layer upgrade is completed, a service registration request is sent to the business management layer. After receiving the service registration request from the UDP protocol access layer, the business management layer will send the previous device registration information to the UDP protocol access layer. The UDP protocol access layer quickly restores the devices already connected in the access layer based on the received registration information, so that the device access device does not have to waste time waiting for the target device's heartbeat signal to time out before re-registering these devices. Device control commands can be sent down layer by layer to control the target device without waiting.
[0047] Specifically, service registration involves the access layer reporting information such as the service name, service address, and service instance to the business management layer. When a new target device accesses the system, which involves changes in the service, the access layer will resend the service registration request to the business management layer to update the service information in the business management layer.
[0048] See Figure 6 , Figure 6 This is a schematic diagram of the access layer upgrade process using the TCP protocol in the device access method provided in this application.
[0049] like Figure 6 As shown, when the access layer is a TCP protocol access layer, after the access layer upgrade is completed, the access layer will send a service registration request to the service management layer; the service management layer will send the target device's registration information to the access layer according to the service registration request; the access layer will determine whether it has received the target device's heartbeat signal; if so, the access layer will restore the target device's access according to the target device's heartbeat signal and registration information.
[0050] Optionally, after the business management layer sends the registration information of the target device to the access layer according to the service registration request, the device access method further includes: the access layer determining whether it has received the heartbeat signal and session information of the target device, wherein the session information includes the status information of the target device; if so, the access layer restores the access of the target device according to the heartbeat signal, session information and registration information of the target device.
[0051] Specifically, the heartbeat signal is a small data packet sent by the target device to the access layer to indicate that its connection with the access layer has not been broken. When the target device communicates using the TCP protocol, since TCP is a connection-based protocol, communication requires that both ends of the communication be connected. Therefore, the target device needs to send a heartbeat signal to the access layer to confirm that the device is connected before issuing and implementing subsequent device control commands.
[0052] See Figure 7 and Figure 8 , Figure 7 This is a schematic diagram of the process for upgrading the service management layer in the device access method provided in this application; Figure 8 This is a flowchart illustrating the third embodiment of the device access method provided in this application.
[0053] Step 81: After the business management layer is upgraded, the access layer sends a service registration request to the business management layer.
[0054] After the business management layer is upgraded, it can quickly restore the devices that have been connected in the business management layer based on the registration information. This eliminates the need for device access devices to waste time waiting for the target device's heartbeat signal to time out before re-registering these devices, thus enabling rapid business recovery.
[0055] Step 82: The access layer sends the registration information to the business management layer so that the business management layer can restore the target device's access to the business management layer based on the registration information.
[0056] Specifically, after the access layer restores the target device's access based on the registration information, the device access device will also respond to device control commands. The business management layer sends device control commands to the access layer, and the access layer sends device control commands to the target device to achieve device control. Since the access layer stores the registration information of the connected devices, after the access layer is upgraded or restarted, the connected devices can be quickly restored without waiting for the device heartbeat timeout and re-registering the device. This allows for a rapid response to device control commands, achieving a smooth upgrade and rapid recovery of services.
[0057] like Figure 7 As shown, after the business management layer restores the target device's access to the business management layer based on the registration information, the device access device will also respond to the device control command. The business management layer sends the device control command to the access layer; the access layer sends the device control command to the target device to realize device control of the target device.
[0058] Unlike existing technologies, the device access method provided in this application is applied to a device access device. In response to a device access request from a target device, the access layer sends the target device's access request to the service management layer to register the target device. The service management layer sends the registration result of the target device to the access layer. The access layer generates registration information for the target device based on the registration result and sends the registration information to the service management layer, completing the target device's access to the device access system. The registration information is used to restore the target device's access to the device access system after an upgrade of the access layer or the service management layer. Compared to conventional device access methods, this application's method of storing the registration information generated during target device registration in both the access layer and the service management layer enables layer-by-layer backup of the registration information. This allows for rapid restoration of registered devices during service upgrades at the access layer or the service management layer, thus achieving rapid service recovery. This device access method divides the business layer used in traditional device access methods into two layers: an access layer and a business management layer. It also backs up the registration information generated during device registration in layers. When the access layer or the business management layer experiences service upgrades or restarts, it can quickly restore the connected devices based on the stored registration information without waiting for the device heartbeat timeout to re-register the devices. This enables rapid recovery of services and avoids any time wastage during subsequent device control.
[0059] The method described in the above embodiments can be implemented using a device access device, as described below. Figure 9 Describe it. Figure 9 This is a schematic diagram of the structure of the first embodiment of the device access device provided in this application.
[0060] like Figure 9 As shown, the device access device 90 in this embodiment of the application includes a response module 91, a sending module 92, and an access module 93.
[0061] Among them, the response module 91 is used to respond to the device access request of the target device. The access layer sends the device access request of the target device to the business management layer in order to register the target device in the business management layer.
[0062] Among them, the sending module 92 is used by the business management layer to send the registration result of the target device to the access layer.
[0063] The access module 93 is used by the access layer to generate registration information of the target device based on the registration result, and send the registration information to the business management layer to complete the access of the target device in the device access system.
[0064] The method described in the above embodiments can be implemented using a device access device, as described below. Figure 10 , Figure 10 This is a schematic diagram of the structure of the second embodiment of the device access device provided in this application. The device access device 100 includes a memory 101 and a processor 102. The memory 101 is used to store program data, and the processor 102 is used to execute the program data to implement the following method:
[0065] In response to the target device's device access request, the access layer sends the target device's device access request to the business management layer to register the target device in the business management layer; the business management layer sends the target device's registration result to the access layer; the access layer generates the target device's registration information based on the registration result and sends the registration information to the business management layer to complete the target device's access in the device access system. The registration information is used to restore the target device's access in the device access system after the access layer or business management layer is upgraded.
[0066] See Figure 11 , Figure 11 This is a schematic diagram of an embodiment of a computer-readable storage medium provided in this application. The computer-readable storage medium 110 stores program data 111, which, when executed by a processor, is used to implement the following method:
[0067] In response to the target device's device access request, the access layer sends the target device's device access request to the business management layer to register the target device in the business management layer; the business management layer sends the target device's registration result to the access layer; the access layer generates the target device's registration information based on the registration result and sends the registration information to the business management layer to complete the target device's access in the device access system. The registration information is used to restore the target device's access in the device access system after the access layer or business management layer is upgraded.
[0068] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A device access method, characterized in that, The device access method is applied to a device access system, wherein the device access system includes an access layer and a service management layer; the device access method includes: In response to a device access request from a target device, the access layer sends the device access request to the service management layer to register the target device in the service management layer; The business management layer sends the registration result of the target device to the access layer; The access layer generates registration information for the target device based on the registration result and sends the registration information to the service management layer to complete the access of the target device to the device access system. The registration information is used to restore the access of the target device to the device access system after the access layer or the service management layer is upgraded.
2. The device access method according to claim 1, characterized in that, The registration information includes the target device's serial number, address, interface information, and / or access layer registration process information.
3. The device access method according to claim 1, characterized in that, The device access method further includes: After the access layer upgrade is completed, the access layer sends a service registration request to the service management layer; The service management layer sends the registration information of the target device to the access layer according to the service registration request, so that the access layer can restore the target device's access to the access layer according to the registration information.
4. The device access method according to claim 3, characterized in that, After the access layer restores the target device's access to the access layer based on the registration information, the device access method further includes: In response to a device control command, the service management layer sends the device control command to the access layer; The access layer sends the device control command to the target device to achieve device control over the target device.
5. The device access method according to claim 1, characterized in that, When the access layer is a TCP protocol access layer, the device access method further includes: After the access layer upgrade is completed, the access layer sends a service registration request to the service management layer; The business management layer sends the registration information of the target device to the access layer according to the service registration request; The access layer determines whether it has received a heartbeat signal from the target device; If so, the access layer restores the access of the target device based on the heartbeat signal of the target device and the registration information.
6. The device access method according to claim 5, characterized in that, After the business management layer sends the registration information of the target device to the access layer according to the service registration request, the device access method further includes: The access layer determines whether it has received the heartbeat signal and session information of the target device, wherein the session information includes the status information of the target device; If so, the access layer restores the access of the target device based on the target device's heartbeat signal, the session information, and the registration information.
7. The device access method according to claim 1, characterized in that, The device access method further includes: After the business management layer is upgraded, the access layer sends a service registration request to the business management layer. The access layer sends the registration information to the service management layer, so that the service management layer can restore the target device's access to the service management layer based on the registration information.
8. The device access method according to claim 7, characterized in that, After the business management layer restores the target device's access to the business management layer based on the registration information, the device access method further includes: In response to a device control command, the service management layer sends the device control command to the access layer; The access layer sends the device control command to the target device to achieve device control over the target device.
9. A device access device, characterized in that, The device access device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the device access method as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The computer storage medium is used to store program data, which, when executed by the computer, is used to implement the device access method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
IOT service structure and service combining method
CN103354506A
Household appliance control method and system, control equipment and server
CN110703624A