Registration Method, Device, Storage Medium and Electronic Device of a Device

By obtaining the target address and target port of the target platform to which the target device is to be registered, and using the established target link to register the device, the problem of low registration efficiency of IoT devices is solved, and the effect of improving the efficiency of registered equipment is achieved.

CN115633018BActive Publication Date: 2025-05-27HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211243086.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2025-05-27
Estimated Expiration
2042-10-11

AI Technical Summary

Technical Problem

In the prior art, when an IoT device registers a connection between a simulation platform and an IoT platform, multiple links need to be established, resulting in slow registration of the device and low efficiency.

Method used

By obtaining the target address and target port of the target platform to which the target device is to be registered, determine whether the target link between the simulation platform and the target platform has been established through the target port. If it has been established, register the target device to the target platform through the target link.

Benefits of technology

Register devices with the same address information and port information of multiple other platforms to be connected to the target platform through one target link, improving the efficiency of registering the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633018B_ABST
    Figure CN115633018B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a device registration method, device, storage medium and electronic device, wherein the method comprises: when determining that the target device is to be registered with other platforms, obtaining the target address and target port of the target platform to which the target device is to be registered, wherein the target device is a device that has established a connection with the simulation platform, the other platform is a platform different from the simulation platform, and the other platform includes the target platform; determining whether a target link between the simulation platform and the target platform has been established through the target port; if it has been established, registering at least one target device to the target platform through the target link. Through the present invention, the problem of low efficiency of device registration existing in the related art is solved, and the effect of improving the efficiency of device registration is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of the Internet of Things, and more particularly, to a registration method, device, storage medium, and electronic device for a device. Background Art

[0002] When the Internet of Things platform accesses third-party devices, due to different standards and protocols, generally, an analog gateway or an analog platform needs to be established to make the first-layer access to the third-party devices, and then the second-layer access is made through the analog platform to connect to the Internet of Things platform. The analog platform realizes the conversion of different standards and protocols of the devices and the connection service.

[0003] In the related art, when an Internet of Things device registers and connects between an analog platform and an Internet of Things platform, the analog platform needs to establish a link between each device and the target platform, and based on this link, the Internet of Things platform interacts with the device. Therefore, when there are multiple devices, multiple links need to be established. Therefore, a large amount of time and computing power are required, resulting in a slow speed of registering devices.

[0004] It can be seen from this that there is a problem of low efficiency in registering devices in the related art.

[0005] In view of the above problems existing in the related art, no effective solution has been proposed yet. Summary of the Invention

[0006] The embodiments of the present invention provide a registration method, device, storage medium, and electronic device for a device, so as to at least solve the problem of low efficiency in registering devices existing in the related art.

[0007] According to an embodiment of the present invention, there is provided a registration method for a device, including: when it is determined that a target device is to be registered to another platform, obtaining a target address and a target port of the target platform to which the target device is to be registered, where the target device is a device that has established a connection with an analog platform, and the device information includes address information of another platform to which the device is to be connected and port information of the other platform, the other platform is a platform different from the analog platform, and the other platform includes the target platform; determining whether a target link between the analog platform and the target platform has been established through the target port; and when the link has been established, registering at least one of the target devices to the target platform through the target link.

[0008] According to another embodiment of the present invention, there is provided a registration device for a device, including: a first registration module, which, when determining that a target device is to be registered to another platform, obtains the target address and target port of the target platform to which the target device is to be registered, where the target device is a device that has established a connection with a simulation platform, and the other platform is a platform different from the simulation platform, and the other platform includes the target platform; a determination module for determining whether a target link has been established between the simulation platform and the target platform through the target port; a second registration module for, when the target link has been established, registering at least one of the target devices to the target platform through the target link.

