CN114465987B - Network address allocation method, internet of things system, device, equipment and storage medium - Google Patents

Network address allocation method, internet of things system, device, equipment and storage medium Download PDF

Info

Publication number
CN114465987B
CN114465987B CN202111510115.1A CN202111510115A CN114465987B CN 114465987 B CN114465987 B CN 114465987B CN 202111510115 A CN202111510115 A CN 202111510115A CN 114465987 B CN114465987 B CN 114465987B
Authority
CN
China
Prior art keywords
address
private network
network
internet
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111510115.1A
Other languages
Chinese (zh)
Other versions
CN114465987A (en
Inventor
王晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Shanghai Robotics Co Ltd
Original Assignee
Cloudminds Shanghai Robotics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudminds Shanghai Robotics Co Ltd filed Critical Cloudminds Shanghai Robotics Co Ltd
Priority to CN202111510115.1A priority Critical patent/CN114465987B/en
Publication of CN114465987A publication Critical patent/CN114465987A/en
Priority to PCT/CN2022/098696 priority patent/WO2023103319A1/en
Application granted granted Critical
Publication of CN114465987B publication Critical patent/CN114465987B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the invention provides a network address allocation method, an Internet of things system, a device, equipment and a storage medium, wherein the method comprises the following steps: responding to the registration of the newly added Internet of things equipment, and if the first public network IP address of the server in the public network does not conflict with the first alternative private network IP address to be allocated, allocating a target private network IP address for the newly added Internet of things equipment according to the first alternative private network IP address. Further, the corresponding relation between the registration information of the newly added Internet of things equipment and the target private network IP address of the newly added Internet of things equipment is established, so that the distribution of the private network IP address of the newly added Internet of things equipment is completed, and the automatic registration of the equipment is also realized. Meanwhile, before the address is allocated, the private network IP address allocated to the Internet of things equipment and the public network IP address of the server in the public network are not conflicted through address conflict detection, and normal control of the server on the Internet of things equipment can be further guaranteed.

Description

Network address allocation method, internet of things system, device, equipment and storage medium
Technical Field
The invention relates to the field of Internet of things, in particular to a network address allocation method, an Internet of things system, a device, equipment and a storage medium.
Background
The internet of things is widely applied to various scenes in daily life of people, such as unmanned driving, intelligent industry, intelligent home and the like. In different internet of things, a remote server needs to communicate with the internet of things equipment so as to control the internet of things equipment. For servers and internet of things devices respectively located in different networks, network Address Translation (NAT) technology may be used to implement communication between the servers and the internet of things devices located in different networks. The internet of things equipment generally operates in a private network, and the server generally operates in a public network. Specifically, after the internet of things device is registered in the private network, an NAT entry including an association relationship among the device identifier of the internet of things device, the private network IP address of the internet of things device communicating in the private network, and the public network IP address of the internet of things device communicating in the public network may be obtained, so as to implement communication using the content in the NAT entry.
When the number of the internet of things devices in the internet of things changes, for example, a new internet of things device appears, the device identifier of the new internet of things device and the corresponding relationship between the private network IPs need to be updated to the NAT entry to complete the registration of the new internet of things device. However, in practice, the corresponding relationship in the NAT entry is often updated manually, and for the internet of things with frequent changes of the internet of things, the manual updating manner obviously reduces the efficiency and convenience of registration of the internet of things.
Therefore, how to improve the convenience of device registration becomes an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a network address allocation method, an internet of things system, an apparatus, a device, and a storage medium, so as to improve convenience of registering an internet of things device.
In a first aspect, an embodiment of the present invention provides a network address allocation method, applied to a server in a private network, including:
responding to the registration of the newly added Internet of things equipment in the private network, and acquiring a detection result corresponding to whether a first public network IP address of a server in the public network conflicts with a first alternative private network IP address to be distributed or not;
if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target private network IP address of the newly added Internet of things equipment according to the first alternative private network IP address;
and establishing a corresponding relation between the registration information of the newly added Internet of things equipment and the target private network IP address of the newly added Internet of things equipment so as to complete the allocation of the network address.
In a second aspect, an embodiment of the present invention provides another method for allocating a network address, where the method is applied to a newly added internet of things device in a private network, and includes:
sending registration information corresponding to the newly-added Internet of things equipment to a server in the private network, so that the server in the private network determines a target private network IP address of the newly-added Internet of things equipment according to a first public network IP address of the server in the public network and a first alternative private network IP address to be distributed, wherein the first public network IP address and the first alternative private network IP address do not conflict;
and receiving the corresponding relation between the registration information of the newly added Internet of things equipment sent by the server in the private network and the target private network IP address of the newly added Internet of things equipment so as to complete the allocation of the network address.
In a third aspect, an embodiment of the present invention provides an internet of things system, including:
the system comprises an Internet of things device and a first server which operate in a private network, and a second server which operates in a public network;
the first server is used for responding to registration of newly-added Internet of things equipment in a private network, and acquiring a detection result corresponding to whether a first public network IP address of the second server and a first alternative private network IP address to be allocated conflict or not;
if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target private network IP address of the newly added Internet of things equipment in the private network according to the first alternative private network IP address;
establishing a corresponding relation between the registration information of the newly added Internet of things equipment and a target private network IP address of the newly added Internet of things equipment;
the newly added Internet of things equipment forwards the control instruction sent by the second server to the newly added Internet of things equipment according to the corresponding relation;
and the second server is used for sending the control instruction to the newly added Internet of things equipment.
In a fourth aspect, an embodiment of the present invention provides a network address allocation apparatus, including:
the detection module is used for responding to the registration of newly added Internet of things equipment in the private network and acquiring a detection result corresponding to whether a first public network IP address of a server in the public network and a first alternative private network IP address to be distributed conflict or not;
the determining module is used for determining a target private network IP address of the newly-added Internet of things device according to the first alternative private network IP address if the detection result shows that the first public network IP address and the first alternative private network IP address are not in conflict;
and the establishing module is used for establishing the corresponding relation between the registration information of the newly-added Internet of things equipment and the target private network IP address of the newly-added Internet of things equipment so as to complete the allocation of the network address.
In a fifth aspect, an embodiment of the present invention provides another network address allocation apparatus, including:
the sending module is used for sending registration information corresponding to the newly added Internet of things equipment to a server in a private network, so that the server in the private network determines a target private network IP address of the newly added Internet of things equipment according to a first public network IP address of the server in the public network and a first alternative private network IP address to be distributed, and the first public network IP address and the first alternative private network IP address do not conflict;
and the receiving module is used for receiving the corresponding relation between the registration information of the newly-added Internet of things equipment and the target private network IP address of the newly-added Internet of things equipment, which is sent by the server in the private network, so as to complete the allocation of network addresses.
In a sixth aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory is configured to store one or more computer instructions, and when executed by the processor, the one or more computer instructions implement the network address allocation method in the first aspect or the second aspect. The electronic device may also include a communication interface for communicating with other devices or a communication network.
In a seventh aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor is enabled to implement at least the network address allocation method according to the first aspect or the second aspect.
The network address allocation method provided by the embodiment of the invention comprises the steps that the private network comprises the server and the Internet of things equipment, the server is used for managing the Internet of things equipment, and the public network also comprises the server used for controlling the Internet of things equipment.
Based on the public network and the private network, in response to the registration of the newly added Internet of things equipment, the server in the private network acquires a detection result corresponding to whether the first public network IP address of the server in the public network and the first alternative private network IP address to be allocated conflict or not. And if the detection result shows that the two addresses do not conflict, distributing a target private network IP address to the newly-added Internet of things equipment according to the first alternative private network IP address. And further establishing a corresponding relation between the registration information of the newly-added Internet of things equipment and the target private network IP address of the Internet of things equipment, thereby completing the registration of the newly-added Internet of things equipment, namely completing the distribution of the private network IP address for the newly-added Internet of things equipment.
In the method, when the newly added Internet of things equipment is registered, the server of the private network can automatically acquire the registration information of the equipment, allocate the target private network IP address to the newly added Internet of things equipment, and further establish the corresponding relation between the registration information and the target private network IP address, so that the automatic registration of the Internet of things equipment is realized, namely, the efficiency and the convenience of equipment registration are improved. Meanwhile, before the address is allocated to the internet of things equipment, a detection process of whether the address conflicts exists. Through detection, the target private network IP address allocated to the newly-added Internet of things equipment and the public network IP address of the server in the public network can be ensured not to conflict, so that the server in the public network can realize control over the newly-added Internet of things equipment by sending a control instruction to the target private network IP address which does not conflict with the first public network IP address.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart of a network address allocation method according to an embodiment of the present invention;
fig. 2 is a flowchart of another network address allocation method according to an embodiment of the present invention;
fig. 3 is a flowchart of another network address allocation method according to an embodiment of the present invention;
fig. 4 is a flowchart of another network address allocation method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an internet of things system according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an application of an IOT system in a human robot scene according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a network address allocation apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device corresponding to the network address allocation apparatus provided in the embodiment shown in fig. 7;
fig. 9 is a schematic structural diagram of a network address allocation apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device corresponding to the network address allocation apparatus provided in the embodiment shown in fig. 9.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "the plural" typically includes at least two, but does not exclude the presence of at least one.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
Depending on the context, the words "if" or "if" as used herein may be interpreted as "at \8230; \8230when" or "when 8230; \8230when" or "in response to a determination" or "in response to a recognition". Similarly, the phrases "if determined" or "if identified (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when identified (a stated condition or event)" or "in response to an identification (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in articles of commerce or systems including such elements.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments. In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
An internet of things system may include internet of things devices and servers operating in a private network, and servers operating in a public network. The server in the private network is used for managing the server of the Internet of things equipment in the private network. And the server in the public network is used for controlling the Internet of things equipment in the private network.
Based on the above internet of things system, fig. 1 is a flowchart of a network address allocation method provided by an embodiment of the present invention, and the network address allocation method provided by the embodiment of the present invention may be executed by a server in a private network in the internet of things system. It will be appreciated that the server device may be implemented as software, or a combination of software and hardware. As shown in fig. 1, the method may include the steps of:
s101, responding to registration of newly added Internet of things equipment in a private network, and obtaining a detection result corresponding to whether a first public network IP address of a server in the public network conflicts with a first alternative private network IP address to be distributed.
When a newly added internet of things device appears in the internet of things, in response to the registration of the newly added internet of things device, the server in the private network can obtain a detection result for detecting whether a first alternative private network IP address to be allocated and a first public network IP address of the server in the public network conflict with each other or not.
Optionally, the detection of the address conflict may be performed by a gateway in the private network, and the detection result is reported to a server in the private network. The gateway can obtain the first public network IP address of the server in the public network through wireless communication technologies such as WiFi. The server in the public network is used for sending a control instruction to the private network according to the first public network IP address so as to control the Internet of things equipment in the private network. Optionally, the control of the internet of things device may be implemented by means of NAT technology. Optionally, the first alternative private network IP address in this embodiment may be considered as an address pool including multiple private network IP addresses, so as to be allocated to different internet of things devices in a private network. Optionally, the server in the private network may further obtain the first alternative private network IP address by using a Dynamic Host Configuration Protocol (DHCP) supported by the server.
Meanwhile, in response to registration of the newly added internet of things device, the server in the private network can also obtain registration information of the newly added internet of things device. Optionally, the registration information may specifically include information used for indicating the identity of the internet of things device, such as an MAC address and a device serial number of the newly added internet of things device.
S102, if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target private network IP address of the newly added Internet of things device according to the first alternative private network IP address.
If the first public network IP address and the first alternative private network IP address do not conflict, it is indicated that even if any address is selected from the first alternative private network IP address as a target private network IP address of the newly-added Internet of things device, the target private network IP address does not conflict with the first public network IP address, and then the server of the private network can freely allocate the target private network IP address to the newly-added Internet of things device. Certainly, the target private network IP address allocated to the newly-added internet of things device needs to be different from the private network IP addresses of other internet of things devices in the private network.
Meanwhile, the newly added Internet of things equipment can also communicate with other Internet of things equipment in a private network by using the target private network IP address of the newly added Internet of things equipment.
S103, establishing a corresponding relation between the registration information of the newly added Internet of things equipment and the target private network IP address of the newly added Internet of things equipment to complete the allocation of the network address.
Finally, the server in the private network can establish the corresponding relationship between the registration information of the newly added internet of things device and the target private network IP address allocated to the newly added internet of things device, so that the network address of the newly added internet of things device is allocated, namely the registration of the newly added internet of things device in the private network is completed. And the server running in the public network can control the newly added Internet of things equipment which is registered.
Optionally, the correspondence obtained when the registration of the newly added internet of things device is completed may be stored in a server in the private network, or may be synchronized to the newly added internet of things device. Optionally, the correspondence of other registered internet of things devices in the private network is also stored in a server in the private network, and the correspondence of each registered internet of things device is also stored in the registered internet of things device.
In this embodiment, in response to registration of a newly-added internet of things device, a server in a private network may obtain a detection result corresponding to whether a first public network IP address and a first alternative private network IP address to be allocated conflict or not. If the detection result shows that the two addresses do not conflict, a target private network IP address is allocated to the newly-added Internet of things device according to the first alternative private network IP address, and a corresponding relation between the registration information of the newly-added Internet of things device and the target private network IP address allocated to the Internet of things device is further established, so that the private network IP address of the newly-added Internet of things device is allocated, namely the registration of the newly-added Internet of things device in a private network is completed.
According to the description, in the registration process of the newly-added Internet of things equipment, the server in the private network can automatically acquire the registration information of the newly-added Internet of things equipment, allocate the target private network IP address to the equipment and further establish the corresponding relation between the registration information and the target private network IP address, so that the automatic registration of the Internet of things equipment in the private network is realized, and the efficiency and the convenience of equipment registration are improved. Meanwhile, before the address is allocated to the newly-added internet of things equipment, a detection process of whether the address conflicts exists. Through detection, the target private network IP address allocated to the newly-added Internet of things equipment can be guaranteed not to conflict with the first public network IP address of the server in the public network, so that the server in the public network can realize control over the newly-added Internet of things equipment by sending a control instruction to the target private network IP address which does not conflict with the first public network IP address.
It should be noted that the embodiment of the internet of things device is closely related to the specific use scenario of the internet of things system. As mentioned in the background, for an internet of things system used in a smart home scenario, the internet of things devices may include various smart furniture installed in a home, such as a smart television, a smart refrigerator, a smart curtain, and so on. For an internet of things system used in an intelligent industrial scene, the internet of things device may include an external device configured on an industrial robot and/or various joint structures of the robot. Alternatively, the industrial robot may be a human robot, and the external device configured on the human robot may include a camera, a sensor, and the like. And for the joints of the robot and/or external equipment and other Internet of things equipment, the robot brain running in the public network can control the equipment.
The foregoing embodiment shows a case where the detection result indicates that the first public network IP address and the first alternative private network IP address do not conflict. It will be readily appreciated that the detection result may also indicate that a conflict between the first public network IP address and the first alternative private network IP address is included. For such an address conflict situation, the server in the private network may again obtain the second alternative private network IP address. If the second alternative private network IP address does not conflict with the first public network IP address of the server in the public network, the server in the private network can allocate a target private network IP address to the newly-added Internet of things device in the private network according to the second alternative private network IP address, so that the newly-added Internet of things can complete registration according to the second alternative private network IP address. It will be readily appreciated that the second alternative private network IP address retrieved at this time should not conflict with the first alternative private network IP address.
By using the embodiment, the corresponding relation between the registration information of the newly added Internet of things equipment and the allocated target private network IP address can be obtained, namely, the automatic registration of the newly added Internet of things equipment is realized. And the registered internet of things equipment in the private network can continue to communicate with other internet of things equipment or a server in the public network according to the allocated private network IP address.
Optionally, when the internet of things device in the private network is revoked, the server in the private network may delete the correspondence between the private network IP of the revoked internet of things device and the registration information in response to the logout of the internet of things device. Optionally, when the private network IP address of the internet of things device in the private network needs to be modified, the server in the private network may also modify the private network IP address of the internet of things device in response to the modification operation. Therefore, according to the methods provided by the embodiments and the following embodiments, the server in the private network can automatically register and cancel the internet of things device, and can also automatically query or modify the corresponding relationship between the private network IP address and the registration information of the internet of things device.
In addition, for the occasion of performing address conflict detection, the above embodiment is to perform address conflict detection in response to registration of a newly added internet of things device. In addition, optionally, for each internet of things device which normally runs in the private network and has completed registration, the gateway in the private network may also perform timed address conflict detection on the device. The situation that the control of the Internet of things equipment fails due to address conflict can be improved through detection.
Specifically, for any one of the internet of things devices which are normally operated, if the private network IP address of the any one of the internet of things devices does not conflict with the first public network IP address of the server in the public network, the any one of the internet of things devices can continue to use the allocated private network IP. If the address conflict occurs between the first public network IP address and the second public network IP address, the server in the private network can obtain an address pool by means of a DHCP protocol supported by the server, and if the private network IP address in the address pool does not conflict with the first public network IP address, the server in the private network reallocates the private network IP address for the Internet of things equipment according to the private network IP address in the address pool.
For the occasion of allocating the private network IP address to the internet of things device, the above embodiment is to respond to registration of a newly added internet of things device, and allocate the private network address to the newly added internet of things device. In addition, optionally, during the normal operation of the newly added internet of things device, a private network IP address may also be periodically allocated to the newly added internet of things device, that is, the dynamic allocation of the private network IP address is realized, so as to ensure the security of communication between the internet of things devices. And the shorter the period for allocating an IP address, the higher the security of communication. Meanwhile, before address allocation is performed each time, address collision detection is also required.
Specifically, in the first time, the server in the private network may obtain the first alternative private network IP address by using the DHCP protocol, and obtain a detection result corresponding to whether the first alternative private network IP address conflicts with the first public network IP address of the server in the public network. If the two do not conflict, the target private network IP address can be distributed to the newly added Internet of things equipment by using the first alternative private network IP address. If the second alternative private network IP address and the first public network IP address do not conflict, the target private network IP address is distributed to the newly added Internet of things device again according to the second alternative private network IP address. At the second time, the server in the private network can acquire a third alternative private network IP address by means of the DHCP protocol, and perform address conflict detection again by the gateway device. The server in the private network can perform the re-allocation of the private network IP address according to the detection result. The time interval between the first time and the second time can be regarded as the effective time of the private network IP, and the shorter the effective time is, the higher the security of communication between the Internet of things devices is.
Optionally, according to the above manner, a private network IP address may also be periodically allocated to each internet of things.
After the target private network IP address is distributed to the newly added Internet of things equipment, the newly added Internet of things equipment can also respond to a control instruction sent by a server in the public network by means of the distributed target private network IP address.
Optionally, the server in the private network may enable each piece of internet-of-things equipment including the newly added internet-of-things equipment to respond to the control instruction sent by the server in the public network by using the NAT technology. Taking the newly added internet of things device as an example, the response process of the control instruction can be described as follows:
for the newly added internet of things equipment which is already registered, the NAT router configured in the private network can further convert the target private network IP address of the newly added internet of things equipment into the second public network IP address, the NAT router can store the corresponding relation between the target private network IP address and the second public network IP address, and the corresponding relation can also be synchronized to the server in the public network. Based on the method, the server in the public network can send a control instruction for controlling the newly added Internet of things equipment to the IP address of the second public network. The control instruction can be received by the NAT router in the private network firstly, and then the NAT router can forward the control instruction to the newly added Internet of things equipment in the private network according to the locally stored registration information, the public network IP address and the private network IP address, so that the newly added Internet of things equipment responds to the control instruction, namely the server in the public network controls the newly added Internet of things equipment.
In the above description process, if the first public network IP address conflicts with the target IP address, the server in the private network cannot process the control instruction sent by the server in the public network, so that the control of the internet of things device fails, and the importance of the address conflict detection is also reflected.
Corresponding to the above control process, fig. 2 is a flowchart of another network address allocation method according to an embodiment of the present invention, as shown in fig. 2, after step S103, the method may further include the following steps:
s201, a second public network IP address of the newly added Internet of things device corresponding to the target private network IP address is obtained, so that a server in the public network can communicate with the Internet of things device according to the second public network IP address.
S202, associating the second public network IP address with the corresponding relation to obtain an association result.
Based on the target private network IP of the newly added Internet of things equipment, the server in the private network can also obtain a second public network IP address of the newly added Internet of things equipment. Optionally, the destination private network IP address may be translated by using a NAT router configured in the private network, so as to obtain the second public network IP address.
And then, associating the corresponding relation between the registration information of the newly added Internet of things equipment and the target private network IP address with the second public network IP address of the newly added Internet of things equipment to obtain the corresponding association result of the newly added Internet of things equipment. Optionally, the association result may also be stored in the NAT router. Certainly, the NAT router also stores the correlation results corresponding to all the internet of things devices in the private network. And optionally, the association result may also be sent to the newly added internet of things device and a server in the private network.
S203, according to the preset interface of the server in the private network, the correlation result is sent to the gateway in the private network, and the gateway stores and forwards the correlation result to the server in the public network.
Then, the server in the private network may send the obtained association result corresponding to the newly added internet of things device to the gateway in the private network by using a preset interface of the server, such as a Restful interface, so that the gateway forwards the association result corresponding to the newly added internet of things device to the server in the public network.
After the server in the public network obtains the correlation result, the control instruction can be sent to the second public network IP address according to the content in the correlation result, and the NAT router can further forward the control instruction to the target private network IP address according to the correlation result corresponding to the newly-added Internet of things device, so that the newly-added Internet of things responds to the control instruction sent by the server in the public network.
Optionally, the correlation results corresponding to the internet of things devices including the newly added internet of things device may be stored in a gateway of the private network and a server in the public network, so that the server in the public network can control the internet of things devices.
In this embodiment, after the server in the private network allocates the target private network IP address to the newly-added internet-of-things device, the server in the private network may further obtain a second public network IP address corresponding to the target private network IP address, so as to serve as the second public network IP address of the newly-added internet-of-things device. And then, correlating the second public network IP address, the target private network IP address and the registration information of the newly added Internet of things equipment to obtain a correlation result, so that a server in the public network can control the newly added Internet of things equipment according to the correlation result corresponding to the newly added Internet of things equipment.
In the above embodiments, different internet of things devices in the private network may be assigned to different target private network IP addresses, and may obtain their respective public network IP addresses through conversion, and respond to the control instruction sent by the server in the public network by using the pair of IP addresses. In order to further save IP address resources, optionally, the internet of things device is allocated with a private network IP address and a port at the same time. The server in the private network can distribute the same private network IP address and different ports for different Internet of things devices, so that the ports are used for distinguishing different Internet of things devices. Therefore, the Internet of things equipment can be distinguished while IP address resources are saved according to the allocation mode. And because different internet of things devices in the private network have the same private network IP address, after the conversion of the NAT router, all the internet of things devices in the private network also have the same public network IP address.
Fig. 3 is a flowchart of another network address allocation method according to an embodiment of the present invention. As shown in fig. 3, the method may include the steps of:
s301, responding to registration of the newly added Internet of things equipment in the private network, and acquiring a detection result corresponding to whether a first public network IP address of a server in the public network conflicts with a first alternative private network IP address to be distributed.
S302, if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target socket containing a target private network IP address and a target address port in alternative sockets containing the first alternative private network IP address and alternative ports, wherein the first alternative private network IP address is the same as the target private network IP address.
In response to the registration of the newly added internet of things equipment, the server in the public network can obtain the registration information of the newly added internet of things equipment, and can also obtain an address pool containing the first alternative private network IP address by means of a DHCP protocol. And in order to save address resources, the first alternative private network IP address in this embodiment may be any private network IP address in the address pool. Meanwhile, the server in the private network can also obtain a plurality of alternative ports, and the alternative ports are combined with the same first alternative private network IP address respectively to form a plurality of alternative sockets.
And if the obtained detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, selecting a target socket containing a target private network IP address and a target port from the alternative sockets. Wherein, the first alternative private network IP address is also the target private network IP address. And the target port allocated for the newly added internet of things equipment is different from the ports of other internet of things equipment in the private network.
S303, establishing a corresponding relation between the registration information of the newly added Internet of things equipment and the target socket of the newly added Internet of things equipment to complete the distribution of the network address.
Finally, the server in the private network can establish the corresponding relationship between the registration information of the newly added internet of things device and the target socket of the newly added internet of things device, so that the allocation of the network address is completed, namely the registration of the newly added internet of things device is completed.
In this embodiment, in response to registration of a newly added internet of things device, the server in the private network may obtain multiple alternative sockets including the same first alternative private network IP address and different ports. If the first alternative private network IP address is not in conflict with the first public network IP address, the server in the private network can allocate a target socket for the newly-added Internet of things device according to the multiple alternative sockets, namely, allocate a port for the newly-added Internet of things device, so that the registration of the newly-added Internet of things device in the private network is completed. Therefore, in this embodiment, the server in the private network actually allocates the port corresponding to the private network IP address, so as to implement automatic registration of the newly added internet of things device, and improve registration efficiency and convenience.
In the distribution process, the same target private network IP address and different ports can be distributed to different Internet of things devices in the private network, so that the address resource is saved. Although different internet of things devices in the private network have the same private network IP address, different internet of things devices have different ports, so that address resources are saved, and different internet of things devices can be distinguished, so that a control instruction sent by a server in the public network can be forwarded to the corresponding internet of things device, and control of the internet of things device is realized.
Optionally, based on the embodiment shown in fig. 3, if the first alternative private network IP address conflicts with the first public network IP address, the server in the private network may obtain the address pool according to the DHCP protocol, and obtain the second alternative private network IP address from the address pool. If the second alternative private network IP address does not conflict with the first public network IP address, a target port may be allocated to the newly added internet of things device in the manner described above, and the second alternative private network IP address and the target port allocated to the newly added internet of things device are used as a target socket of the newly added internet of things device, and then a correspondence between the target socket and registration information of the newly added internet of things device is further established, thereby completing registration of the newly added internet of things device in a private network. Of course, the second alternative private network IP address cannot conflict with the first alternative private network IP address and the first public network IP address of the server in the public network.
Optionally, similar to the embodiments shown in fig. 1 and fig. 2, the association relationship, which includes the registration information, the target socket and the corresponding public network IP, corresponding to the new internet of things device and other internet of things devices in the private network may also be stored in the server in the private network and the NAT router, and the server in the private network can automatically add, delete, and modify the corresponding port of any internet of things device.
On the basis of the foregoing embodiments, the process of address allocation may also be described from the perspective of an internet of things device in a private network, and fig. 4 is a flowchart of another network address allocation method provided in the embodiment of the present invention. As shown in fig. 4, the method may include the steps of:
s401, registration information corresponding to the newly added Internet of things device is sent to a server in a private network, so that the server in the private network determines a target private network IP address of the newly added Internet of things device according to a first public network IP address of the server in the public network and a first alternative private network IP address to be distributed, and the first public network IP address and the first alternative private network IP address do not conflict.
S402, receiving the corresponding relation between the registration information of the newly added Internet of things equipment and the target private network IP address of the newly added Internet of things equipment, wherein the registration information is sent by the server in the private network, so as to complete the distribution of the network address.
The newly added internet of things device in the private network can send registration information of the newly added internet of things device to a server in the private network, and after receiving the registration information, the server can allocate a private network IP address to the newly added internet of things device in the manner shown in the embodiments of fig. 1 to 3, and establish a corresponding relationship between a target private network IP address and the registration information of the newly added internet of things device. And when the newly added Internet of things equipment acquires the corresponding relation sent by the server in the private network, the network address allocation is also completed.
Optionally, the newly added internet of things device may respond to the control instruction sent by the server in the public network according to the allocated target private network IP address, that is, the server in the public network controls the newly added internet of things device in the private network.
Optionally, in a robotic scenario, the server in the public network may include a robotic brain; the newly added internet of things device can comprise an external device configured on the robot and/or a joint structure of the robot. In addition, for the parts not described in detail in the present embodiment, reference may be made to the related description of the embodiments shown in fig. 1 to 3. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 3, and are not described herein again.
The embodiments describe a process in which a server running in a private network allocates a network address to a newly added internet of things device, and also describe a process in which the server in the private network can control the newly added internet of things device according to a correlation result corresponding to the newly added internet of things device. And the servers contained in the public network and the private network are all components of the Internet of things system.
On the basis, the working processes of the two servers respectively operating in the private network and the public network can be described from the perspective of the whole Internet of things system. Fig. 5 is a schematic structural diagram of an internet of things system according to an embodiment of the present invention. The system comprises: the system comprises an Internet of things device and a first server which operate in a private network, and a second server which operates in a public network.
In response to registration of a newly added internet of things device in the private network, the first server may assign a private network IP address to the device.
For the process of allocating the private network IP address, the first server may first determine a first alternative private network IP address to be allocated by using a DHCP protocol supported by the first server. This first alternative private network IP address may be considered a pool of addresses. Further, the first server may obtain a detection result of address collision detection reported by the gateway in the private network. That is, the gateway in the private network detects whether the first public network IP address of the second server conflicts with the first alternative private network IP address to be allocated.
In one case, if the first public network IP address and the first alternative private network IP address do not conflict, the target private network IP address of the newly added Internet of things device is determined from the first alternative private network IP address. It is readily understood that the target private network IP address is different from the private network IP addresses of other internet of things devices in the private network.
In another case, if the first public network IP address conflicts with the first alternative private network IP address, the first server may determine another address pool, that is, a second alternative private network IP address, by using the DHCP protocol supported by the first server again, and determine the target private network IP address of the newly added internet of things device from the second alternative private network IP address. And the second alternative private network IP address does not conflict with the first alternative private network IP address and the first public network IP address.
In response to the registration of the newly added internet of things device, the first server may also obtain registration information of the device. The content included in the registration information may refer to the related description in the above embodiments, and is not described herein again. At this time, the first server may establish a correspondence between the target private network IP address of the newly added internet of things device and the registration information of the newly added internet of things device, that is, complete the registration of the newly added internet of things device in the private network.
Optionally, the process of allocating the Network address may be specifically implemented by a Software Defined Network (SDN) controller configured in the server.
Further, the internet of things system can also comprise NAT routing.
In order to enable a second server in a public network to control all the Internet of things equipment including the newly added Internet of things equipment in a private network. The first server can also obtain a second public network IP address of the newly-added Internet of things equipment. Optionally, the NAT router configured in the private network may convert the target private network IP address allocated to the newly-added internet of things device into the second public network IP address.
The first server can correlate the corresponding relation between the target private network IP address and the second public network IP address with the registration information of the newly added Internet of things equipment to obtain a correlation result corresponding to the newly added Internet of things equipment, and forwards the correlation result to the second server.
Optionally, the association process may also be performed by the SDN controller in the first server. Optionally, a gateway may also be included in the system of internet of things. The forwarding of the correlation result can be realized by means of a gateway deployed in a private network. Specifically, the SDN controller may send the association result to a gateway deployed in the private network by using a Restful interface of the SDN controller, and then the gateway forwards the association relation to the second server. Optionally, the correlation result corresponding to the newly added internet of things device may also be stored in the SDN controller, the gateway, and the newly added internet of things device at the same time.
And after obtaining the correlation result corresponding to the newly added Internet of things equipment, the second server can control the newly added Internet of things equipment. Specifically, the second server may send a control instruction for the newly added internet of things device to the private network according to the second public network IP address in the association result. After the gateway in the private network obtains the control instruction, the gateway queries the correlation results corresponding to the locally stored internet of things devices, finally determines that the receiving device of the control instruction is the newly added internet of things device, and forwards the control instruction to the newly added internet of things device through the target private network IP address, namely, the second server controls the newly added internet of things device.
Optionally, in order to save address resources, the network allocation process of the first server for the newly added internet of things device may specifically include: and allocating a target private network IP address and a target port for the newly-added Internet of things equipment. The target private network IP address of the newly-added Internet of things device is the same as the private network IP addresses of other Internet of things devices in the private network, but the target port is different from the ports of the other Internet of things devices, so that the newly-added Internet of things device is registered in the private network. The above port allocation process can refer to the description in the embodiment shown in fig. 3, and is not described herein again.
In addition, for the parts not described in detail in the present embodiment, reference may be made to the related description of the embodiments shown in fig. 1 to 4. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 4, and are not described herein again.
According to the method, automatic registration of the Internet of things equipment can be achieved, and in practice, automatic logout of the Internet of things equipment in a private network and automatic addition, deletion, modification and check of the association result list corresponding to the Internet of things equipment can also be achieved through the first server.
For ease of understanding, the specific implementation of the network address assignment method provided above is exemplified in connection with an industrial robot scenario. The contents of this embodiment can also be understood in conjunction with fig. 6.
The industrial robot may in particular be a humanoid robot, which then comprises external devices such as a camera 1, a chassis 2 and the like, as well as joint structures 3 such as shoulder joints, elbow joints, knee joints and the like. And the external equipment and the joint structure are the internet of things equipment in the embodiments. These internet of things devices and the server 4 are both running in a private network. The server 4 is used for completing registration of the external device and the joint structure, namely allocating corresponding private network IP addresses to the external device and the joint structure in the private network so as to further obtain respective corresponding correlation results of the external device and the joint structure. The robot brain 5 in the public network can also obtain the respective corresponding association results of different internet of things devices, and controls any external device or joint structure configured on the humanoid robot according to the association results.
Alternatively, in order to improve the visual ability of the humanoid robot, a new camera 6 may be added to the humanoid robot, at which time the server 4 may register the new camera 6 in the private network. Specifically, the registration process may be described as: the server 4 responds to the registration request of the camera 6, acquires the registration information of the camera 6, and simultaneously may also acquire an address pool, that is, the first alternative private network IP address in the foregoing embodiments, by using a DHCP protocol. In addition, the first public network IP address of the robot brain 5 can also be obtained through wireless communication technology such as WiFi. The above information may be synchronized to a gateway in the private network for detection of address conflicts by the gateway.
If the first public network IP address does not conflict with the addresses in the address pool, a target private network IP address can be allocated to the camera 6 according to the address pool. Of course, this target private network IP address is different from the private network IP address assigned to each joint structure 3 that the camera 1, the chassis 2, and the robot have. If the first public network IP address conflicts with an address in the address pool, the server 4 may obtain another address pool, that is, the second alternative private network IP address in the foregoing embodiments, according to the DHCP protocol again, and allocate the target private network IP address to the camera 6 according to the other address pool. The addresses contained in the two address pools should not conflict.
Then, the server 4 establishes a corresponding relationship between the registration information of the camera 6 and the target private network IP address, thereby realizing automatic registration of the camera 6 and improving registration efficiency and convenience. The correspondence may be stored locally in the server 4 and the camera 6. Alternatively, the registration process may be performed by an SDN controller in the server 6.
Optionally, in order to save IP address resources, the registration process of the server 4 for the camera 6 may be further described as:
the server 4 responds to the registration request of the camera 6 to acquire the registration information of the camera 8, and simultaneously, the server can also acquire an address pool and a plurality of alternative ports by using a DHCP protocol, and use any address in the address pool as a first alternative private network IP address, at this time, a plurality of alternative sockets can be formed by the first alternative private network IP address and the plurality of alternative ports. In addition, the first public network IP address of the robot brain 7 can be obtained through wireless communication technology such as WiFi, and further address conflict detection can be performed.
If the first public network IP address and the first alternative private network IP address do not conflict, a target socket is allocated to the camera 6 from the plurality of alternative sockets. If the first public network IP address conflicts with the first alternative private network IP address, the server 4 may obtain the second alternative private network IP address again according to the DHCP protocol to obtain an alternative socket again, and allocate a target socket to the camera 6 according to the obtained multiple alternative sockets. The first alternative private network IP address or the second alternative private network IP address included in the target socket may be referred to as a target private network IP address.
Therefore, the same private network IP address and different ports can be respectively allocated to the external equipment and each joint structure in the humanoid robot according to the mode, so that the private network IP address resource can be saved, and meanwhile, different external equipment and joint structures on the humanoid robot can be distinguished through the ports.
Then, the server 4 establishes a correspondence between the registration information of the camera 6 and the target socket, thereby realizing automatic registration of the camera 6 and improving registration efficiency and convenience. The correspondence may be stored locally in the server 4 and the camera 6. Optionally, the network address assignment process, that is, the registration process, may be specifically executed by the SDN controller in the server 4.
Alternatively, the server 4 may log off the external device and the joint structure provided in the human robot in accordance with the different distribution methods described above. And the server 4 can also automatically modify or query the private network IP addresses of the external devices and the joint structures.
After the registration of the camera 6 is completed, the robot brain 7 in the public network can also control it:
the NAT router 7 in the private network is able to translate the destination private network IP address assigned to the camera 6 into the second public network IP address. The robot brain 5 may send a control instruction to the second public network IP address of the camera 6. The control instruction is obtained by the gateway 8 in the private network, and the control instruction is forwarded to the camera 6 according to the locally stored correlation result corresponding to the camera 6, so that the control of the camera 6 is realized. After the registration is completed, the server 4 may also automatically associate the registration information of the camera 6, the target private network IP address, the target port, and the second public network IP address to obtain the association result. And the external devices of the humanoid robot and the corresponding correlation results of each joint structure can be stored in the server 4, the NAT router 7, the gateway 8 and the robot brain 5, so that the robot brain 7 can control each external device and each joint structure.
Fig. 7 is a schematic structural diagram of a network address assignment device according to an embodiment of the present invention, as shown in fig. 7, the device includes:
the result obtaining module 11 is configured to obtain a detection result corresponding to whether a first public network IP address of a server in the public network and a first alternative private network IP address to be allocated conflict with each other in response to registration of a newly added internet of things device in the private network.
A determining module 12, configured to determine, according to the first alternative private network IP address, a target private network IP address of the newly added internet of things device if the detection result indicates that the first public network IP address and the first alternative private network IP address do not conflict with each other.
The establishing module 13 is configured to establish a correspondence between the registration information of the newly added internet of things device and a target private network IP address of the newly added internet of things device, so as to complete network address allocation.
Optionally, the determining module 12 is further configured to determine, if the first public network IP address conflicts with the first alternative private network IP address, a second alternative private network IP address that does not conflict with the first alternative private network IP address; and if the second alternative private network IP address does not conflict with the first public network IP address, determining a target private network IP address of the newly-added Internet of things device according to the second alternative private network IP address.
Optionally, the apparatus further includes a first address obtaining module 14, configured to obtain the first alternative private network IP address or the second alternative private network IP address according to a dynamic host configuration protocol DHCP supported by the server in the private network.
Optionally, the determining module 12 is specifically configured to determine, in the alternative sockets including the first alternative private network IP address and the alternative address port, a target socket including the target private network IP address and the target port, where the first alternative private network IP address is the same as the target private network IP address.
The establishing module 13 is specifically configured to establish a correspondence between the registration information of the newly added internet of things device and the target socket of the newly added internet of things device.
Optionally, the apparatus further comprises: a second address obtaining module 15, an association module 16 and a sending module 17.
The second obtaining module 15 is configured to obtain a second public network IP address of the newly added internet of things device corresponding to the target private network IP address, so that a server in the public network communicates with the newly added internet of things device according to the second public network IP address.
The association module 16 is configured to associate the second public network IP address with the corresponding relationship to obtain an association result
The sending module 17 is configured to send the association result to a gateway in the private network according to a preset interface of the server in the private network, so that the gateway stores and forwards the association result to the server in the public network.
The server in the public network comprises a brain of the robot, and the Internet of things equipment comprises external equipment configured on the robot and/or a joint structure of the robot.
The apparatus shown in fig. 7 can perform the method of the embodiment shown in fig. 1 to 3, and reference may be made to the related description of the embodiment shown in fig. 1 to 3 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 3, and are not described herein again.
Having described the internal functions and structure of the network address assignment device, in one possible design, the structure of the network address assignment device may be implemented as an electronic device, which may include: a processor 21 and a memory 22. Wherein the memory 22 is used for storing a program that supports the electronic device to execute the network address allocation method provided in the embodiments shown in fig. 1 to fig. 3, and the processor 21 is configured to execute the program stored in the memory 22.
The program comprises one or more computer instructions which, when executed by the processor 21, are capable of performing the steps of:
responding to the registration of the newly added Internet of things equipment in the private network, and acquiring a detection result corresponding to whether a first public network IP address of a server in the public network conflicts with a first alternative private network IP address to be distributed or not;
if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target private network IP address of the newly added Internet of things equipment according to the first alternative private network IP address;
and establishing a corresponding relation between the registration information of the newly added Internet of things equipment and the target private network IP address of the newly added Internet of things equipment so as to complete the allocation of the network address.
Optionally, the processor 21 is further configured to perform all or part of the steps in the foregoing embodiments shown in fig. 1 to 3.
The electronic device may further include a communication interface 23, which is used for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium, configured to store computer software instructions for the electronic device, where the computer software instructions include a program for executing the network address assignment method in the method embodiments shown in fig. 1 to fig. 3.
Fig. 9 is a schematic structural diagram of another network address allocation apparatus according to an embodiment of the present invention, and as shown in fig. 9, the apparatus includes:
the sending module 31 is configured to send registration information corresponding to the newly added internet of things device to a server in a private network, so that the server in the private network determines a target private network IP address of the newly added internet of things device according to a first public network IP address of the server in the public network and a first alternative private network IP address to be allocated, where the first public network IP address and the first alternative private network IP address do not conflict.
A receiving module 32, configured to receive a correspondence between the registration information of the newly added internet of things device sent by the server in the private network and a target private network IP address of the newly added internet of things device, so as to complete network address allocation.
Optionally, the apparatus further comprises: and the response module 33 is configured to respond to the control instruction sent by the server in the public network according to the target private network IP address.
The server in the public network comprises a brain of the robot, and the Internet of things equipment comprises external equipment configured on the robot and/or a joint structure of the robot.
The apparatus shown in fig. 9 can execute the method of the embodiment shown in fig. 4, and reference may be made to the related description of the embodiment shown in fig. 4 for a part of this embodiment that is not described in detail. The implementation process and technical effect of the technical solution refer to the description in the embodiment shown in fig. 4, and are not described herein again.
Having described the internal functions and structure of the network address assignment device, in one possible design, the structure of the network address assignment device may be implemented as an electronic device, which may include: a processor 41 and a memory 42. Wherein the memory 42 is used for storing a program that supports the electronic device to execute the network address allocation method provided in the embodiment shown in fig. 4, and the processor 21 is configured to execute the program stored in the memory 42.
The program comprises one or more computer instructions which, when executed by the processor 41, are capable of performing the steps of:
sending registration information corresponding to the newly added Internet of things equipment to a server in the private network, so that the server in the private network determines a target private network IP address of the newly added Internet of things equipment according to a first public network IP address of the server in the public network and a first alternative private network IP address to be distributed, wherein the first public network IP address and the first alternative private network IP address do not conflict;
and receiving the corresponding relation between the registration information of the newly added Internet of things equipment sent by the server in the private network and the target private network IP address of the newly added Internet of things equipment so as to complete the allocation of the network address.
Optionally, the processor 41 is further configured to perform all or part of the steps in the embodiment shown in fig. 4.
The electronic device may further include a communication interface 43 for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium, which is used for storing computer software instructions for the electronic device, and includes a program for executing the network address allocation method in the method embodiment shown in fig. 4.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (15)

1. A network address allocation method is applied to a server for managing Internet of things equipment in a private network, and comprises the following steps:
responding to the normal operation of newly added internet-of-things equipment in the private network after registration, and acquiring a detection result corresponding to whether a first public network IP address of a server in the public network and a first alternative private network IP address to be distributed conflict or not;
if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target private network IP address of the newly-added Internet of things device according to the first alternative private network IP address;
and establishing a corresponding relation between the registration information of the newly-added Internet of things equipment and the target private network IP address of the newly-added Internet of things equipment to complete the distribution of network addresses, so that a server positioned in a public network sends a control instruction to the newly-added Internet of things equipment according to the target private network IP.
2. The method of claim 1, further comprising:
if the detection result shows that the first public network IP address conflicts with the first alternative private network IP address, determining a second alternative private network IP address which does not conflict with the first alternative private network IP address;
and if the second alternative private network IP address is not conflicted with the first public network IP address, determining a target private network IP address of the newly-added Internet of things equipment according to the second alternative private network IP address.
3. The method of claim 2, further comprising:
and acquiring the first alternative private network IP address or the second alternative private network IP address according to a Dynamic Host Configuration Protocol (DHCP) supported by the server in the private network.
4. The method of claim 1, wherein the determining the target private network IP address of the newly added internet of things device according to the first alternative private network IP address comprises:
determining a target socket containing the target private network IP address and the target port in the alternative sockets containing the first alternative private network IP address and the alternative address port, wherein the first alternative private network IP address is the same as the target private network IP address;
the establishing of the corresponding relationship between the respective registration information of the newly added internet of things device and the target private network IP address of the newly added internet of things device comprises the following steps:
and establishing a corresponding relation between the registration information of the newly added Internet of things equipment and the target socket of the newly added Internet of things equipment.
5. The method of claim 1, further comprising:
acquiring a second public network IP address of the newly-added Internet of things equipment corresponding to the target private network IP address so that a server in the public network communicates with the newly-added Internet of things equipment according to the second public network IP address;
associating the second public network IP address with the corresponding relation to obtain an association result;
and sending the association result to a gateway in the private network according to a preset interface of the server in the private network, so that the gateway stores and forwards the association result to the server in the public network.
6. The method according to any one of claims 1 to 5, wherein the server in the public network comprises a brain of the robot, and the newly added IOT device comprises an external device configured on the robot and/or a joint structure of the robot.
7. A network address allocation method is characterized in that a newly added Internet of things device applied to a private network comprises the following steps:
sending registration information corresponding to the newly-added Internet of things equipment to a server in the private network, so that the server in the private network determines a target private network IP address of the newly-added Internet of things equipment according to a first public network IP address of the server in the public network and a first alternative private network IP address to be distributed, wherein the first public network IP address and the first alternative private network IP address do not conflict;
and receiving the corresponding relation between the registration information of the newly added Internet of things equipment sent by the server in the private network and the target private network IP address of the newly added Internet of things equipment to complete the distribution of network addresses, and sending a control instruction to the newly added Internet of things equipment by the server in the public network according to the target private network IP.
8. The method of claim 7, further comprising:
and responding to a control instruction sent by a server in the public network according to the target private network IP address.
9. The method of claim 7 or 8, wherein the server in the public network comprises a robot brain; the newly-added Internet of things equipment comprises external equipment configured on the robot and/or a joint structure of the robot.
10. An internet of things system, comprising: the system comprises an Internet of things device and a first server which operate in a private network, and a second server which operates in a public network;
the first server is used for responding to normal operation of newly added internet of things equipment in a private network after registration, and acquiring a detection result corresponding to whether a first public network IP address of the second server and a first alternative private network IP address to be allocated conflict or not;
if the detection result shows that the first public network IP address and the first alternative private network IP address do not conflict, determining a target private network IP address of the newly added Internet of things equipment in the private network according to the first alternative private network IP address;
establishing a corresponding relation between the registration information of the newly added Internet of things equipment and a target private network IP address of the newly added Internet of things equipment;
forwarding a control instruction sent by the second server to the newly added Internet of things equipment according to the corresponding relation;
and the second server is used for sending the control instruction to the newly added Internet of things equipment.
11. The system of claim 10, wherein the first server is further configured to determine a second alternative private network IP address that does not conflict with the first alternative private network IP address if the detection result indicates that the first public network IP address and the first alternative private network IP address conflict;
and responding to the registration of the newly added Internet of things equipment in the private network, and determining the target private network IP address of the newly added Internet of things equipment according to the second alternative private network IP address.
12. A network address assignment device, comprising:
the result acquisition module is used for responding to the normal operation of newly added internet of things equipment in the private network after registration and acquiring a detection result corresponding to the fact that whether a first public network IP address of a server in the public network conflicts with a first alternative private network IP address to be distributed or not;
the determining module is used for determining a target private network IP address of the newly-added Internet of things device according to the first alternative private network IP address if the detection result shows that the first public network IP address and the first alternative private network IP address are not in conflict;
and the establishing module is used for establishing the corresponding relation between the registration information of the newly-added Internet of things equipment and the target private network IP address of the newly-added Internet of things equipment so as to complete the distribution of network addresses, and a server positioned in a public network sends a control instruction to the newly-added Internet of things equipment according to the target private network IP.
13. A network address assignment device, comprising:
the sending module is used for sending registration information corresponding to the newly added Internet of things equipment to a server in a private network, so that the server in the private network determines a target private network IP address of the newly added Internet of things equipment according to a first public network IP address of the server in the public network and a first alternative private network IP address to be distributed, and the first public network IP address and the first alternative private network IP address do not conflict;
and the receiving module is used for receiving the corresponding relation between the registration information of the newly-added Internet of things equipment and the target private network IP address of the newly-added Internet of things equipment, which is sent by the server in the private network, so as to complete the distribution of network addresses, and a server in a public network sends a control instruction to the newly-added Internet of things equipment according to the target private network IP.
14. An electronic device, comprising: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the network address allocation method of any one of claims 1 to 9.
15. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the network address assignment method of any one of claims 1 to 9.
CN202111510115.1A 2021-12-10 2021-12-10 Network address allocation method, internet of things system, device, equipment and storage medium Active CN114465987B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111510115.1A CN114465987B (en) 2021-12-10 2021-12-10 Network address allocation method, internet of things system, device, equipment and storage medium
PCT/CN2022/098696 WO2023103319A1 (en) 2021-12-10 2022-06-14 Network address allocation method, internet of things system, apparatus, device, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111510115.1A CN114465987B (en) 2021-12-10 2021-12-10 Network address allocation method, internet of things system, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114465987A CN114465987A (en) 2022-05-10
CN114465987B true CN114465987B (en) 2023-04-07

Family

ID=81405613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111510115.1A Active CN114465987B (en) 2021-12-10 2021-12-10 Network address allocation method, internet of things system, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114465987B (en)
WO (1) WO2023103319A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465987B (en) * 2021-12-10 2023-04-07 达闼机器人股份有限公司 Network address allocation method, internet of things system, device, equipment and storage medium
US20230185954A1 (en) * 2021-12-15 2023-06-15 Bank Of America Corporation Transmission of Sensitive Data in a Communication Network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016061947A1 (en) * 2014-10-24 2016-04-28 中兴通讯股份有限公司 Method and apparatus for detecting three-layer interface ip address conflict
CN108924272A (en) * 2018-06-26 2018-11-30 新华三信息安全技术有限公司 A kind of port resource distribution method and device
WO2021233340A1 (en) * 2020-05-22 2021-11-25 华为技术有限公司 Network registration method and apparatus

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572008B (en) * 2010-12-08 2016-08-31 中国电信股份有限公司 Communication service processing method and system, gateway device
MY168892A (en) * 2012-07-05 2018-12-04 Mimos Berhad System and method for pre-emptive address conflict resolution in automatic device address assignments
CN104283984B (en) * 2014-10-31 2017-07-04 金陵科技学院 A kind of method for realizing the interconnection of foreign peoples's address network
CN105763663B (en) * 2014-12-19 2019-05-03 华为技术有限公司 A kind of private net address management method, control device and the network equipment
US9736019B2 (en) * 2015-05-14 2017-08-15 Eero Inc. Methods for dynamic router configuration in a mesh network
CN106612337B (en) * 2015-10-23 2019-12-06 中国电信股份有限公司 Method, gateway and system for inhibiting 6LoWPAN address conflict in heterogeneous environment
CN105933355B (en) * 2016-07-07 2019-03-22 中国联合网络通信集团有限公司 A kind of internet-of-things terminal management method, Internet of Things server and network server
US20180191571A1 (en) * 2016-12-30 2018-07-05 IoT Defense, Inc. Network bridge device with automatic self-configuration and method thereof
CN109541955A (en) * 2018-12-14 2019-03-29 陕西理工大学 Smart home device management method and system
US11265289B2 (en) * 2019-11-15 2022-03-01 Cisco Technology, Inc. Distributed network address translation over network environments
CN113382468B (en) * 2021-06-24 2022-11-04 深圳艾灵网络有限公司 Address allocation method for local network device, electronic device, and storage medium
CN114465987B (en) * 2021-12-10 2023-04-07 达闼机器人股份有限公司 Network address allocation method, internet of things system, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016061947A1 (en) * 2014-10-24 2016-04-28 中兴通讯股份有限公司 Method and apparatus for detecting three-layer interface ip address conflict
CN108924272A (en) * 2018-06-26 2018-11-30 新华三信息安全技术有限公司 A kind of port resource distribution method and device
WO2021233340A1 (en) * 2020-05-22 2021-11-25 华为技术有限公司 Network registration method and apparatus

Also Published As

Publication number Publication date
WO2023103319A1 (en) 2023-06-15
CN114465987A (en) 2022-05-10

Similar Documents

Publication Publication Date Title
CN114465987B (en) Network address allocation method, internet of things system, device, equipment and storage medium
CN108777722B (en) Multi-system networking communication method and device, mobile terminal and storage medium
US8094655B2 (en) Communication scheme with arbitration mechanism for cases of address initialization and server setting
JP4773987B2 (en) Terminal affiliation switching system
US7885276B1 (en) Isolating network traffic in multi-tenant virtualization environments
WO2019144826A1 (en) Network identifier mapping method and system, terminal, and identification gateway
CN101199161B (en) Method and system for dynamic assignment of wireless LAN access point identity
JP6585837B2 (en) User migration
CN107615723B (en) Internet protocol address allocation method and relay equipment
CN108429824B (en) Address allocation method and device
KR101455229B1 (en) Relay server and relay communication system
CN105979202B (en) Data transmission method and device
CN114385314A (en) Internet of things equipment data migration system, method and device and storage medium
CN106878481B (en) Method, device and system for acquiring Internet Protocol (IP) address
US9385990B2 (en) Relay server and relay communication system
JP5660602B2 (en) Communication system, VPN gateway apparatus, and communication method used therefor
WO2021253221A1 (en) Role control method, apparatus and device
KR101410024B1 (en) Home network terminal device and control method
JP2007081456A (en) Converter
WO2016062244A1 (en) Endpoint identifiers registration
CN115174528A (en) Equipment address control method, device and system
JP4940707B2 (en) IP address assignment system and IP address assignment method
US20080043738A1 (en) Remote management apparatus and method of setting ip address thereof
JP2003018184A (en) Communication control system and communication control method
JP4893041B2 (en) IP address assignment method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant