CN110933194A - Automatic address allocation method, equipment and system - Google Patents

Automatic address allocation method, equipment and system Download PDF

Info

Publication number
CN110933194A
CN110933194A CN201911072279.3A CN201911072279A CN110933194A CN 110933194 A CN110933194 A CN 110933194A CN 201911072279 A CN201911072279 A CN 201911072279A CN 110933194 A CN110933194 A CN 110933194A
Authority
CN
China
Prior art keywords
address
bottom layer
target
equipment
query request
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.)
Granted
Application number
CN201911072279.3A
Other languages
Chinese (zh)
Other versions
CN110933194B (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201911072279.3A priority Critical patent/CN110933194B/en
Publication of CN110933194A publication Critical patent/CN110933194A/en
Application granted granted Critical
Publication of CN110933194B publication Critical patent/CN110933194B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • 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/5092Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use

Abstract

The invention discloses an address automatic allocation method, equipment and a system. Wherein, the method comprises the following steps: issuing a query request, wherein the query request carries an identifier of a target bottom layer device; responding to a first response message of the target bottom layer equipment aiming at the query request, and determining the address of the target bottom layer equipment; and issuing the address of the target bottom layer equipment. By the invention, the upper control equipment issues the query request carrying the identification of the target bottom layer equipment, and if the response of the target bottom layer equipment is received, the target bottom layer equipment is confirmed to be capable of normally communicating, and the corresponding address is determined and issued. Therefore, the upper control equipment establishes contact with the bottom equipment through the bottom equipment identifier, automatically allocates addresses for the bottom equipment, does not need to manually allocate addresses to each bottom equipment, is simple to operate, effectively avoids the problem of repeated addresses of the bottom equipment, and can accurately control each bottom equipment.

Description

Automatic address allocation method, equipment and system
Technical Field
The invention relates to the technical field of address allocation, in particular to an automatic address allocation method, device and system.
Background
In the electric power peak regulation control system, an upper layer control device is connected with a gateway device, different bottom layer devices are distributed below the gateway device, and the gateway device can communicate with the bottom layer devices. In order to ensure that the upper layer control device can accurately monitor the corresponding bottom layer device, a unique address needs to be allocated to each bottom layer device.
At present, addresses are manually assigned to the bottom layer equipment, for example, the addresses are set through a dial switch in the bottom layer equipment, or the addresses are set through a key input mode or a touch input mode, so that the operation is complicated, address repetition may occur, and normal control of the equipment is affected.
Aiming at the problems that the manual address allocation operation is complicated and repeated addresses may occur in the prior art, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides an automatic address allocation method, equipment and a system, which are used for solving the problems that in the prior art, the operation of manually allocating addresses is complicated and repeated addresses may occur.
In order to solve the above technical problem, an embodiment of the present invention provides an address allocation method, where the method is applied to an upper control device, and the method includes: issuing a query request, wherein the query request carries an identifier of a target bottom layer device; responding to a first response message of the target bottom layer equipment aiming at the query request, and determining the address of the target bottom layer equipment; and issuing the address of the target bottom layer equipment.
Optionally, before issuing the query request, the method further includes: receiving device information, wherein the device information comprises: the position of the target bottom layer equipment and the identification of the target bottom layer equipment; and determining the gateway equipment corresponding to the region to which the target bottom layer equipment belongs according to the position of the target bottom layer equipment.
Optionally, issuing the query request includes: and issuing the query request to the gateway equipment according to the address of the gateway equipment so as to send the query request to the target bottom layer equipment through the gateway equipment.
Optionally, determining an address of the target underlying device in response to the first reply message of the target underlying device to the query request includes: receiving the first response message uploaded by the gateway equipment; and responding to the first response message, and determining the address of the target bottom layer equipment according to a preset rule.
Optionally, determining the address of the target underlying device according to a preset rule includes: acquiring the maximum value of the bottom layer equipment address corresponding to the gateway equipment; and carrying out preset operation on the maximum value to obtain the address of the target bottom layer equipment.
Optionally, the issuing the address of the target underlying device includes: constructing the identification of the target bottom layer equipment and the address of the target bottom layer equipment into an address allocation message; and issuing the address allocation message to gateway equipment so as to send the address of the target bottom layer equipment to the target bottom layer equipment through the gateway equipment.
Optionally, after issuing the address of the target underlying device, the method further includes: receiving a second response message uploaded by the gateway device, wherein the second response message is a response of the target underlying device to the address allocation message; and reporting an address allocation success message to the terminal according to the second response message.
The embodiment of the invention also provides an address allocation method, which is applied to gateway equipment and comprises the following steps: sending a query request to target bottom layer equipment, wherein the query request carries an identifier of the target bottom layer equipment; uploading a first response message of the target bottom layer device to an upper layer control device, wherein the first response message is specific to the query request; and when the address of the target bottom layer equipment is received, storing the address and sending the address to the target bottom layer equipment.
Optionally, sending the query request to the target underlying device includes: receiving the query request issued by the upper control device; and sending the query request to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the query request and respond to the query request.
Optionally, when receiving the address of the target bottom layer device, saving the address, and sending the address to the target bottom layer device, including: receiving an address allocation message issued by the upper control device, wherein the address allocation message includes: the identification of the target bottom layer equipment and the address of the target bottom layer equipment; saving the address according to the address allocation message; and sending the address allocation message to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the address allocation message, respond to the address allocation message and store the address.
Optionally, after sending the address assignment message to all bottom layer devices in the target area of the gateway device, the method further includes: receiving a second response message of the target bottom layer equipment aiming at the address allocation message; and uploading the second response message to the upper control equipment.
The embodiment of the invention also provides an address allocation method, which is applied to the bottom layer equipment and comprises the following steps: receiving a query request; responding according to the identification of the target bottom layer equipment carried in the query request; receiving an address allocation message, wherein the address allocation message comprises an identifier of the target underlying device and an address of the target underlying device; and storing the address according to the identification of the target bottom layer equipment in the address allocation message.
Optionally, responding according to the identifier of the target bottom device carried in the query request includes: judging whether the identification of the target bottom layer equipment carried in the query request is matched with the identification of the target bottom layer equipment; if the first response message is matched with the target bottom layer device, determining that the target bottom layer device is the target bottom layer device, and returning the first response message; if not, no action is performed.
Optionally, the storing the address according to the identifier of the target underlying device in the address allocation message includes: judging whether the identification of the target bottom layer equipment in the address allocation message is matched with the identification of the target bottom layer equipment; if the address is matched with the target bottom layer equipment, determining that the target bottom layer equipment is the target bottom layer equipment, and storing the address; if not, no action is performed.
Optionally, if the identifier of the target underlying device in the address allocation message matches with the identifier of the target underlying device, a second response message is returned.
An embodiment of the present invention further provides an upper control device, including: the first sending module is used for sending a query request, wherein the query request carries an identifier of a target bottom layer device; a determining module, configured to determine, in response to a first reply message to the query request by the target underlying device, an address of the target underlying device; and the second sending module is used for sending the address of the target bottom layer equipment.
An embodiment of the present invention further provides a gateway device, including: a third sending module, configured to send a query request to a target bottom-layer device, where the query request carries an identifier of the target bottom-layer device; the first uploading module is used for uploading a first response message of the target bottom layer device to the upper layer control device, wherein the first response message is specific to the query request; the first storage module is used for storing the address when the address of the target bottom layer equipment is received; and the fourth sending module is used for sending the address to the target bottom layer equipment.
An embodiment of the present invention further provides a bottom layer device, including: the first receiving module is used for receiving the query request; the first returning module is used for responding according to the identification of the target bottom layer equipment carried in the query request; a second receiving module, configured to receive an address assignment message, where the address assignment message includes an identifier of the target underlying device and an address of the target underlying device; and the second storage module is used for storing the address according to the identification of the target bottom layer equipment in the address allocation message.
An embodiment of the present invention further provides an address allocation system, including: the upper layer control device, the at least one gateway device and the at least one bottom layer device in the embodiments of the present invention; and each gateway device has at least one bottom layer device in the target area.
Optionally, the system further includes: a terminal, configured to obtain device information and send the device information to the upper control device, where the device information includes: a location of a target underlying device and an identification of the target underlying device.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to the first embodiment of the present invention, or implements the method according to the second embodiment of the present invention, or implements the method according to the third embodiment of the present invention.
By applying the technical scheme of the invention, the upper control equipment sends the query request carrying the identification of the target bottom equipment, and if the response of the target bottom equipment is received, the target bottom equipment is confirmed to be capable of normally communicating, and the corresponding address is determined and sent. Therefore, the upper control equipment establishes contact with the bottom equipment through the bottom equipment identifier, automatically allocates addresses for the bottom equipment, does not need to manually allocate addresses to each bottom equipment, is simple to operate, effectively avoids the problem of repeated addresses of the bottom equipment, and can accurately control each bottom equipment.
Drawings
Fig. 1 is a schematic structural diagram of an automatic address allocation system according to an embodiment of the present invention;
fig. 2 is a flowchart of an address automatic allocation method according to a second embodiment of the present invention;
fig. 3 is a flowchart of an address automatic allocation method according to a third embodiment of the present invention;
fig. 4 is a flowchart of an address automatic allocation method according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of an upper control device according to a fifth embodiment of the present invention;
fig. 6 is a block diagram of a gateway device according to a sixth embodiment of the present invention;
fig. 7 is a block diagram of the structure of the underlying device according to a seventh embodiment of the present invention;
fig. 8 is a flowchart of an address automatic allocation method according to an eighth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
Example one
The present embodiment provides an address automatic allocation system, as shown in fig. 1, the system includes: an upper level control device 10, at least one gateway device 20, and at least one lower level device 30. The functional structure of each device will be described in detail later. The system of the present embodiment is a system that conforms to the upper, gateway, and lower architectures and needs to allocate addresses, for example, a power peak shaving system.
The upper layer control device 10 may be an upper computer or a server, and may control and monitor the lower layer device 30. The gateway device 20 may be a gateway concentrator, which is an intermediary for information transfer between the upper layer control device 10 and the lower layer device 30. The underlying device 30 is addressed, for example, by an air conditioner, a washing machine, or a light in a power peak shaving control system. Each gateway device 20 has at least one underlying device 30 within a target area (otherwise known as a jurisdiction). The upper layer Control device 10 and the gateway device 20 may communicate with each other through a mobile communication network or a TCP (Transmission Control Protocol), and the gateway device 20 may communicate with the lower layer device 30 in the target area through a wired or wireless manner. Each gateway device has a unique address.
Through the interaction of all the devices in the system, the addresses can be automatically allocated to the bottom-layer devices, the operation is simple, and the addresses are not repeated.
Optionally, the system may further include: the terminal is used for acquiring the equipment information and sending the equipment information to the upper control equipment, wherein the equipment information comprises: the location of the target underlying device and the identity of the target underlying device. Illustratively, a dedicated application may be installed on the terminal to cooperate in implementing automatic address assignment.
The identifier of the bottom layer device is used for distinguishing from other bottom layer devices and is a unique identifier. Specifically, the identifier of the bottom layer device may be set in the bottom layer device in the form of an identifiable code, and accordingly, the terminal has at least a scanning function to obtain the identifier of the bottom layer device through scanning. In addition, the identification of the bottom layer equipment can be acquired through modes such as Bluetooth transmission, and correspondingly, the bottom layer equipment and the terminal have the Bluetooth function. The embodiment of the invention does not limit the specific way for the terminal to obtain the bottom layer equipment identifier, as long as the bottom layer equipment identifier can be obtained smoothly.
The terminal may also have an input function and/or a positioning function to acquire the position of the underlying device by inputting information and/or to acquire the position of the underlying device by positioning.
Example two
The present embodiment provides an address automatic allocation method, which is applied to an upper layer control device, and fig. 2 is a flowchart of an address automatic allocation method provided in a second embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
s201, issuing a query request, wherein the query request carries the identification of the target bottom layer equipment.
S202, responding to a first response message of the target bottom layer device aiming at the query request, and determining the address of the target bottom layer device.
S203, the address of the target bottom layer device is issued.
The query request is used for ensuring that the target bottom layer equipment needing to be allocated with the address can normally communicate, and when the target bottom layer equipment normally responds, the address allocated to the target bottom layer equipment can be determined and is issued to record and store the address, so that the automatic address allocation is completed.
In this embodiment, the upper control device issues a query request carrying an identifier of the target bottom device, and if a response of the target bottom device is received, it is determined that the target bottom device can normally communicate, and a corresponding address is determined and issued. Therefore, the upper control equipment establishes contact with the bottom equipment through the bottom equipment identifier, automatically allocates addresses for the bottom equipment, does not need to manually allocate addresses to each bottom equipment, is simple to operate, effectively avoids the problem of repeated addresses of the bottom equipment, and can accurately control each bottom equipment.
The upper control device can also store the assigned addresses of the bottom devices, so as to facilitate the subsequent control of the bottom devices.
Optionally, before S201, the method further includes: receiving device information, wherein the device information comprises: the position of the target bottom layer equipment and the identification of the target bottom layer equipment; and determining the gateway equipment corresponding to the region to which the target bottom layer equipment belongs according to the position of the target bottom layer equipment.
The position of the target bottom layer device refers to actual geographical position information, and the gateway device corresponding to the bottom layer device can be determined based on the position, so that the upper layer control device can communicate with the bottom layer device by using the gateway device to perform address allocation. In addition, the geographical position information of the bottom layer equipment is obtained, and equipment management is facilitated.
Specifically, the upper control device may obtain the device information through the terminal, for example, when the user holds the terminal to arrive at the site of the lower device, the position of the terminal may be determined according to a positioning function of the terminal itself, and the terminal may be used as the position of the lower device, or the user may manually input the position on the terminal. Even if the location is manually entered, the process of assigning the address is automatically performed without the user computing the address so that duplicate addresses do not occur.
Accordingly, S201 includes: and issuing a query request to the gateway equipment according to the address of the gateway equipment so as to send the query request to the target bottom layer equipment through the gateway equipment.
The upper control equipment can communicate with the corresponding gateway equipment through the unique address of the gateway equipment, the accuracy of communication is guaranteed, automatic address allocation of the bottom equipment under the gateway equipment is achieved, and then the upper control equipment can accurately control and monitor each bottom equipment.
Optionally, S202 includes: receiving a first response message uploaded by gateway equipment; and responding to the first response message, and determining the address of the target bottom layer equipment according to a preset rule.
Further, determining the address of the target underlying device according to a preset rule includes: acquiring the maximum value of a bottom layer device address corresponding to the gateway device; and carrying out preset operation on the maximum value to obtain the address of the target bottom layer equipment.
The preset operation is used for calculating according to a rule to obtain different addresses, and the preset operation may be multiplication or addition, for example, or other algorithms with higher complexity. Preferably, the predetermined operation may be an addition of one.
In this embodiment, the address is calculated according to a preset operation, and the address can be determined in a simple manner.
It should be noted that the addresses of the bottom layer devices under different gateway devices may be the same, because the upper layer control device may still distinguish the bottom layer devices by the addresses of the gateway devices, for example, the addresses of the two gateway devices are divided into 01 and 02, the address of one bottom layer device is 1 under the gateway device with the address of 01, and the bottom layer device with the address of 1 is also under the gateway device with the address of 02, and because of the existence of the addresses of the gateway devices, the upper layer control end may not confuse the bottom layer devices with the addresses of 1.
Optionally, the issuing the address of the target underlying device includes: constructing an address allocation message by using the identifier of the target bottom layer equipment and the address of the target bottom layer equipment; and issuing an address allocation message to the gateway equipment so as to send the address of the target bottom layer equipment to the target bottom layer equipment through the gateway equipment. Specifically, the gateway device is determined according to the position of the target bottom layer device, and can issue information to the gateway device according to the address of the gateway device, so as to ensure that the information is issued to an accurate object.
The optional embodiment can send the allocated device address to the corresponding target bottom layer device based on the bottom layer device identifier, and realizes automatic and accurate allocation of the address.
Optionally, after issuing the address of the target underlying device, the method further includes: receiving a second response message uploaded by the gateway equipment, wherein the second response message is a response of the target underlying equipment to the address allocation message; and reporting an address allocation success message to the terminal according to the second response message.
And the upper control equipment reports an address allocation success message to the terminal according to the response of the target bottom equipment to the address allocation message so as to inform that the address allocation is successful and avoid repeatedly allocating addresses to the same bottom equipment.
EXAMPLE III
The present embodiment provides an address automatic allocation method, which is applied to a gateway device, and fig. 3 is a flowchart of an address automatic allocation method provided in a third embodiment of the present invention, as shown in fig. 3, where the method includes the following steps:
s301, sending the query request to the target bottom layer device, wherein the query request carries the identifier of the target bottom layer device.
S302, uploading a first response message of the target bottom layer device to the upper layer control device according to the query request.
S303, when the address of the target bottom layer equipment is received, the address is saved and sent to the target bottom layer equipment.
In this embodiment, the gateway device performs targeted communication with the upper control device and the lower device through the lower device identifier, it is ensured that the target lower device can normally communicate based on the query request, when the address of the target lower device is received, the address is saved and sent to the target lower device, so as to inform the address to the target lower device, thereby address allocation to each lower device is not required manually, automatic address allocation of the lower device is realized, the operation is simple, the problem of address repetition of the lower device is effectively avoided, and the upper control device can accurately control each lower device.
Optionally, S301 includes: receiving a query request issued by upper control equipment; and sending query requests to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the query requests and respond to the query requests.
The gateway device serves as an information transmission medium and forwards the query request issued by the upper control device to the bottom device, so that the target bottom device can respond to the query request, normal communication of the target bottom device is ensured, and subsequent address calculation and accurate automatic allocation are guaranteed.
Optionally, S303 includes: receiving an address allocation message issued by upper control equipment, wherein the address allocation message comprises: the identification of the target bottom layer equipment and the address of the target bottom layer equipment; saving the address according to the address allocation message; and sending an address allocation message to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the address allocation message, respond to the address allocation message and store the address. Specifically, the gateway device may store a correspondence between the identifier and the address of the underlying device.
The gateway equipment stores the address of the target bottom layer equipment according to the received address allocation message, so that information can be accurately transmitted according to the address in the subsequent equipment control and monitoring process. The gateway device serves as an information transmission intermediary and forwards the address allocation message issued by the upper control device to the lower device, so that the target lower device can respond to the address allocation message and store the address, the target lower device can acquire and store the address allocated by the upper control device, and automatic address allocation is realized.
Optionally, after sending the address assignment message to all the underlying devices in the target area of the gateway device, the method further includes: receiving a second response message of the target underlying device aiming at the address allocation message; and uploading the second response message to the upper-layer control equipment.
The gateway device uploads the response of the target bottom layer device to the address allocation message to the upper layer control device, informs the upper layer control device of successful address allocation, and avoids repeatedly allocating addresses to the same bottom layer device.
Example four
The present embodiment provides an address automatic allocation method, which is applied to a bottom layer device, and fig. 4 is a flowchart of an address automatic allocation method provided in a fourth embodiment of the present invention, as shown in fig. 4, the method includes the following steps:
s401, receiving a query request.
S402, responding according to the identification of the target bottom layer device carried in the query request.
S403, receiving an address allocation message, wherein the address allocation message includes the identifier of the target underlying device and the address of the target underlying device.
S404, storing the address according to the identification of the target bottom layer device in the address allocation message.
And determining that the target bottom layer equipment can normally communicate through the response condition of the bottom layer equipment to the query request. And when the target bottom layer equipment receives the address, storing the address and finishing the automatic address allocation.
In this embodiment, the bottom layer device receives the query request and the address allocation message in sequence, determines whether the bottom layer device is the target bottom layer device according to the target bottom layer device identifier carried in the query request and the address allocation message, and executes a corresponding response or storage operation, and the bottom layer device performs targeted communication with the gateway device through the bottom layer device identifier without manually allocating addresses to each bottom layer device, so that automatic allocation of addresses of the bottom layer devices is realized, the operation is simple, the problem of address repetition of the bottom layer devices is effectively avoided, and the upper layer control device can accurately control each bottom layer device conveniently.
Optionally, S402 includes: judging whether the identification of the target bottom layer equipment carried in the query request is matched with the identification of the target bottom layer equipment; if the first response message is matched with the first response message, determining that the first response message is the target bottom layer equipment, and returning the first response message; if not, no action is performed.
If the gateway device sends the query request, all the bottom layer devices in the target area of the gateway device receive the query request, and according to the target bottom layer device identification carried in the query request, whether the query request is sent to the gateway device can be determined, if so, response is carried out, and if not, any processing is not carried out. Therefore, normal communication of the target bottom layer equipment can be determined, address allocation aiming at the target bottom layer equipment can be further realized, and the uniqueness of the address allocation is ensured.
Optionally, S404 includes: judging whether the identification of the target bottom layer equipment in the address allocation message is matched with the identification of the target bottom layer equipment; if the matching is carried out, determining that the device is the target bottom layer device, and storing the address of the target bottom layer device; if not, no action is performed.
If the gateway device sends the address allocation message, all the bottom layer devices in the target area of the gateway device receive the address allocation message, whether the address allocation message is sent to the gateway device can be determined according to the target bottom layer device identification carried in the address allocation message, if the address allocation message is sent to the gateway device, the device address in the address allocation message is stored and used as the address of the gateway device, otherwise, no processing is performed. Therefore, the address allocation for the target bottom layer equipment can be realized, and the uniqueness of the address allocation is ensured.
Optionally, if the identifier of the target underlying device in the address allocation message matches with the identifier of the target underlying device, a second response message is returned. And responding to the address allocation message, and informing the gateway equipment and the upper control equipment that the address allocation is successful, so as to avoid repeatedly allocating addresses to the same bottom equipment.
EXAMPLE five
Based on the same inventive concept, this embodiment provides an upper control device, which can be used to implement the address automatic allocation method described in the second embodiment. Fig. 5 is a block diagram of an upper control device according to a fifth embodiment of the present invention, and as shown in fig. 5, the upper control device includes:
a first sending module 51, configured to issue a query request, where the query request carries an identifier of a target underlying device;
a first determining module 52, configured to determine an address of the target underlying device in response to a first reply message of the target underlying device to the query request;
and the second sending module 53 is configured to send an address of the target underlying device.
Optionally, the upper control device further includes:
a third receiving module, configured to receive device information before issuing the query request, where the device information includes: the position of the target bottom layer equipment and the identification of the target bottom layer equipment;
and the second determining module is used for determining the gateway equipment corresponding to the region to which the target bottom layer equipment belongs according to the position of the target bottom layer equipment.
Correspondingly, the first sending module 51 is specifically configured to: and issuing a query request to the gateway equipment according to the address of the gateway equipment so as to send the query request to the target bottom layer equipment through the gateway equipment.
Optionally, the first determining module 52 includes:
the receiving unit is used for receiving a first response message uploaded by the gateway equipment;
and the determining unit is used for responding to the first response message and determining the address of the target bottom layer equipment according to a preset rule.
Further, the determining unit is specifically configured to: acquiring the maximum value of a bottom layer device address corresponding to the gateway device; and carrying out preset operation on the maximum value to obtain the address of the target bottom layer equipment.
Optionally, the second sending module 53 is specifically configured to: constructing an address allocation message by using the identifier of the target bottom layer equipment and the address of the target bottom layer equipment; and issuing an address allocation message to the gateway equipment so as to send the address of the target bottom layer equipment to the target bottom layer equipment through the gateway equipment.
Optionally, the upper control device may further include:
a fourth receiving module, configured to receive a second response message uploaded by the gateway device after the address of the target bottom device is issued, where the second response message is a response of the target bottom device to the address assignment message;
and the reporting module is used for reporting the address allocation success message to the terminal according to the second response message.
The upper control device can execute the method provided by the second embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
EXAMPLE six
Based on the same inventive concept, this embodiment provides a gateway device, which can be used to implement the address automatic allocation method described in the third embodiment. Fig. 6 is a block diagram of a gateway device according to a sixth embodiment of the present invention, and as shown in fig. 6, the gateway device includes:
a third sending module 61, configured to send a query request to the target bottom-layer device, where the query request carries an identifier of the target bottom-layer device;
a first uploading module 62, configured to upload a first response message of the target bottom-layer device to the upper-layer control device, where the first response message is for the query request;
a first storage module 63, configured to store an address of a target underlying device when the address is received;
and a fourth sending module 64, configured to send the address to the target underlying device.
Optionally, the third sending module 61 is specifically configured to: receiving a query request issued by upper control equipment; and sending query requests to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the query requests and respond to the query requests.
Optionally, the first storage module 63 is specifically configured to: receiving an address allocation message issued by upper control equipment, wherein the address allocation message comprises: the identification of the target bottom layer equipment and the address of the target bottom layer equipment; the address is saved according to the address assignment message.
Correspondingly, the fourth sending module 64 is specifically configured to: and sending an address allocation message to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the address allocation message, respond to the address allocation message and store the address.
Optionally, the bottom layer device may further include:
a fifth receiving module, configured to receive a second response message of the target underlying device to the address assignment message after sending the address assignment message to all underlying devices in the target area of the gateway device;
and the second uploading module is used for uploading a second response message to the upper-layer control equipment.
The gateway device can execute the method provided by the third embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
EXAMPLE seven
Based on the same inventive concept, this embodiment provides a bottom layer device, which can be used to implement the address automatic allocation method described in the fourth embodiment. Fig. 7 is a block diagram of a structure of a bottom layer device according to a seventh embodiment of the present invention, and as shown in fig. 7, the bottom layer device includes:
a first receiving module 71, configured to receive a query request;
a first returning module 72, configured to respond according to the identifier of the target bottom-layer device carried in the query request;
a second receiving module 73, configured to receive an address assignment message, where the address assignment message includes an identifier of a target underlying device and an address of the target underlying device;
and a second storage module 74, configured to store the address according to the identifier of the target underlying device in the address assignment message.
Optionally, the first returning module 72 is specifically configured to: judging whether the identification of the target bottom layer equipment carried in the query request is matched with the identification of the target bottom layer equipment; if the first response message is matched with the first response message, determining that the first response message is the target bottom layer equipment, and returning the first response message; if not, no action is performed.
Optionally, the second storage module 74 is specifically configured to: judging whether the identification of the target bottom layer equipment in the address allocation message is matched with the identification of the target bottom layer equipment; if the matching is carried out, determining that the device is the target bottom layer device, and storing the address of the target bottom layer device; if not, no action is performed.
Optionally, the bottom layer device further includes: and the second returning module is used for returning a second response message if the identifier of the target bottom layer equipment in the address allocation message is matched with the identifier of the target bottom layer equipment.
The bottom layer device can execute the method provided by the fourth embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Example eight
The present embodiment describes the above address automatic allocation scheme with reference to the specific example shown in fig. 8, however, it should be noted that this specific embodiment is only for better describing the present application, and does not constitute a limitation to the present application. The same or corresponding terms as those of the above-described embodiments are explained, and the description of the present embodiment is omitted.
As shown in fig. 8, a terminal (for example, an APP dedicated to an electric power peak shaving system is installed on the terminal) is used to identify a geographic position of a bottom device, an identifiable code (for example, a barcode of a wireless module burned when the bottom device leaves a factory) on the bottom device is scanned to obtain a device identifier, and the geographic position and the device identifier of the bottom device are uploaded to an upper-layer control device.
After receiving the data reported by the terminal, the upper control device determines the gateway device corresponding to the region to which the upper control device belongs according to the geographic position, and issues an inquiry request with a device identifier to the gateway device according to the address of the gateway device.
And after receiving the query request of the upper control device, the gateway device corresponding to the region to which the device belongs sends the query request with the device identifier in a wireless mode.
And after receiving the query request with the equipment identification, the bottom layer equipment in the corresponding area responds if the equipment identification is consistent with the self identification, otherwise, no processing is performed.
And the gateway equipment receives the response and then forwards the response to the upper control equipment.
After receiving the response, the upper control device adds one to the current maximum device address of the gateway device reporting the response as the allocated address, and issues the address allocation message composed of the device identifier and the address to the gateway device.
After receiving the address allocation message, the gateway device records the address and sends the address allocation message with the device identifier and the address in a wireless mode.
And after receiving the address allocation message, the bottom layer equipment in the corresponding area responds and stores the address in the address allocation message if the equipment identifier in the address allocation message is consistent with the self identifier, otherwise, no processing is performed.
After receiving the response, the gateway device reports the response to the upper control device, and then the upper control device sends an address assignment success message to the terminal.
Therefore, communication is carried out based on the bottom layer equipment identification, automatic allocation of the upper layer control equipment to the bottom layer equipment address is achieved, and then the upper layer control equipment can accurately monitor each bottom layer equipment through the gateway equipment address and the bottom layer equipment address.
Example nine
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to any of the second to fourth embodiments of the present invention.
The present embodiment also provides an electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement a method as in any of the second to fourth embodiments of the invention.
The above-described device embodiments are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but 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 (21)

1. An address allocation method, applied to an upper control device, the method comprising:
issuing a query request, wherein the query request carries an identifier of a target bottom layer device;
responding to a first response message of the target bottom layer equipment aiming at the query request, and determining the address of the target bottom layer equipment;
and issuing the address of the target bottom layer equipment.
2. The method of claim 1, further comprising, prior to issuing the query request:
receiving device information, wherein the device information comprises: the position of the target bottom layer equipment and the identification of the target bottom layer equipment;
and determining the gateway equipment corresponding to the region to which the target bottom layer equipment belongs according to the position of the target bottom layer equipment.
3. The method of claim 2, wherein issuing a query request comprises:
and issuing the query request to the gateway equipment according to the address of the gateway equipment so as to send the query request to the target bottom layer equipment through the gateway equipment.
4. The method of claim 1, wherein determining the address of the target underlying device in response to the first reply message of the target underlying device to the query request comprises:
receiving the first response message uploaded by the gateway equipment;
and responding to the first response message, and determining the address of the target bottom layer equipment according to a preset rule.
5. The method of claim 4, wherein determining the address of the target underlying device according to a preset rule comprises:
acquiring the maximum value of the bottom layer equipment address corresponding to the gateway equipment;
and carrying out preset operation on the maximum value to obtain the address of the target bottom layer equipment.
6. The method of claim 1, wherein issuing the address of the target underlying device comprises:
constructing the identification of the target bottom layer equipment and the address of the target bottom layer equipment into an address allocation message;
and issuing the address allocation message to gateway equipment so as to send the address of the target bottom layer equipment to the target bottom layer equipment through the gateway equipment.
7. The method of claim 6, further comprising, after issuing the address of the target underlying device:
receiving a second response message uploaded by the gateway device, wherein the second response message is a response of the target underlying device to the address allocation message;
and reporting an address allocation success message to the terminal according to the second response message.
8. An address allocation method, applied to a gateway device, the method comprising:
sending a query request to target bottom layer equipment, wherein the query request carries an identifier of the target bottom layer equipment;
uploading a first response message of the target bottom layer device to an upper layer control device, wherein the first response message is specific to the query request;
and when the address of the target bottom layer equipment is received, storing the address and sending the address to the target bottom layer equipment.
9. The method of claim 8, wherein sending the query request to the target underlying device comprises:
receiving the query request issued by the upper control device;
and sending the query request to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the query request and respond to the query request.
10. The method of claim 8, wherein when receiving the address of the target underlying device, saving the address and sending the address to the target underlying device comprises:
receiving an address allocation message issued by the upper control device, wherein the address allocation message includes: the identification of the target bottom layer equipment and the address of the target bottom layer equipment;
saving the address according to the address allocation message;
and sending the address allocation message to all bottom layer devices in the target area of the gateway device, so that the target bottom layer devices receive the address allocation message, respond to the address allocation message and store the address.
11. The method of claim 10, further comprising, after sending the address assignment message to all underlying devices within the target area of the gateway device:
receiving a second response message of the target bottom layer equipment aiming at the address allocation message;
and uploading the second response message to the upper control equipment.
12. An address allocation method, applied to an underlying device, the method comprising:
receiving a query request;
responding according to the identification of the target bottom layer equipment carried in the query request;
receiving an address allocation message, wherein the address allocation message comprises an identifier of the target underlying device and an address of the target underlying device;
and storing the address according to the identification of the target bottom layer equipment in the address allocation message.
13. The method of claim 12, wherein responding according to the identifier of the target underlying device carried in the query request comprises:
judging whether the identification of the target bottom layer equipment carried in the query request is matched with the identification of the target bottom layer equipment;
if the first response message is matched with the target bottom layer device, determining that the target bottom layer device is the target bottom layer device, and returning the first response message;
if not, no action is performed.
14. The method of claim 12, wherein saving the address according to the identification of the target underlying device in the address assignment message comprises:
judging whether the identification of the target bottom layer equipment in the address allocation message is matched with the identification of the target bottom layer equipment;
if the address is matched with the target bottom layer equipment, determining that the target bottom layer equipment is the target bottom layer equipment, and storing the address;
if not, no action is performed.
15. The method of claim 14, wherein if the identifier of the target underlying device in the address assignment message matches the identifier of the target underlying device, returning a second response message.
16. An upper control apparatus, characterized by comprising:
the first sending module is used for sending a query request, wherein the query request carries an identifier of a target bottom layer device;
a first determining module, configured to determine an address of the target underlying device in response to a first reply message of the target underlying device to the query request;
and the second sending module is used for sending the address of the target bottom layer equipment.
17. A gateway device, comprising:
a third sending module, configured to send a query request to a target bottom-layer device, where the query request carries an identifier of the target bottom-layer device;
the first uploading module is used for uploading a first response message of the target bottom layer device to the upper layer control device, wherein the first response message is specific to the query request;
the first storage module is used for storing the address when the address of the target bottom layer equipment is received;
and the fourth sending module is used for sending the address to the target bottom layer equipment.
18. An underlying device, comprising:
the first receiving module is used for receiving the query request;
the first returning module is used for responding according to the identification of the target bottom layer equipment carried in the query request;
a second receiving module, configured to receive an address assignment message, where the address assignment message includes an identifier of the target underlying device and an address of the target underlying device;
and the second storage module is used for storing the address according to the identification of the target bottom layer equipment in the address allocation message.
19. An address allocation system, comprising: the upper level control device of claim 16, at least one gateway device of claim 17, and at least one lower level device of claim 18; and each gateway device has at least one bottom layer device in the target area.
20. The system of claim 19, further comprising:
a terminal, configured to obtain device information and send the device information to the upper control device, where the device information includes: a location of a target underlying device and an identification of the target underlying device.
21. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7, or carries out the method of any one of claims 8 to 11, or carries out the method of any one of claims 12 to 15.
CN201911072279.3A 2019-11-05 2019-11-05 Automatic address allocation method, equipment and system Active CN110933194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911072279.3A CN110933194B (en) 2019-11-05 2019-11-05 Automatic address allocation method, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911072279.3A CN110933194B (en) 2019-11-05 2019-11-05 Automatic address allocation method, equipment and system

Publications (2)

Publication Number Publication Date
CN110933194A true CN110933194A (en) 2020-03-27
CN110933194B CN110933194B (en) 2021-06-22

Family

ID=69852419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911072279.3A Active CN110933194B (en) 2019-11-05 2019-11-05 Automatic address allocation method, equipment and system

Country Status (1)

Country Link
CN (1) CN110933194B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113299006A (en) * 2021-05-13 2021-08-24 深圳市智莱科技股份有限公司 Address allocation method, intelligent cabinet, readable storage medium and computer program product
CN114422480A (en) * 2021-12-03 2022-04-29 深圳市禾望电气股份有限公司 Automatic communication address allocation method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446438A (en) * 2008-08-29 2009-06-03 广东志高空调有限公司 Method for assigning address to indoor unit of central air-conditioning system, device and system thereof
CN102694881A (en) * 2012-06-08 2012-09-26 汕头市易普联科技有限公司 Address allocating method of intelligent equipment
CN102710809A (en) * 2012-06-08 2012-10-03 陈梓平 Address allocation method
CN104964399A (en) * 2015-07-21 2015-10-07 珠海格力电器股份有限公司 Address allocation method and device for air conditioning equipment
CN108063837A (en) * 2017-12-25 2018-05-22 锐捷网络股份有限公司 Dynamic IP addressing distribution method and device
CN108737226A (en) * 2018-04-13 2018-11-02 珠海格力电器股份有限公司 A kind of binding method, the apparatus and system of household appliance and socket
CN110035135A (en) * 2019-03-25 2019-07-19 珠海格力电器股份有限公司 The acquisition methods and system of device address

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446438A (en) * 2008-08-29 2009-06-03 广东志高空调有限公司 Method for assigning address to indoor unit of central air-conditioning system, device and system thereof
CN102694881A (en) * 2012-06-08 2012-09-26 汕头市易普联科技有限公司 Address allocating method of intelligent equipment
CN102710809A (en) * 2012-06-08 2012-10-03 陈梓平 Address allocation method
CN104964399A (en) * 2015-07-21 2015-10-07 珠海格力电器股份有限公司 Address allocation method and device for air conditioning equipment
CN108063837A (en) * 2017-12-25 2018-05-22 锐捷网络股份有限公司 Dynamic IP addressing distribution method and device
CN108737226A (en) * 2018-04-13 2018-11-02 珠海格力电器股份有限公司 A kind of binding method, the apparatus and system of household appliance and socket
CN110035135A (en) * 2019-03-25 2019-07-19 珠海格力电器股份有限公司 The acquisition methods and system of device address

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113299006A (en) * 2021-05-13 2021-08-24 深圳市智莱科技股份有限公司 Address allocation method, intelligent cabinet, readable storage medium and computer program product
CN114422480A (en) * 2021-12-03 2022-04-29 深圳市禾望电气股份有限公司 Automatic communication address allocation method
CN114422480B (en) * 2021-12-03 2024-02-20 深圳市禾望电气股份有限公司 Automatic communication address allocation method

Also Published As

Publication number Publication date
CN110933194B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN107995215B (en) Control method and device of intelligent household equipment and cloud platform server
CN110933194B (en) Automatic address allocation method, equipment and system
CN110762775B (en) Upgrading method of air conditioner and air conditioner
CN102959928A (en) Apparatus and mechanism for dynamic assignment of survivability services to mobile devices
CN102761856B (en) Terminal room shares the methods, devices and systems of software
CN108551413B (en) Intelligent household equipment binding method and device, gateway equipment and storage medium
CN112566155B (en) Networking method, device and system
US20140201356A1 (en) Monitoring system of managing cloud-based hosts and monitoring method using for the same
CN106713522B (en) Wireless fidelity Wi-Fi connection method and mobile terminal
CN107995013B (en) Customer service distribution method and device
CN114867065A (en) Base station computing force load balancing method, equipment and storage medium
CN105472597B (en) Application registration method and device
CN105180367A (en) Data transmitting method and system for air conditioner unit
KR20140110529A (en) Method of registration of devices for M2M network using M2M gateway and M2M gateway for it
CN111934956A (en) Equipment configuration method and device, storage medium and electronic device
CN111741143B (en) Method and device for on-line distribution of Modbus addresses of electrical measuring instrument
CN110913028B (en) Method, device and system for processing virtual address
CN110071950B (en) Information transmission method, transfer device, terminal, controlled device and storage medium
CN113473449A (en) Intelligent connection system based on Internet of things terminal
CN107862426B (en) State detection method and device based on Internet of things
CN112837094A (en) Region-based service matching method, server device and computer readable medium
US20150271775A1 (en) Method and Device for Deregistering Terminal Peripheral
CN113515612B (en) Method and device for identifying black-birth mobile phone number
CN113067759A (en) Multi-connected distribution network system, server, multi-connected distribution network method and distribution network equipment
CN110611589B (en) Control method and device of regional control system and air conditioning system

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