[0009] According to still another embodiment of the present invention, there is also provided a computer-readable storage medium in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0010] According to still another embodiment of the present invention, there is also provided an electronic device including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0011] Through the present invention, when determining that a target device is to be registered to another platform, the target address and target port of the target platform to which the target device is to be registered are obtained, where the target device is a device that has established a connection with a simulation platform, the other platform is a platform different from the simulation platform, and the other platform includes the target platform, and it is determined whether a target link has been established between the simulation platform and the target platform through the target port. When the target link has been established, at least one target device is registered to the target platform through the target link. Since when registering a device to the target platform, when there already exists a target link established between the simulation platform and the target platform with the target address through the target port, the target device is registered to the target platform through the target link, that is, multiple devices with the same address information and port information of other platforms to be connected can be registered to the target platform through one target link. Therefore, the problem of low registration efficiency of devices in the related art can be solved, and the effect of improving the registration efficiency of devices can be achieved. Description of the Drawings

[0012] Figure 1 is a hardware structure block diagram of a mobile terminal of a device registration method according to an embodiment of the present invention;

[0013] Figure 2 is a flowchart of a device registration method according to an embodiment of the present invention;

[0014] Figure 3It is a schematic diagram of the process of registering a target device to a target platform according to an embodiment of the present invention;

[0015] Figure 4 It is a schematic diagram of the process of the target platform sending a control signal to a device according to an embodiment of the present invention;

[0016] Figure 5 It is a schematic diagram of the process of a device sending a control signal to a target platform according to an embodiment of the present invention;

[0017] Figure 6 It is a schematic diagram of the process of unbinding a device according to an embodiment of the present invention;

[0018] Figure 7 It is a schematic diagram of the process of re - establishing a link according to an embodiment of the present invention

[0019] Figure 8 It is a schematic diagram of the process of establishing a binding relationship according to an embodiment of the present invention;

[0020] Figure 9 It is a block diagram of the structure of a registration device of a device according to an embodiment of the present invention. Detailed implementation manners

[0021] In the following, embodiments of the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments.

[0022] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above - mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence.

