CN109327560B - IP address lease renewing method, device, network system and electronic equipment - Google Patents

IP address lease renewing method, device, network system and electronic equipment Download PDF

Info

Publication number
CN109327560B
CN109327560B CN201811360985.3A CN201811360985A CN109327560B CN 109327560 B CN109327560 B CN 109327560B CN 201811360985 A CN201811360985 A CN 201811360985A CN 109327560 B CN109327560 B CN 109327560B
Authority
CN
China
Prior art keywords
request
lease
wireless router
renewal
equipment
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
CN201811360985.3A
Other languages
Chinese (zh)
Other versions
CN109327560A (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.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology 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 Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN201811360985.3A priority Critical patent/CN109327560B/en
Publication of CN109327560A publication Critical patent/CN109327560A/en
Application granted granted Critical
Publication of CN109327560B publication Critical patent/CN109327560B/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
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the application provides an IP address lease renewal method, an IP address lease renewal device, a network system and electronic equipment. Receiving, by a first device, a substitute lease renewal IP request sent by a second device, the first device establishing a connection with a wireless router; then obtaining IP configuration information of the second equipment, wherein the IP configuration information is distributed to the second equipment by the wireless router; then creating a DHCP broadcast packet based on the IP configuration information of the second equipment; and sending a renewal request comprising the DHCP broadcast packet to the wireless router at a regular time. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.

Description

IP address lease renewing method, device, network system and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to an IP address lease renewal method, an IP address lease renewal device, a network system, and an electronic device.
Background
DHCP (Dynamic Host Configuration Protocol) enables a server to dynamically provide IP (Internet Protocol) addresses to other hosts in a network, and may not set and maintain static IP addresses to any server in an Intranet except DHCP, DNS (Domain Name System) and WINS (Windows Internet Name Service) servers. The device containing the wireless network card can be connected to the wireless router through WiFi to be allocated to a dynamic IP address, but the dynamic IP addresses have lease time, and when the lease time of the IP address is up, the wireless router can recover the IP address and allocate the IP address to any device connected to the wireless router next time. In addition, when the device connects to the wireless router, it needs to go through four procedures of discover/offer/request/ack of the minimum DHCP, but due to the difference of the routers and the difference of the environment, the duration of each procedure of the DHCP is uncertain or some procedures of the DHCP are added, so that the whole DHCP procedure may be long in some scenarios.
Disclosure of Invention
In view of the above, embodiments of the present application provide a method, an apparatus, a network system, and an electronic device for renewing an IP address, so as to improve the above problem.
In a first aspect, an embodiment of the present application provides an IP address lease renewal method, which is applied to a first device, and the method includes: the method comprises the steps that a first device receives a substitute lease renewal IP request sent by a second device, and the first device is connected with a wireless router; acquiring IP configuration information of second equipment, wherein the IP configuration information is distributed to the second equipment by a wireless router; creating a DHCP broadcast packet based on the IP configuration information of the second device; a renewal request including a DHCP broadcast packet is periodically sent to the wireless router.
In a second aspect, an embodiment of the present application provides an IP address renewal method, which is applied to a second device, and the method includes: the second equipment detects whether an instruction for triggering to enter an unconnected state exists, and the second equipment is disconnected from the wireless router in the unconnected state; if the second equipment detects that an instruction for triggering to enter the non-networking state exists, the second equipment replaces the lease renewal IP request for the first equipment, wherein the first equipment establishes network connection with the wireless router, and the lease renewal IP request is used for requesting lease renewal of an IP address of the second equipment; the second device enters an unconnected state.
In a third aspect, an embodiment of the present application provides an IP address renewal method, including: the second equipment detects whether an instruction for triggering to enter an unconnected state exists, and the second equipment is disconnected from the wireless router in the unconnected state; if the second equipment detects that an instruction for triggering to enter the non-networking state exists, the second equipment sends a substitute lease renewing IP request to the first equipment, wherein the substitute lease renewing IP request is used for requesting lease renewal of an IP address of the second equipment; the method comprises the steps that a first device receives a substitute lease renewal IP request sent by a second device, and the first device is connected with a wireless router; the first equipment acquires IP configuration information of the second equipment, and the IP configuration information is distributed to the second equipment by the wireless router; the first equipment creates a DHCP broadcast packet based on the IP configuration information of the second equipment; the method comprises the steps that a first device sends a lease renewal request comprising a DHCP broadcast packet to a wireless router periodically; the second device enters an unconnected state.
In a fourth aspect, an embodiment of the present application provides an IP address renewal apparatus, which runs on a first device, and includes: the request receiving module is used for receiving the alternative lease renewal IP request sent by the second equipment by the first equipment, and the first equipment establishes connection with the wireless router; the information acquisition module is used for acquiring the IP configuration information of the second equipment by the first equipment, and the IP configuration information is distributed to the second equipment by the wireless router; the data creating module is used for creating a DHCP broadcast packet by the first equipment based on the IP configuration information of the second equipment; and the request sending module is used for sending a lease renewing request comprising a DHCP broadcast packet to the wireless router by the first equipment at regular intervals.
In a fifth aspect, an embodiment of the present application provides an IP address renewal apparatus, operating in a second device, including: the instruction detection module is used for detecting whether an instruction for triggering the second equipment to enter the non-networking state exists or not, and the second equipment is disconnected from the wireless router in the non-networking state; the request sending module is used for sending a substitute lease renewal IP request to the first equipment if the second equipment detects that an instruction for triggering to enter an unconnected state is detected, wherein the first equipment establishes network connection with the wireless router, and the substitute lease renewal IP request is used for requesting lease renewal of an IP address of the second equipment; and the power-down module is used for enabling the second equipment to enter the non-networking state.
In a sixth aspect, an embodiment of the present application provides a network system, which includes a first device, a wireless router, and a second device, where the first device is connected to the wireless router. The second equipment is used for detecting whether an instruction for triggering to enter an unconnected state exists or not, and the second equipment is disconnected from the wireless router in the unconnected state; the second device is further configured to send, to the first device, a substitute lease renewal IP request if the second device detects an instruction to trigger entry into an unconnected state, where the substitute lease renewal IP request is used to request lease renewal of an IP address of the second device; the first equipment is used for receiving the substitute lease renewal IP request sent by the second equipment, and the first equipment establishes connection with the wireless router; the first device is also used for acquiring IP configuration information of the second device, and the IP configuration information is distributed to the second device by the wireless router; the first device is also used for creating a DHCP broadcast packet based on the IP configuration information of the second device; the first equipment is also used for periodically sending a lease renewing request comprising a DHCP broadcast packet to the wireless router; the second device is also used to enter an unconnected state.
In a seventh aspect, an embodiment of the present application provides an electronic device, including a memory and one or more processors, where one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the IP address renewal method set forth in the first aspect.
In an eighth aspect, an embodiment of the present application provides an electronic device, including a memory and one or more processors, where one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the IP address renewal method set forth in the second aspect.
In a ninth aspect, embodiments of the present application provide a computer-readable storage medium having program codes stored therein, where the above-mentioned IP address renewal method is performed when the program codes are loaded and executed by a processor.
Compared with the prior art, the IP address renewal method, the IP address renewal device, the electronic equipment and the storage medium are provided by the embodiment of the application. When the second device finishes work and is about to sleep or power off, a substitute lease renewal IP request is sent to the first device, then the first device receives the request and replaces the second device to send a lease renewal IP request of the second device to the wireless router, and then lease renewal and keep-alive of the dynamic IP of the second device are realized according to a lease renewal confirmation signal returned by the wireless router. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.
In order to make the aforementioned and other objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating dynamic IP address acquisition in an existing DHCP system;
fig. 2 is a schematic diagram illustrating a network system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating an interaction process of an IP address renewal method according to an embodiment of the present application;
FIG. 4 shows a block diagram of a first device in a specific example of the method of FIG. 3;
FIG. 5 shows a block diagram of a second device in a specific example of the method of FIG. 3;
fig. 6 is a flowchart illustrating a second device in fig. 5 sending an alternative IP renewal request to the first device in fig. 4;
FIG. 7 is a flowchart illustrating the first device in FIG. 4 receiving an IP address lease renew acknowledgement from the wireless router;
fig. 8 is a flowchart illustrating the second device in fig. 5 sending a terminate alternate renewal IP request to the first device in fig. 4;
fig. 9 is a flowchart illustrating an IP address renewal method according to an embodiment of the present application;
fig. 10 is a flowchart illustrating another IP address renewal method provided by an embodiment of the present application;
fig. 11 is a block diagram illustrating a structure of an IP address renewal apparatus according to an embodiment of the present application;
fig. 12 is a block diagram illustrating an architecture of another IP address renewal apparatus according to an embodiment of the present application;
fig. 13 shows a block diagram of an electronic device according to an embodiment of the present application;
fig. 14 illustrates a storage unit according to an embodiment of the present application, configured to store or carry program code for implementing an IP address renewal method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
DHCP is generally applied to a large-scale local area network environment, and mainly functions to centrally manage and allocate IP addresses, so that a host in the network environment dynamically obtains information such as IP addresses, Gateway addresses, DNS server addresses, and the like, and can improve the utilization rate of the addresses.
In order to better understand the technical solution provided by the embodiment of the present application, the following briefly describes an IP address dynamic acquisition procedure in a DHCP system.
Referring to fig. 1, in the DHCP system, the process of the DHCP client dynamically obtaining the IP address from the DHCP server mainly includes:
the DHCP client broadcasts a DHCP Discover message to find an available DHCP server in the network. After receiving the DHCP Discover message, the DHCP server allocates an IP address to the DHCP client, and responds to the DHCP client with a DHCP Offer message carrying the IP address. After receiving the DHCP Offer message, the DHCP client broadcasts and sends a DHCP Request message. After receiving the DHCP Request message, the DHCP server responds a DHCP ACK message to the DHCP client. After receiving the DHCP Request message, the DHCP server may obtain an IP address carried in the DHCP Request message, and determine whether the IP address is an IP address allocated to the DHCP client by the current DHCP server. If yes, the DHCP server further confirms whether the IP address is allocated to the DHCP client side, and if yes, the DHCP server sends a DHCP ACK message to the DHCP client side to inform the DHCP client side that the IP address is available; otherwise, the DHCP server sends a DHCP NAK message to the DHCP client side to inform the DHCP client side that the IP address is unavailable.
When the DHCP client needs to dynamically allocate the IP address with the lease term, the IP address dynamically allocated to the DHCP client by the DHCP server has the lease term, and before the lease term expires, the DHCP client can send a DHCP Request message to the DHCP server in a unicast mode to apply for prolonging the lease term. However, if the DHCP client does not apply for the extended lease period to the DHCP server before the lease period expires, the DHCP server may delete the lease information corresponding to the DHCP client, withdraw the IP address assigned to the DHCP client, and assign the IP address to any DHCP client that connects to the DHCP server next time. Therefore, once the lease term of the IP address is over, the dynamic IP address allocated when the original DHCP client connects to the DHCP server again may not be the original IP address. In addition, for a device that needs to be powered on, i.e. to connect to a wireless router and perform wireless communication, the complete DHCP connection procedure cannot guarantee fast connection.
Therefore, after finding that the dynamic IP has a lease period and is difficult to keep unchanged and the device cannot be connected to the wireless router quickly, which brings inconvenience to the user, the inventor proposes an IP address lease renewal method, apparatus, network system and electronic device in the embodiments of the present application, which can realize that the device can be connected to the wireless router quickly and assigned to the same dynamic IP address as that of the last operation each time the device is powered on without powering off or resetting the wireless router.
For the convenience of describing the scheme of the present application in detail, the following description will first describe an application environment in the embodiments of the present application with reference to the drawings.
Referring to fig. 2, a network system 10 according to an embodiment of the present application is provided, where the network system 10 includes: a second device 11, a first device 12, a wireless router 13, and a cloud 14. As one mode, the second device 11 is generally a low power device, such as a low power battery camera, a human body sensor, a door and window sensor, a temperature and humidity sensor, a water sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a smart socket, a wireless switch, a wireless wall switch, a magic cube controller, a curtain motor, an air conditioner partner, and other smart devices, which are not limited herein.
The second device 11 only works for several minutes or even ten seconds under a certain trigger (for example, the first device 12 sends an instruction to wake up the second device 11 to work through a wireless communication mode such as WiFi, ZigBee or bluetooth, or triggers an instruction on the body of the second device 11 such as a key, sensor detection, timed wake-up), and connects to the wireless router 13 at the short time, and processes wireless related work such as uploading video or pictures to the cloud 14, and sending messages to a client through the cloud 14.
Alternatively, the first device 12 may be a gateway, a webcam, etc., and the first device 12 is in a long electrical operating state and remains connected to the wireless router 13 at all times. It should be noted that the cloud 14 in the embodiment of the present application may be one of servers.
Optionally, the first device 12 and the second device 11 are connected to the wireless router 13 through a local area network, so as to perform data communication with the cloud 14, and as a mode, the local area network may include a ZigBee technology, WIFI or bluetooth, or the like. Data exchange between the first device 12 and the second device 11 may be performed via a local area network. Optionally, both the first device 12 and the second device 11 store program data including a DHCP client.
In the embodiment of the present application, in order to ensure that the second device 11 can be allocated with the same dynamic IP address as that in the last working and can be connected to the wireless router 13 quickly when the second device 11 is in the dormant or power-down state in the next working, the dynamic IP of the second device 11 needs to keep the corresponding relationship between the IP address and the Mac address at the wireless router 13 end as the dynamic IP of the first device 12, and based on this situation, when it is detected that the lease of the second device is about to be longer than the first preset lease or the remaining lease of the second device is less than the second preset lease (for example, the remaining lease of the second device is less than 50% of the lease, the first preset lease and the second preset lease are set according to actual situations), the first device 12 needs to replace the second device 11 to perform lease work of the dynamic IP address under the situation that the second device 11 is dormant or power-down, that is, the first device 12 replaces the second device 11 to send a replacement lease renewing IP request to the wireless router, so as to renew and keep alive the dynamic IP of the second device 11, and simultaneously, the second device 11 can be connected to the wireless router 13 quickly when working again.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, a flowchart of an interaction process of an IP address renewal method according to an embodiment of the present application is shown, where the embodiment provides an IP address renewal method, including:
step S110: and the second equipment detects whether an instruction for triggering to enter an unconnected state exists, and the second equipment is disconnected from the wireless router in the unconnected state.
It should be noted that, when the second device is connected to the wireless router for the first time, the second device may obtain the dynamic IP address assigned to the second device by the wireless router, in this case, lease information corresponding to the second device already exists in the wireless router, where the IP address in the lease information is the dynamically assigned IP address. In addition, the wireless router will bind the Mac address of the second device with its dynamic IP address.
Optionally, the second device may include a detection module, and the detection module may be configured to detect whether there is an instruction triggering a change of the networking state of the second device. The instruction may be triggered by control of an external device, for example, the second device receives a sleep instruction sent by the external device, and the sleep instruction may trigger to change the second device from a connected state to an unconnected state, where the external device may be a mobile phone, a tablet computer, or other connected devices with a mobile communication function, and is not limited herein. For example, when the second device is bound to the mobile phone client, the mobile phone client may control the networking state of the second device, and when the mobile phone responds to a sleep trigger operation of the second device of the user, the mobile phone may send a sleep instruction to the second device.
Alternatively, if the second device stores an internal event, the internal event may trigger the instruction. The internal event may be a timed sleep command or a work completion instant sleep command. For example, assuming that a work completion sleep command is stored in the second device, the working time of the second device is very short, and only a few minutes or a few tens of seconds are needed, and when the second device completes a certain work, the work completion sleep command may be triggered, so that a change of the networking state of the second device may be triggered.
Optionally, when detecting that the second device has an instruction triggering entry into the unconnected state, the second device is about to enter a sleep or power-down state, and in this case, the second device disconnects the network from the wireless router. When the second device is disconnected from the wireless router, the second device can be powered off briefly, so that energy consumption can be reduced.
Step S120: and if the second equipment detects that the instruction for triggering to enter the unconnected state exists, the second equipment sends a substitute lease renewal IP request to the first equipment.
When the second device is in an unconnected state and a lease period of a dynamic IP of the second device is about to expire, the second device cannot complete applying for lease renewal to the wireless router, so when the second device is about to enter an unconnected state, the second device sends a substitute lease renewal IP request to the first device, and the substitute lease renewal IP request is used for instructing the first device to complete lease renewal and keep-alive work of the dynamic IP address of the second device in place of the second device.
Optionally, in this embodiment of the application, before the second device sends the alternative lease renewing IP request to the first device, the second device detects whether the alternative lease renewing IP request is sent to the first device, and if the alternative lease renewing IP request is sent, the alternative lease renewing IP request does not include the IP configuration information of the second device; otherwise, the substitute lease renewal IP request includes the IP configuration information of the second device. The IP configuration information of the second device may include a dynamic IP address, a Mac address, and an IP lease of the second device.
If the second device carries the IP configuration information in the alternative lease renewal IP request sent to the first device each time, the energy consumption of the second device will be increased, and the service life of the battery of the second device will be shortened at the same time. In order to improve the problem and achieve the effects of reducing the energy consumption of the second device and further prolonging the service life of the battery of the second device, as a mode, if the first time is sending, the IP configuration information is carried instead of the lease renewal IP request; if the request is not sent for the first time, the IP configuration information can not be carried instead of the lease renewal IP request.
The second device may determine whether the alternative lease renewal IP request is sent to the first device in a variety of ways, such as:
optionally, the second device may be configured with a request sending storage area, where a list of alternative lease renewal IP request information records sent by the second device is stored in the storage area, and by searching the list, if an information record of an alternative lease renewal IP request sent to the first device is found, it may be determined that the information record is not sent for the first time, and the alternative lease renewal IP request may not carry IP configuration information; if the information record of the alternative lease renewing IP request sent to the first device is not found, it can be determined that the information record is sent for the first time, and the IP configuration information is carried in the alternative lease renewing IP request.
It should be noted that, if the IP configuration information of the second device is changed, the second device needs to carry the IP configuration information of the second device again when sending the replacement lease renewal IP request to the first device.
Step S130: and the first equipment receives the alternative lease renewing IP request sent by the second equipment, and the first equipment establishes connection with the wireless router.
The first device receives the alternative lease renewal IP request sent by the second device, establishes network connection with the wireless router and is in a long-term operation state.
Step S140: and the first equipment acquires the IP configuration information of the second equipment, and the IP configuration information is distributed to the second equipment by the wireless router.
As one mode, the step of acquiring, by the first device, the IP configuration information of the second device may include: if the alternative lease renewing IP request is detected to carry the IP configuration information, acquiring the IP configuration information of the second equipment from the alternative lease renewing IP request; and if the alternative lease renewing IP request is detected not to carry the IP configuration information and the IP configuration information is locally stored, acquiring the IP configuration information of the second equipment from the local. Wherein the IP configuration information is assigned to the second device by the wireless router.
As a manner, if the second device sends the alternative lease renewal IP request to the first device for the first time, the alternative lease renewal IP request carries the IP configuration information of the second device, and the first device may obtain the IP configuration information of the second device from the alternative lease renewal IP request.
As another way, if the second device does not send the substitute lease renewal IP request to the first device for the first time, and the local storage of the first device stores the IP configuration information of the second device, the first device may obtain the IP configuration information of the second device from the local storage.
It should be noted that the first device may identify whether the replacement lease renewal IP request is sent for the first time by: first, the first device may identify the alternative lease renewing IP request, detect whether the alternative lease renewing IP request includes the IP configuration information of the second device, and as a manner, if the alternative lease renewing IP request does not include the IP configuration information, it may be determined that the alternative lease renewing IP request is not sent for the first time.
Alternatively, if it is detected that the IP configuration information of the second device is included in the alternative renewal IP request, it may be determined that the alternative renewal IP request is transmitted for the first time. It should be noted that, if the IP configuration information is carried in the alternative lease renewal IP request that is first sent by the second device to the first device, but the IP configuration information of the second device is not recorded in the first device due to reasons such as sudden power failure of the second device, the alternative lease renewal IP request that is sent to the first device when the second device performs networking operation again may also be determined to be sent for the first time.
Step S150: the first device creates a DHCP broadcast packet based on the IP configuration information of the second device.
As one way, the first device may create a DHCP broadcast packet based on the dynamic IP address of the second device and the Mac address, and optionally, the DHCP broadcast packet is sent in a Request manner.
Step S160: the first device periodically sends a renewal request including the DHCP broadcast packet to the wireless router.
Alternatively, the manner how the first device periodically sends the renewal request including the DHCP broadcast packet to the wireless router may be described as follows:
as one way, the first device may preselect for a certain time, for example, when it is detected that the lease of the second device is about to be greater than the first preset lease or the moment that the remaining lease of the second device is less than the second preset lease, a lease renewal request including a DHCP broadcast packet may be automatically and periodically sent to the wireless router instead of the second device by starting a thread, so as to renew and keep alive the dynamic IP address of the second device. When it is detected that the lease of the second device is about to be greater than the first preset lease or the remaining lease of the second device is less than the second preset lease, the lease may be set to other times as long as the lease of the second device is satisfied before the lease of the second device expires.
As another way, when the first device detects that the number of devices connected to the wireless router is increased, which may cause the network signal quality of the second device to be degraded, the first device may send a lease renewing request including a DHCP broadcast packet to the wireless router in time by starting a thread instead of the second device, so as to renewedly lease and keep alive the dynamic IP address of the second device.
Optionally, after the first device periodically sends the lease renewal request including the DHCP broadcast packet to the wireless router, the method further includes: and after the first device receives a lease renewal confirmation signal returned by the wireless router in response to the lease renewal request, the dynamic IP address of the second device can be regarded as successful lease renewal, so that lease renewal and keep-alive of the dynamic IP of the second device are realized.
Step S170: the second device enters the non-networked state.
Alternatively, the second device may enter an un-networked state, such as a brief hibernation or power-down state, after sending the terminate-substitute-lease-renew IP request.
Optionally, when the second device succeeds in lease renewal keep-alive based on the foregoing manner, since the wireless router does not withdraw the IP address originally assigned to the second device, the second device may be directly and quickly connected to the wireless router after the second device wakes up from a sleep or power-down state, so as to communicate with the wireless router.
As a mode, when the second device responds to the trigger operation of the awake state, the second device may send an IP request for terminating lease renewal to the first device through ZigBee/WiFi/bluetooth or the like. Optionally, the first device receives an IP request for renewing lease termination sent by the second device, and the first device responds to the IP request for renewing lease termination and periodically sends a lease renewal request including a DHCP broadcast packet to the wireless router. For example, if the first device realizes the lease renewal keep-alive work of the second device for the dynamic IP address through the opened thread, after receiving the lease renewal termination request sent by the second device, the first device ends the opened thread to stop the lease renewal keep-alive work of the second device for the dynamic IP address, so that the energy consumption of the second device in the non-network connected state can be reduced, and the purpose of saving power can be achieved.
The following describes the present embodiment by taking fig. 4, fig. 5, fig. 6, fig. 7, and fig. 8 as an example:
referring to fig. 4, a block diagram of a first device 12 suitable for use in embodiments of the present application is shown. As shown in fig. 4, the first device 12 may include a master control unit 121, a WiFi module 122, and other wireless modules 123 (e.g., ZigBee or bluetooth, etc.), wherein the WiFi module 122 is coupled to the master control unit 121, and the wireless modules 123 are coupled to the master control unit 121. As a way, the WiFi module 122 can be in data communication with the wireless router, and the WiFi module 122 is always connected with the wireless router, and the wireless module can be used for data communication with the corresponding wireless module 111 in fig. 5.
Referring to fig. 5, a block diagram of a second device 11 suitable for use in embodiments of the present application is shown. As shown in fig. 5, the second device 11 may include a wireless module 111 (e.g., ZigBee, bluetooth, etc.), a microcontroller 112, a WiFi module 113, and a master control module 114. The wireless module 111 is coupled to the microcontroller 112, the microcontroller 112 is coupled to the main control module 114, and the WiFi module 113 is coupled to the main control module 114.
The Microcontroller 112 is composed of an MCU (micro controller Unit) and a low power consumption part of peripheral peripherals, and the main control module 114 is composed of a Soc (System on Chip) and peripheral peripherals. Optionally, the peripheral device around the MCU includes a PIR (Passive Infra Red, electric infrared sensor), a Battery, and a Button; peripheral devices around the Soc include an Image Sensor (Image Sensor), a NAND (flash memory), a DDR (double data rate synchronous dynamic random access memory), and the like. The power consumption of the main control module 114 is higher than that of the MCU and peripheral devices.
In one way, when the first device 11 is in the non-networking state, only the microcontroller 112 of the first device 11 is always in the low power consumption mode, and the main control module 114 is in the power-down or sleep state, when the microcontroller 112 responds to a trigger operation instruction (e.g., key trigger, infrared detection, ZigBee or bluetooth trigger, etc. to wake up the main control module 114) acting on the first device 11, the microcontroller 112 may control the battery to supply power to the main control module 114, so that the main control module 114 may wake up from the sleep state, so that the first device 11 may quickly connect to the wireless router and perform data communication with the outside.
Assuming that the first device 12 is device a and the second device 11 is device B, the following detailed description will be made of a process in which, when device B is in an unconnected state, device B sends an alternative lease renewal IP request to device a and device a sends an alternative lease renewal IP request to the wireless router:
referring to fig. 6, when device B connects to wireless router 15 (see fig. 7) for the first time, a dynamic IP is obtained, wherein the dynamic IP has a lease time limit, and if device B does not request renewal of lease to wireless router 15 beyond the time limit, wireless router 15 will reclaim the dynamic IP after expiration and assign the IP to any device that will connect to wireless router 15 next time. And the device B belongs to a low-power consumption device, and when the lease renewal is needed, the device B is in an unconnected state, so that the optimal lease renewal time is missed. Therefore, in order to ensure that device B can be allocated the same dynamic IP address as the last time when it is next networking operation, so that device B can quickly connect to wireless router 15, as shown in fig. 6, when it is detected that the IP address lease of device B is about to be greater than the first preset lease or the remaining lease of the second device is less than the second preset lease, device B may send an alternative lease renewal IP request to device a, where the alternative lease renewal IP request is used to request device a to send the alternative lease IP request to wireless router 15 instead of device B when device B is in an unconnected state.
As a manner, if the device B sends a substitute lease renewal IP request to the device a for the first time, the substitute lease renewal IP request may carry the IP configuration information of the device B, that is, the dynamic IP address of the device B, the lease of the IP address, and the Mac address; as another mode, if the device B sends an alternative lease renewal IP request to the device a and the device a locally stores the IP configuration information of the device B, the alternative lease renewal IP request does not carry the dynamic IP address of the device B, the lease of the IP address, and the Mac address. As one approach, the substitute renewal IP request may be sent by WiFi module 113 of device B to WiFi module 122 of device a.
As one way, referring to fig. 7, after device a receives the alternative lease renewal IP Request sent by device B, device B creates a DHCP Request broadcast packet with the dynamic IP address and the Mac address of device B, and then sends the alternative lease renewal IP Request to wireless router 15 in the form of a DHCP Request broadcast, and if device B succeeds in lease renewal of the dynamic IP address, device a receives an ACK signal returned from wireless router 15, that is, an IP address lease renewal acknowledgement signal of device B.
Referring to fig. 8, as a manner, when the device B is in a triggering operation of a wake-up command, the device B may send a request for terminating the lease renewal IP to the device a through the wireless module 111 (e.g., WiFi/ZigBee/bluetooth, etc.), and the wireless module 123 (e.g., WiFi/ZigBee/bluetooth, etc.) of the device a receives the request for terminating the lease renewal IP, and stops the lease renewal and keep alive work of the dynamic IP address of the device B by the substitute device B.
Optionally, after the device B is awakened from the hibernation state or the power-down state, because the operating environment maintains the state before the hibernation state, and in this case, the wireless router also maintains the original dynamic IP, the WiFi module 113 of the device B may directly connect and communicate with the wireless router 15, so that the device B may be allocated the same dynamic IP address as the previous dynamic IP address when performing the networking operation again, and may be quickly connected to the wireless router.
In the IP address lease renewing method provided in this embodiment, when the second device completes work and is going to be dormant or powered off, a substitute lease renewing IP request is sent to the first device, then the first device receives the request and sends a lease renewing IP request of the second device to the wireless router instead of the second device, and then lease renewing and keep-alive of the dynamic IP of the second device is realized according to a lease renewing confirmation signal returned by the wireless router. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.
Referring to fig. 9, a flowchart of an IP address renewal method according to an embodiment of the present application is shown, where the embodiment provides an IP address renewal method, including:
step S210: and the first equipment receives the alternative lease renewing IP request sent by the second equipment, and the first equipment establishes connection with the wireless router.
Step S220: and acquiring IP configuration information of the second equipment, wherein the IP configuration information is distributed to the second equipment by the wireless router.
Step S230: and creating a DHCP broadcast packet based on the IP configuration information of the second equipment.
Step S240: periodically sending a renewal request including the DHCP broadcast packet to the wireless router.
In the IP address lease renewing method provided in this embodiment, when the second device completes work and is going to be dormant or powered off, a substitute lease renewing IP request is sent to the first device, then the first device receives the request and sends a lease renewing IP request of the second device to the wireless router instead of the second device, and then lease renewing and keep-alive of the dynamic IP of the second device is realized according to a lease renewing confirmation signal returned by the wireless router. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.
Referring to fig. 10, a flowchart of an IP address renewal method according to an embodiment of the present application is shown, where the embodiment provides an IP address renewal method, including:
step S310: and the second equipment detects whether an instruction for triggering to enter an unconnected state exists, and the second equipment is disconnected from the wireless router in the unconnected state.
Step S320: and if the second device detects that the instruction for triggering the non-network connection state is sent, the second device sends a substitute lease renewal IP request to the first device, wherein the first device establishes network connection with the wireless router, and the substitute lease renewal IP request is used for requesting lease renewal of an IP address of the second device.
Step S330: the second device enters the non-networked state.
In the IP address lease renewing method provided in this embodiment, when the second device completes work and is going to be dormant or powered off, a substitute lease renewing IP request is sent to the first device, then the first device receives the request and sends a lease renewing IP request of the second device to the wireless router instead of the second device, and then lease renewing and keep-alive of the dynamic IP of the second device is realized according to a lease renewing confirmation signal returned by the wireless router. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.
Referring to fig. 11, which is a block diagram illustrating an IP address lease renewal apparatus according to an embodiment of the present disclosure, in this embodiment, an IP address lease renewal apparatus 400 operating on a first device is provided, where the IP address lease renewal apparatus 400 includes: a request receiving module 410, an information obtaining module 420, a data creating module 430, and a request sending module 440.
A request receiving module 410, configured to receive, by the first device, an alternative lease renewal IP request sent by a second device, where the first device establishes a connection with a wireless router.
An information obtaining module 420, configured to obtain, by the first device, IP configuration information of the second device, where the IP configuration information is allocated to the second device by the wireless router.
A data creating module 430, configured to create, by the first device, a DHCP broadcast packet based on the IP configuration information of the second device.
A request sending module 440, configured to periodically send a lease renewal request including the DHCP broadcast packet to the wireless router by the first device.
Optionally, the IP address renewal apparatus 400 further includes a signal receiving module, which is specifically configured to receive, by the first device, a renewal confirmation signal returned by the wireless router in response to the renewal request.
Optionally, the IP address lease renewal apparatus 400 further includes an end request module, which is specifically configured to receive, by the first device, an IP request for lease renewal termination sent by the second device, and respond to the IP request for lease renewal termination, and terminate the lease renewal request including the DHCP broadcast packet periodically sent to the wireless router.
In the IP address lease renewing apparatus provided in this embodiment, when the second device completes the work and is going to be dormant or powered off, the substitute lease renewing IP request is sent to the first device, then the first device receives the request and sends the lease renewing IP request of the second device to the wireless router instead of the second device, and then lease renewing and keep-alive of the dynamic IP of the second device is realized according to a lease renewing confirmation signal returned by the wireless router. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.
Referring to fig. 12, which is a block diagram illustrating an IP address lease renewal apparatus according to an embodiment of the present application, in this embodiment, an IP address lease renewal apparatus 500 operating on a second device is provided, where the IP address lease renewal apparatus 500 includes: an instruction detection module 510, a request transmission module 520, and a power down module 530.
An instruction detecting module 510, configured to detect whether there is an instruction for triggering entry into an unconnected state, where the second device and the wireless router are disconnected from each other in the unconnected state.
Optionally, the IP address renewal apparatus 500 further includes a detection module, where the detection module may be configured to detect, by the second device, whether the alternative renewal IP request is sent to the first device, and if the alternative renewal IP request is sent, the alternative renewal IP request does not include the IP configuration information of the second device; otherwise, the IP configuration information of the second device is included in the replacing lease renewing IP request.
A request sending module 520, configured to send, by the second device, an alternative lease renewing IP request to the first device if the second device detects that the instruction for triggering to enter the unconnected state is detected, where the first device establishes a network connection with the wireless router, and the alternative lease renewing IP request is used to request to renew the lease of the IP address of the second device.
A power down module 530 for the second device to enter the non-networked state.
Optionally, the IP address lease renewal apparatus 500 further includes a termination request sending module, where the termination request sending module is configured to send, by the second device, a termination lease renewal IP request to the first device in response to the wake-up instruction, and establish a network connection with the wireless router based on the IP configuration information of the second device, where the IP configuration information of the second device is allocated to the second device by the wireless router.
In the IP address lease renewing apparatus provided in this embodiment, when the second device completes the work and is going to be dormant or powered off, the substitute lease renewing IP request is sent to the first device, then the first device receives the request and sends the lease renewing IP request of the second device to the wireless router instead of the second device, and then lease renewing and keep-alive of the dynamic IP of the second device is realized according to a lease renewing confirmation signal returned by the wireless router. The method can realize that the second equipment can be allocated with the same dynamic IP address as the dynamic IP address in the last work, thereby being capable of being connected with the wireless router quickly, and reducing the power consumption of the second equipment and prolonging the service life of the battery during the dormancy and outage of the second equipment.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. Referring to fig. 13, a block diagram of an electronic device 100 applicable to the embodiments of the present application is shown, where the electronic device 100 may include a memory 104 and one or more processors 102, and the memory 104 and the processors 102 are connected by a communication line.
The memory 104 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for renewing IP addresses in the embodiment of the present application, and the processor 102 executes various functional applications and data processes, such as the method for renewing IP addresses provided by the embodiment of the present invention, by executing the software programs and modules stored in the memory 104.
The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. It will be appreciated that the configuration shown in FIG. 13 is merely illustrative, and that electronic device 100 may include more or fewer components than shown in FIG. 13, or have a different configuration than shown in FIG. 13. The components shown in fig. 13 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 14, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 600 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application 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; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. An IP address renewal method applied to a first device, the method comprising:
a first device receives an alternative lease renewing IP request sent by a second device, the first device establishes connection with a wireless router, the alternative lease renewing IP request is sent when the second device detects an instruction triggering entering into an unconnected state, and the alternative lease renewing request is used for indicating the first device to replace the second device to complete lease renewing and keep-alive work of an IP address of the second device; the second device is a low-power-consumption device, and after acquiring the sleep instruction, the second device acquires the instruction for triggering to enter the non-networking state; the first device is in a long electric operating state;
acquiring IP configuration information of the second equipment, wherein the IP configuration information is distributed to the second equipment by the wireless router;
creating a DHCP broadcast packet based on the IP configuration information of the second device;
periodically sending a renewal request including the DHCP broadcast packet to the wireless router;
receiving an IP request for ending lease renewal sent by the second equipment; when the second device is triggered to wake up, sending the request for terminating the renewal lease IP to the first device;
and in response to the termination lease renewal IP request, terminating the regular sending of lease renewal requests including the DHCP broadcast packets to the wireless router.
2. The IP address renewal method of claim 1, further comprising:
and the first equipment receives a lease renewing confirmation signal returned by the wireless router in response to the lease renewing request.
3. The IP address renewal method of claim 1, wherein the step of obtaining the IP configuration information of the second device comprises:
if the alternative lease renewing IP request is detected to carry the IP configuration information, acquiring the IP configuration information of the second equipment from the alternative lease renewing IP request;
and if the alternative lease renewing IP request is detected not to carry IP configuration information and the IP configuration information is locally stored, acquiring the IP configuration information of the second equipment from the local.
4. The IP address renewal method of claim 1, wherein the step of periodically sending a renewal request including the DHCP broadcast packet to the wireless router comprises:
and when detecting that the lease of the second equipment is greater than a first preset lease or the residual lease of the second equipment is less than a second preset lease, sending a lease renewal request comprising the DHCP broadcast packet to the wireless router.
5. An IP address renewal method applied to a second device, the method comprising:
the method comprises the steps that a second device detects whether an instruction for triggering to enter an unconnected state exists, and the second device is disconnected from a wireless router in the unconnected state; the second device is a low-power-consumption device, and after acquiring the sleep instruction, the second device acquires the instruction for triggering to enter the non-networking state;
if the second device detects that the instruction triggering the non-network connection state is sent, the second device sends a replacement lease renewing IP request to the first device, wherein the first device and the wireless router establish network connection, and the replacement lease renewing IP request is used for indicating the first device to replace the second device to complete lease renewing and keeping-alive work of an IP address of the second device; after receiving the alternative lease renewing IP request, the first device acquires the IP configuration information of the second device, creates a DHCP broadcast packet based on the IP configuration information of the second device, and periodically sends a lease renewing request comprising the DHCP broadcast packet to the wireless router; the first device is in a long electric operating state;
the second device entering the non-networked state;
responding to a wake-up instruction, sending an IP (Internet protocol) renewal terminating request to the first device, and establishing network connection with the wireless router based on IP configuration information of a second device, wherein the IP configuration information of the second device is allocated to the second device by the wireless router; the first device terminates the periodic transmission of the renewal request including the DHCP broadcast packet to the wireless router in response to the termination of the renewal IP request.
6. The IP address renewal method of claim 5, wherein the step of the second device sending an alternative renewal IP request to the first device is preceded by the step of:
the second equipment detects whether an alternative lease renewing IP request is sent to the first equipment or not, and if the alternative lease renewing IP request is sent, the alternative lease renewing IP request does not include the IP configuration information of the second equipment; otherwise, the substitute lease renewal IP request comprises the IP configuration information of the second device.
7. An IP address renewal method, the method comprising:
the method comprises the steps that a second device detects whether an instruction for triggering to enter an unconnected state exists, and the second device is disconnected from a wireless router in the unconnected state; the second device is a low-power-consumption device, and after acquiring the sleep instruction, the second device acquires the instruction for triggering to enter the non-networking state;
if the second device detects that the instruction for triggering to enter the unconnected state exists, the second device sends a replacement lease renewing IP request to the first device, wherein the replacement lease renewing IP request is used for indicating the first device to replace the second device to complete lease renewing and keep-alive work of an IP address of the second device; the first device is in a long electric operating state;
the first equipment receives an alternative lease renewing IP request sent by the second equipment, and the first equipment establishes connection with the wireless router;
the first equipment acquires IP configuration information of the second equipment, and the IP configuration information is distributed to the second equipment by the wireless router;
the first equipment creates a DHCP broadcast packet based on the IP configuration information of the second equipment;
the first device periodically sends a renewal request including the DHCP broadcast packet to the wireless router;
the second device entering the non-networked state;
the second equipment responds to the awakening instruction, sends an IP (Internet protocol) renewal stopping request to the first equipment, and establishes network connection with the wireless router based on the IP configuration information of the second equipment;
the first device terminates the periodic transmission of the lease renewal request including the DHCP broadcast packet to the wireless router in response to the received termination lease renewal IP request.
8. An IP address renewal apparatus, operating on a first device, comprising:
a request receiving module, configured to receive, by the first device, an alternative lease renewing IP request sent by a second device, where the first device establishes a connection with a wireless router, the alternative lease renewing IP request is sent by the second device when detecting an instruction that triggers entering an unconnected state, and the alternative lease renewing request is used to instruct the first device to complete lease renewing and keep-alive work of an IP address of the second device in place of the second device; the second device is a low-power-consumption device, and after acquiring the sleep instruction, the second device acquires the instruction for triggering to enter the non-networking state; the first device is in a long electric operating state;
an information obtaining module, configured to obtain, by the first device, IP configuration information of the second device, where the IP configuration information is allocated to the second device by the wireless router;
the data creating module is used for creating a DHCP broadcast packet by the first equipment based on the IP configuration information of the second equipment;
a request sending module, configured to periodically send a lease renewal request including the DHCP broadcast packet to the wireless router by the first device;
a termination request module, configured to receive an IP request for renewing lease termination sent by the second device, and respond to the IP request for renewing lease termination, terminate the lease renewal request including the DHCP broadcast packet periodically sent to the wireless router; and when the second device is triggered to wake up, sending the request for terminating the renewal lease IP to the first device.
9. An IP address renewal apparatus, operating on a second device, comprising:
the instruction detection module is used for detecting whether an instruction for triggering the second equipment to enter the unconnected state exists or not, and the second equipment is disconnected from the wireless router in the unconnected state; the second device is a low-power-consumption device, and after the second device acquires the sleep instruction, the second device triggers the instruction which triggers the non-networking state;
a request sending module, configured to send, by the second device, an alternative lease renewing IP request to the first device if the second device detects that the instruction for triggering to enter the unconnected state is detected, where the first device establishes a network connection with the wireless router, and the alternative lease renewing IP request is used to instruct the first device to replace the second device to complete lease renewing and keep-alive work of an IP address of the second device; after receiving the alternative lease renewing IP request, the first device acquires the IP configuration information of the second device, creates a DHCP broadcast packet based on the IP configuration information of the second device, and periodically sends a lease renewing request comprising the DHCP broadcast packet to the wireless router; the first device is in a long electric operating state;
a power down module for the second device to enter the non-networked state;
a termination request sending module, configured to send, in response to a wake-up instruction, an IP lease renewal termination request to the first device, and establish a network connection with the wireless router based on IP configuration information of a second device, where the IP configuration information of the second device is allocated to the second device by the wireless router; the first device terminates the periodic transmission of the renewal request including the DHCP broadcast packet to the wireless router in response to the termination of the renewal IP request.
10. A network system comprising a first device, a wireless router, and a second device, wherein the first device is connected to the wireless router:
the second equipment is used for detecting whether an instruction for triggering to enter an unconnected state exists or not, and the second equipment is disconnected from the wireless router in the unconnected state; the second device is a low-power-consumption device, and after acquiring the sleep instruction, the second device acquires the instruction for triggering to enter the non-networking state;
the second device is further configured to send, by the second device, an alternative lease renewing IP request to the first device if the second device detects that the instruction for triggering the entry into the unconnected state is provided, where the alternative lease renewing IP request is used to instruct the first device to complete lease renewing and keep-alive work of the IP address of the second device instead of the second device;
the first device is used for receiving an alternative lease renewing IP request sent by the second device, and the first device establishes connection with the wireless router; the first device is in a long electric operating state;
the first device is further configured to obtain IP configuration information of the second device, where the IP configuration information is allocated to the second device by the wireless router;
the first device is further used for creating a DHCP broadcast packet based on the IP configuration information of the second device;
the first device is further configured to periodically send a renewal request including the DHCP broadcast packet to the wireless router;
the second device is further to enter the non-networked state;
the second device is also used for responding to the awakening instruction, sending an IP renewal stopping request to the first device and establishing network connection with the wireless router based on the IP configuration information of the second device;
the first device is further configured to terminate periodically sending a lease renewal request including the DHCP broadcast packet to the wireless router in response to the terminate lease renewal IP request.
11. An electronic device comprising a memory, and one or more processors;
one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-4.
12. An electronic device comprising a memory, and one or more processors;
one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 5-6.
13. A computer-readable storage medium, having program code stored therein, wherein the program code when loaded and executed by a processor performs the method of any of claims 1-7.
CN201811360985.3A 2018-11-15 2018-11-15 IP address lease renewing method, device, network system and electronic equipment Active CN109327560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811360985.3A CN109327560B (en) 2018-11-15 2018-11-15 IP address lease renewing method, device, network system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811360985.3A CN109327560B (en) 2018-11-15 2018-11-15 IP address lease renewing method, device, network system and electronic equipment

Publications (2)

Publication Number Publication Date
CN109327560A CN109327560A (en) 2019-02-12
CN109327560B true CN109327560B (en) 2022-03-18

Family

ID=65258199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811360985.3A Active CN109327560B (en) 2018-11-15 2018-11-15 IP address lease renewing method, device, network system and electronic equipment

Country Status (1)

Country Link
CN (1) CN109327560B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586153B (en) * 2020-04-30 2023-08-29 北京达佳互联信息技术有限公司 Communication method and device for cloud platform
CN112118330A (en) * 2020-09-22 2020-12-22 青岛海信传媒网络技术有限公司 DHCP (dynamic host configuration protocol) network reconnection method and display equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812505A (en) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 Method and device for renewing lease of IP address of terminal equipment
CN108023969A (en) * 2016-11-02 2018-05-11 华为技术有限公司 A kind of IP address re-rents method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10361995B2 (en) * 2015-11-09 2019-07-23 International Business Machines Corporation Management of clustered and replicated systems in dynamic computing environments

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812505A (en) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 Method and device for renewing lease of IP address of terminal equipment
CN108023969A (en) * 2016-11-02 2018-05-11 华为技术有限公司 A kind of IP address re-rents method and device

Also Published As

Publication number Publication date
CN109327560A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
US8086886B2 (en) Group power management of network devices
US9198217B2 (en) Method for maintaining connection between terminal and network server, terminal and network server
US10602448B2 (en) Remote wakeup method, connection server, and networking apparatus having sleep mode
US9104406B2 (en) Network presence offloads to network interface
TWI388169B (en) Wireless communication device and its power saving method
US20230247388A1 (en) Communication system, method and device for miniature intelligent sensor
CN107968713B (en) Remote wake-up method, device and system
WO2015054892A1 (en) Method, device, and system for waking up access point device
WO2011129086A1 (en) Communication terminal and communication method
CN110557263B (en) Standby control method, system, terminal equipment and relay equipment
CN109327560B (en) IP address lease renewing method, device, network system and electronic equipment
EP2119132A1 (en) Cost reduction of nat connection state keep-alive
US20140161118A1 (en) Power save mechanism for low-power network devices
CN110012527B (en) Awakening method and electronic equipment
CN109816830B (en) Unlocking method and device
EP2575324A1 (en) A distributed operating system for sensor transparency
CN102571507A (en) Equipment wake-up method, dormant agent equipment and equipment wake-up system
CN102299944B (en) Method for automatically starting or awakening computer through network
CN109451354B (en) Terminal and method for awakening same
US9086880B2 (en) Communication device management apparatus, user device, and service device
EP3068112B1 (en) System and method for mac address acquisition
CN115883427A (en) Aging method and device for address conversion protocol table item and readable storage medium
CN113271356A (en) Remote awakening method, system and storage medium for terminal equipment
JP6950749B2 (en) Information processing device and information processing method
CN102377813A (en) Automatic power-on or awakening STB (set top box) and power-on or awakening method thereof

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