[0023] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 It is a hardware block diagram of a mobile terminal of a device registration method according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in Figure 1 a processor 102 (the processor 102 may include, but is not limited to, a processing device such as a micro - processor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above - mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in Figure 1 is only schematic, and it does not limit the structure of the above - mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than

[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the device registration method in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.

[0025] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include the wireless network provided by the communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0026] In this embodiment, a device registration method is provided. Figure 2 It is a flowchart of the device registration method according to the embodiments of the present invention, as Figure 2 shown, and this process includes the following steps:

[0027] Step S202, when it is determined that the target device is to be registered to another platform, obtain the target address and target port of the target platform to which the target device is to be registered, where the target device is a device that has established a connection with the simulation platform, the other platform is a platform different from the simulation platform, and the other platform includes the target platform;

[0028] Step S204, determine whether a target link has been established between the simulation platform and the target platform through the target port;

[0029] Step S206, when the connection has been established, register at least one of the target devices to the target platform through the target link.

[0030] In the above embodiments, the target device may be an Internet of Things (IoT) device, the target platform and other platforms may be IoT platforms, and other platforms may include multiple target platforms. Since the protocols followed by the target device and other platforms are different, the simulation platform can be used as an intermediate platform to register the target device into other platforms.

[0031] In the above embodiments, when the simulation platform obtains the target address and target port of the target platform to which the target device is to be registered, it can be obtained through device information. That is, when the target device establishes a connection with the simulation platform, the target device can send device information to the simulation platform, and carry the target address and target port of the target platform to which the target device is to be registered in the device information. The simulation platform can also obtain the target address and target port from other servers, and the other servers are used to allocate the IoT platform for device registration. The simulation platform can send the identification information of the device to other servers to instruct other servers to return the target address and target port allocated for the device based on the identification information.

[0032] In the above embodiments, after the simulation platform establishes a connection with the device, it can register the device into other platforms, and determine the target platform to which the device is to be connected according to the obtained target address and target port of the device to be connected. The simulation platform can determine whether a target link has been established between the simulation platform and the platform with the target address through the target port included in the device information of the target device. If it is determined that the target link has been established, the device information of the target device can be directly sent to the target platform through the target link, and the target platform can complete the registration of the target device to the target platform according to the device information. The execution subject of the above steps may be the simulation platform, but is not limited thereto.

[0033] Through the present invention, when it is determined that the target device is to be registered into other platforms, the target address and target port of the target platform to which the target device is to be registered are obtained. Here, the target device is a device that has established a connection with the simulation platform, and other platforms are platforms different from the simulation platform, and other platforms include the target platform. It is determined whether a target link has been established between the simulation platform and the target platform through the target port. If the target link has been established, at least one target device is registered into the target platform through the target link. Since when registering the device into the target platform, when there already exists a target link established between the simulation platform and the target platform with the target address through the target port, the target device is registered into the target platform through the target link, that is, multiple devices with the same address information and port information of other platforms to be connected can be registered into the target platform through one target link. Therefore, the problem of low efficiency in registering devices in the related art can be solved, and the effect of improving the efficiency of registering devices can be achieved.

[0034] In an exemplary embodiment, after determining whether the target link between the simulation platform and the target platform has been established through the target port, the method further includes: if the target link has not been established, establishing the target link between the simulation platform and the target platform through the target port. In this embodiment, if it has not been established, the target link is established, and the target device is bound to the target link. After binding, the target device and the target platform can interact through the target link.

[0035] In an exemplary embodiment, registering at least one of the target devices to the target platform through the target link includes: determining the target number of devices registered to the target platform through the established target link; if it is determined that the target number is less than a predetermined threshold, registering at least one of the target devices to the target platform through the established target link; if it is determined that the target number is greater than or equal to the predetermined threshold, creating a new target link and registering at least one of the target devices to the target platform through the target link. In this embodiment, if it has been established, the target number of devices bound to the target link can be determined. If the target number is greater than the predetermined threshold, a new target link between the simulation platform and the target platform is established through the target port. If the target number of devices bound to the target link is less than the predetermined threshold, the target device can be bound to the target link, that is, the target device can be registered to the target platform through the target link. The schematic diagram of the process of registering the target device to the target platform can be seen in the appendix Figure 3 , such as Figure 3 shown, and the process includes:

[0036] Step S302, the simulation platform accesses a third-party device (corresponding to the target device) and starts registering the third-party device to the IoT platform.

[0037] Step S304, the simulation platform obtains the link address (corresponding to the above target address) and port (corresponding to the above target port) of the device, that is, the simulation platform obtains the address for the device to connect to the IoT platform. Among them, the simulation platform can obtain the target address and target port of the device through device information, or can obtain them from other servers. The other servers are used to allocate the IoT platform for device registration. The simulation platform can send the identification information of the device to other servers to instruct other servers to return the target address and target port allocated for the device based on the identification information.

[0038] Step S306, determine whether a link (corresponding to the above target link) has been established for the current address and port. If the determination result is yes, execute step S308; if the determination result is no, execute step S310.

[0039] Step S308, if the link has been established, obtain the number of devices bound to the current link (corresponding to the above-mentioned target number).

[0040] Step S310, establish a link and bind the device to the link.

[0041] Step S312, determine whether the number of devices bound to the current link exceeds the threshold (corresponding to the above-mentioned predetermined threshold). If the determination result is yes, execute Step S310; if the determination result is no, execute Step S314.

[0042] Step S314, if the threshold is not exceeded, directly bind the device to the link according to the current device SN.

[0043] Step S316, register the device to the IoT platform through the network link.

[0044] In the above embodiments, when it is determined that the target link has been established, the maximum number of devices allowed to be bound to the target link, and the target number of devices currently bound to the target link can also be determined. Determine the first number of multiple target devices. When the sum of the target number and the first number is greater than the maximum number, a new target link is created. Or, when the sum of the target number and the first number is greater than the maximum number, determine the target difference between the maximum number and the target number, determine the target difference number of devices among the multiple target devices, bind them to the target link, and create a new target link, and bind the remaining target devices to the newly created target link. When the sum of the target number and the first number is less than or equal to the maximum number, bind the multiple target devices to the target link.

[0045] In an exemplary embodiment, the method further includes: receiving a control signaling sent by a target platform; converting the control signaling into a target signaling in a first predetermined format; determining a first device to be controlled by the control signaling based on a first sequence code included in the control signaling, where the first device is a device pre-registered to the target platform; and sending the target signaling to the first device to instruct the first device to execute an instruction indicated by the target signaling. In this embodiment, in the interaction mode of single-link and multiple devices, it is necessary to distinguish which device the signaling belongs to between platforms. This can be achieved by adding the unique device information SN, i.e., the sequence code, to the HTTP signaling interaction to distinguish. When the target platform sends a control signaling to a device, it can issue a control protocol and obtain device information. In the issued HTTP protocol, expand X-SN and write the device SN code, that is, the target platform expands the sequence code of the device it wants to control into the control signaling. Send the control signaling to the simulation platform. After receiving the control signaling, the simulation platform can retrieve the device according to the first sequence code included in the control signaling, determine the first device to be controlled by the control signaling, convert the control signaling into a device protocol, that is, the first predetermined format can be a format that meets the device protocol, obtain the target signaling, and transparently transmit the target signaling to the first device to instruct the first device to execute the instruction included in the target signaling.

[0046] In the above embodiment, the schematic diagram of the process for the target platform to send a control signaling to a device can be seen in the appendix Figure 4 , such as Figure 4 shown. The process includes:

[0047] Step S402, the IoT platform issues a control device signaling.

[0048] Step S404, the IoT platform adds the header X-SN to the issued HTTP signaling.

[0049] Step S406, the simulation platform receives the signaling.

[0050] Step S408, the simulation platform retrieves the device according to X-SN.

[0051] Step S410, convert the signaling into a device protocol and transparently transmit it to the device.

[0052] In an exemplary embodiment, the method further includes: receiving sending information to be sent to a target platform sent by a second device, where the second device is a device pre-registered to the target platform; determining a second serial number of the second device; converting the sending information into information in a second predetermined format to obtain converted information; adding the second serial number to the converted information to obtain target sending information; determining a first link bound to the second serial number through a binding relationship, where the binding relationship is pre-determined; and sending the target sending information to the target platform through the first link. In this embodiment, in the interaction mode of single link and multiple devices, a device that has been registered to the target platform can also send sending information to the target platform through an emulation platform. The sending information may include a reply information based on a control signaling feedback, or may be a request information, etc. The second device can send the sending information to the emulation platform. After receiving the sending information, the emulation platform can determine the second serial number of the second device, determine the first link bound to the second serial number, convert the sending information into converted information in the second predetermined format, and add the second serial number to the converted information, that is, after receiving the device reply, the emulation platform retrieves the corresponding HTTP link according to the device SN, and when reporting the reply, also adds the X-SN identifier to identify the device. The second predetermined format may be a format that meets the protocol of the target platform.

[0053] In the above embodiment, the schematic diagram of the control signaling process for the device to send to the target platform can be seen in the appendix Figure 5 , such as Figure 5 shown, and the process includes:

[0054] Step S502, the emulation platform receives the device reply.

[0055] Step S504, the emulation platform retrieves the corresponding HTTP long link according to the device SN.

[0056] Step S506, the emulation platform converts the device protocol into the Internet of Things platform protocol.

[0057] Step S508, when reporting the reply to the Internet of Things platform, add the header X-SN to the HTTP signaling.

[0058] Step S510, the Internet of Things platform receives the reply.

[0059] In an exemplary embodiment, the method further includes: receiving an unbinding instruction, wherein the unbinding instruction includes a device to be unbound; determining a second link bound to the device to be unbound; and unbinding the device to be unbound in the second link. In this embodiment, the simulation platform can also receive an unbinding instruction, and when the simulation platform detects that the device needs to be deleted or logged out, it can unbind the device to be unbound from the second link to which it is bound. After the device is unbound from the link, the simulation platform will no longer send a heartbeat to the IoT platform, and the IoT platform will mark the device offline after the heartbeat times out.

[0060] In the above embodiment, the schematic diagram of the device unbinding process can be found in the attached Figure 6 ,like Figure 6 As shown, the process includes:

[0061] Step S602, the simulation platform detects that the device needs to be deleted and logged out.

[0062] Step S604: the simulation platform retrieves the link corresponding to the device and releases the binding relationship between the device and the link.

[0063] In an exemplary embodiment, the method further includes: in the case where it is determined that the third link established with the target platform is abnormal, determining the first address and the first port corresponding to the third link; and re-establishing the link with the first address and the first port. In this embodiment, when the simulation platform detects an HTTP link abnormality during the process of sending and receiving signaling, the link can be reset. For example, when it is determined that the third link is abnormal, the first address and the first port corresponding to the third link can be determined, and the link with the platform whose address is the first address can be re-established through the first port. Rapid recovery is achieved when the service is abnormal, and the abnormality is that only the link needs to be restored.

[0064] In the above embodiment, the schematic diagram of the re-establishing link process can be found in the attached Figure 7 ,like Figure 7 As shown, the process includes:

[0065] Step S702: The simulation platform finds that the HTTP link is abnormal.

[0066] Step S704, reset the link and re-establish the link.

[0067] In an exemplary embodiment, after registering at least one of the target devices to the target platform via the target link, the method further includes: determining a target serial number of the target device; generating a mapping identifier based on the target address, the target port, and the number of devices bound to the target link; binding the target serial number to the mapping identifier to obtain a binding relationship. In this embodiment, the simulation platform generates a unique mapping key value after registration and login. This key value can describe the basic information of the current link, and the device corresponding to the link can be quickly retrieved through this key value. That is, after establishing the target link, the target serial number, the target address, the target port, and the target link of the target device can also be bound to obtain a binding relationship. After binding, the target link corresponding to the target serial number or the devices bound in the target link can be determined according to the binding relationship, which facilitates the simulation platform to retrieve devices or links. After obtaining the binding relationship, the simulation platform can search for the target link bound to the target device through the binding relationship, or the device serial numbers of the devices already bound in the target link, the number of devices already bound, etc.

[0068] In the above embodiment, the schematic diagram of the process for establishing the binding relationship can be seen in the appendix Figure 8 , such as Figure 8 shown. This process includes:

[0069] Step S802, the simulation platform establishes link management.

[0070] Step S804, the simulation platform obtains the device connection IP and port, such as: 192.168.10.101:80, and the SN of the device.

[0071] Step S806, generate a mapping key value according to the current IP, port, and number of connections.

[0072] Step S808, establish a link according to the actual IP and port, and establish the corresponding relationship between the connection handle and the mapping key value.

[0073] Step S810, establish the mapping relationship between the connection handle and the device SN.

[0074] In the above embodiment, the simulation platform obtains the number of connections of the current IP and port, such as: the number is 1. The simulation platform generates a mapping key value, such as: 192.168.10.101 / 80 / 1, establishes the corresponding relationship between the key value and the connection, establishes the mapping relationship between the connection and the SN, and establishes the mapping relationship between the SN and the key value.

[0075] In the foregoing embodiments, the device and the platform are quickly connected and interacted through the method of sharing network links among multiple devices. Multiple devices can be quickly linked without all devices establishing links, thus occupying less resources. When each device needs to establish a link with the platform, when most devices are in an idle state, the link established between the device and the platform needs to be maintained all the time, and there is little signaling interaction, resulting in low utilization rate of the link. By adopting the method of sharing network links among multiple devices, that is, by adopting the long-link method, the utilization rate of the link can be fully improved. The sharing of network connections among multiple devices is determined by the address and port. Devices with the same target IP and port share one connection. When the connection binding threshold is exceeded, a new link is established again. The link binding threshold is the maximum number of devices that the shared network connection can maintain, and this value is configurable.

[0076] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes contributions to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0077] In this embodiment, a registration device for a device is further provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0078] Figure 9 is a structural block diagram of a registration device for a device according to an embodiment of the present invention. As Figure 9 shown, the device includes:

[0079] A first registration module 92, configured to obtain a target address and a target port of a target platform to which the target device is to be registered when it is determined that the target device is to be registered to another platform, where the target device is a device that has established a connection with a simulation platform, the other platform is a platform different from the simulation platform, and the other platform includes the target platform;

[0080] A determination module 94, configured to determine whether a target link between the simulation platform and the target platform has been established through the target port;

[0081] A second registration module 96, configured to register at least one of the target devices to the target platform through the target link when the target link has been established.

[0082] In an exemplary embodiment, the apparatus may be configured to, after determining whether a target link between the simulation platform and the target platform has been established through the target port, establish the target link between the simulation platform and the target platform through the target port when the target link has not been established.

[0083] In an exemplary embodiment, the second registration module 96 may register at least one of the target devices to the target platform through the target link in the following manner: determining a target number of devices registered to the target platform through the established target link; when determining that the target number is greater than or equal to a predetermined threshold, creating a new target link and registering at least one of the target devices to the target platform through the target link; when determining that the target number is less than the predetermined threshold, registering at least one of the target devices to the target platform through the established target link.

[0084] In an exemplary embodiment, the apparatus may also be configured to receive a control signaling sent by the target platform; convert the control signaling into a target signaling in a first predetermined format; determine a first device to be controlled by the control signaling based on a first sequence code included in the control signaling, where the first device is a device pre-registered to the target platform; and send the target signaling to the first device to instruct the first device to execute an instruction indicated by the target signaling.

[0085] In an exemplary embodiment, the apparatus may also be configured to receive sending information to be sent to the target platform sent by a second device, where the second device is a device pre-registered to the target platform; determine a second sequence code of the second device; convert the sending information into information in a second predetermined format to obtain converted information; add the second sequence code to the converted information to obtain target sending information; determine a first link bound to the second sequence code through a binding relationship, where the binding relationship is pre-determined; and send the target sending information to the target platform through the first link.

[0086] In an exemplary embodiment, the apparatus may also be configured to receive an unbinding instruction, where the unbinding instruction includes a device to be unbound; determine a second link bound to the device to be unbound; and unbind the device to be unbound from the second link.

[0087] In an exemplary embodiment, the device may also be configured to determine a first address and a first port corresponding to the third link when it is determined that the third link established with the target platform is abnormal; and re - establish a link with the first address and the first port.

[0088] In an exemplary embodiment, the device may also be configured to determine a target serial number of the target device after registering at least one of the target devices to the target platform through the target link; generate a mapping identifier based on the target address, the target port, and the number of devices bound to the target link; and bind the target serial number to the mapping identifier to obtain a binding relationship.

[0089] It should be noted that the above - mentioned respective modules can be implemented by software or hardware. For the latter, it can be achieved in the following ways, but not limited thereto: all the above - mentioned modules are located in the same processor; or, the above - mentioned respective modules are located in different processors in any combination form.

[0090] An embodiment of the present invention also provides a computer - readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any one of the above - mentioned method embodiments when running.

[0091] In an exemplary embodiment, the above - mentioned computer - readable storage medium may include, but is not limited to: USB flash drives, read - only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs and other various media that can store computer programs.

[0092] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above - mentioned method embodiments.

[0093] In an exemplary embodiment, the above - mentioned electronic device may further include a transmission device and an input / output device. Wherein, the transmission device is connected to the above - mentioned processor, and the input / output device is connected to the above - mentioned processor.

[0094] Specific examples in this embodiment may refer to the examples described in the above - mentioned embodiments and exemplary embodiments, and will not be elaborated herein.

[0095] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.

[0096] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A registration method for a device, characterized in that, it includes: When it is determined that the target device is to be registered to another platform, obtain the target address and target port of the target platform to which the target device is to be registered, where the target device is a device that has established a connection with the simulation platform, the other platform is a platform different from the simulation platform, the other platform includes the target platform, and there are multiple target platforms; Determine whether a target link has been established between the simulation platform and the target platform through the target port; If it has been established, register at least one of the target devices to the target platform through the target link.

2. The method according to claim 1, characterized in that, After determining whether a target link has been established between the simulation platform and the target platform through the target port, the method further includes: If the target link has not been established, establish the target link between the simulation platform and the target platform through the target port.

3. The method according to claim 1, characterized in that, Registering at least one of the target devices to the target platform through the target link includes: Determine the target number of devices registered to the target platform through the established target link; If it is determined that the target number is greater than or equal to a predetermined threshold, create a new target link and register at least one of the target devices to the target platform through the target link; If it is determined that the target number is less than the predetermined threshold, register at least one of the target devices to the target platform through the established target link.

4. The method according to claim 1, characterized in that, the method further includes: Receive a control signal sent by the target platform; Convert the control signal into a target signal in a first predetermined format; Determine the first device to be controlled by the control signal based on the first sequence code included in the control signal, where the first device is a device pre-registered to the target platform; Send the target signal to the first device to instruct the first device to execute the instruction indicated by the target signal.

5. The method according to claim 1, characterized in that, the method further includes: Receive sending information to be sent to the target platform sent by a second device, where the second device is a device pre-registered to the target platform; Determine the second sequence code of the second device; Convert the sending information into information in a second predetermined format to obtain converted information; Add the second sequence code to the converted information to obtain target sending information; Determine a first link bound to the second sequence code through a binding relationship, where the binding relationship is pre-determined; Send the target sending information to the target platform through the first link.

6. The method according to claim 1, characterized in that, the method further includes: Receive an unbinding instruction, where the unbinding instruction includes the device to be unbound; Determine a second link bound to the device to be unbound; Unbind the device to be unbound in the second link.

7. The method according to claim 1, wherein, the method further includes: when determining that the third link established with the target platform is abnormal, determining the first address and the first port corresponding to the third link; re - establishing a link with the first address and the first port.

8. The method according to claim 1, wherein, after registering at least one of the target devices to the target platform through the target link, the method further includes: determining the target serial number of the target device; generating a mapping identifier based on the target address, the target port, and the number of devices bound to the target link; binding the target serial number with the mapping identifier to obtain a binding relationship.

9. A registration device for a device, wherein, it includes: A first registration module, configured to, when determining that a target device is to be registered to another platform, obtain the target address and the target port of the target platform to which the target device is to be registered, wherein the target device is a device that has established a connection with a simulation platform, wherein the other platform is a platform different from the simulation platform, the other platform includes the target platform, and there are multiple target platforms; A determination module, configured to determine whether a target link between the simulation platform and the target platform has been established through the target port; A second registration module, configured to, when the link has been established, register at least one of the target devices to the target platform through the target link.

10. A computer - readable storage medium, wherein, a computer program is stored in the computer - readable storage medium, and wherein the computer program is configured to execute the method described in any one of claims 1 to 8 when running.

11. An electronic device, including a memory and a processor, wherein, a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Equipment access method and device of Internet of Things platform, electronic equipment and storage medium

    CN112583910A

  • Equipment management and control method and device of Internet of Things service system

    CN113364820A