CN114097588B - Networking method and device of irrigation device - Google Patents

Networking method and device of irrigation device Download PDF

Info

Publication number
CN114097588B
CN114097588B CN202111269634.3A CN202111269634A CN114097588B CN 114097588 B CN114097588 B CN 114097588B CN 202111269634 A CN202111269634 A CN 202111269634A CN 114097588 B CN114097588 B CN 114097588B
Authority
CN
China
Prior art keywords
slave
slaves
address information
host
inquiry
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
CN202111269634.3A
Other languages
Chinese (zh)
Other versions
CN114097588A (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.)
Hanyun Technology Co Ltd
Original Assignee
Hanyun 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 Hanyun Technology Co Ltd filed Critical Hanyun Technology Co Ltd
Priority to CN202111269634.3A priority Critical patent/CN114097588B/en
Publication of CN114097588A publication Critical patent/CN114097588A/en
Application granted granted Critical
Publication of CN114097588B publication Critical patent/CN114097588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01GHORTICULTURE; CULTIVATION OF VEGETABLES, FLOWERS, RICE, FRUIT, VINES, HOPS OR SEAWEED; FORESTRY; WATERING
    • A01G25/00Watering gardens, fields, sports grounds or the like
    • A01G25/16Control of watering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Abstract

The application provides a networking method and device of an irrigation device, the device comprises a host computer and a plurality of slaves for implementing irrigation, each slave of the plurality of slaves has address information, the slaves are configured to communicate with the host computer, the networking method comprises: the master sends an interrogation signal to the plurality of slaves; the host receives the responses of the plurality of slaves to the inquiry signals and records the address information of the responded slaves; and the host sends the recorded address information of the replied slave to the user terminal. By adopting the technical scheme provided by the application, the automatic addition of the slave address information can be realized, and the problem of complicated process of manually adding the slave address information to the user side can be solved.

Description

Networking method and device of irrigation device
Technical Field
The application relates to the field of irrigation, in particular to a networking method and device of an irrigation device.
Background
In the field of irrigation, it is often necessary for a master to utilize communication to control slaves distributed throughout. The user side can issue instructions to the slaves with the designated numbers, so that the slaves can irrigate after receiving the instructions.
Communication between the master and the slave needs to be established first before the master takes control of the slave. It is necessary to add relevant slave address information to relevant user terminals, and then implement point-to-point communication between the master and each slave. Before adding the slave address, the master needs to know different slave addresses, and in a common scheme, the slave addresses need to be manually added one by one, however, the whole irrigation network is hung down by hundreds or thousands of slaves, so that adding numbers one by one from the user side manually is very troublesome.
Disclosure of Invention
In order to solve the technical defects in the background technology of the field, the embodiment of the application aims to provide a networking method and device of an irrigation device, which are used for solving the technical problem that a host of the existing irrigation device needs to be added manually and automatically.
In order to achieve the above object, the technical solution provided by the embodiments of the present application is specifically as follows.
In a first aspect, an embodiment of the present application provides a method for networking an irrigation device.
An embodiment of a first aspect of the present application provides a networking method of an irrigation device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the networking method comprising: the master sends an interrogation signal to the plurality of slaves; the host receives the responses of the plurality of slaves to the inquiry signals and records the address information of the responded slaves; and the host sends the recorded address information of the replied slave to the user terminal.
In this embodiment, the primary operation performed by the master of the device includes a first step of sending an inquiry signal to a plurality of slaves to begin inquiring whether the corresponding slaves are present. And the second step is that the host receives the responses of the plurality of slaves to the inquiry signals, records the address information of the responded slaves, and after the inquiry signals sent by the host are responded by the slaves in the last step, the host receives the response signals, the received information contains the address information of the responding slaves, and the host also records the address information of the responding slaves when receiving the response signals. And thirdly, the host sends the recorded address signal of the replied slave to the user side, and in the step, the host executes a sending task and sends the address information of the slave to the client side. Finally, the automatic addition of the slave address information on the client is realized, so that the problem that the process of manually adding the slave to the host is excessively complicated is effectively solved.
Further, the master transmits an interrogation signal to the plurality of slaves, including: the host sequentially sends an inquiry data packet to each slave according to the slave address information; the interrogation data packet includes: address information of the destination slave, and inquiry information for inquiring whether the slave exists.
In the embodiment of the present application, the manner in which the master transmits the query packet to each slave has a certain order, specifically, the query packet is transmitted according to the address information sequence of the slave, and the slave is sequentially queried. The present embodiment details the specific contents of the data packet, and in addition to the address information, there is also an inquiry information for the purpose of conveying to the slave an inquiry as to whether the slave is present. In an alternative example, the address information of the slave includes the number of the slave, and the number of the slave is obtained when the slave leaves the factory.
In an alternative example, the number of the slave machine in the technical scheme of the application can adopt the SN number of the slave machine product or the last few bits of the SN number. In the embodiment, the number of the slave is unchanged, and when the slave equipment leaves the factory, the SN number is solidified in the slave, so that the number cannot be changed, the slave with the same number can be ensured to be absent under the same network, and the communication collision is avoided.
In an alternative example, the query packet includes: address information of the destination slave, and inquiry information for inquiring whether the slave exists.
In this embodiment, details of the data packet are described, and in addition to address information, there is also inquiry information for the purpose of conveying an inquiry to the slave as to whether the slave is present.
Further, the method further comprises the step that after the host computer sends the inquiry signals to the slaves for a limited response time, response data packets sent by the slaves are not received yet, and the corresponding slaves are judged to be absent.
In this embodiment, a limited response time is set, if the slave exists, the master will receive the response data packet sent from the slave within the limited response time, and if the slave does not exist, the master will not receive the response data packet sent from the slave after the limited response time has elapsed.
Further, the responses of the plurality of slaves to the interrogation signal further include: the slave state judging information of whether the slave fails or not, and the method further comprises the steps of: and the host sends corresponding slave state information of the replied slave to the user terminal.
In this embodiment, the response message received by the host includes not only the information for determining whether the slave exists, but also the status determination information for the failure of the slave. After the host collects the state information of the response slave, the state information needs to be sent to the user side. In an optional example, in the step of sending the address information of the slave machine that has responded and is recorded to the client side by the master machine, the master machine sends the address information of the corresponding slave machine of the slave machine with no fault information in the state information of the slave machine to the client side only.
In an alternative example, the information content sent by the host to the user end is limited, and after the host receives the state information sent by the corresponding slave, only the slave address information and the state information with the fault-free display state are selectively sent to the user end.
Further, the execution time of the networking method includes: after the slave access is completed, after the slave is newly added, after the slave is removed, and after the client request is received.
In this embodiment, the optimal execution timing of the networking method is specified, specifically, after the slave is accessed, after the slave is newly added, after the slave is removed, after the user terminal request is received, generally, after the number of the slave accesses is changed or when the operator actively needs to perform networking, but the execution timing of the technical scheme of the present application is not limited to the time.
In a second aspect, an embodiment of the present application provides an irrigation device networking device, the device comprising a host and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the host, the host comprising: an interrogation module for transmitting interrogation signals to the plurality of slaves; a response receiving module, which is used for receiving the response condition of the plurality of slaves to the inquiry signals and recording the address information of the answered slaves; and the information sending module is used for sending the recorded replied slave address information to the user side.
The operation of the host part of the device is performed according to the method provided by the first aspect of the application.
In a third aspect, an embodiment of the present application provides a networking method of an irrigation device, the device including a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the networking method comprising: the slaves receive the inquiry signals sent by the host; the plurality of slaves sends a response to the interrogation signal to the master.
In this embodiment, the slave side mainly performs two operations, and the first step is to receive the interrogation signal sent from the master side, and only the slave that exists can complete the action of receiving the interrogation signal. The second step is that the slaves send responses to the inquiry signals to the master, and the slaves execute the step after receiving the inquiry signals of the master.
Further, the responses of the plurality of slaves to the interrogation signal include: and the response data packet is sent to the host by the slave, wherein the response data packet comprises address information of the response slave and response information of the slave.
In this embodiment, the content of a packet of a response signal sent by a slave will be specifically described, where the response packet includes response information of the slave and address information of the corresponding response slave.
Further, the inquiry signal sent by the host computer comprises an inquiry data packet, wherein the inquiry data packet comprises address information of the target slave computer and inquiry information for inquiring whether the slave computer exists or not; after the slaves receive the inquiry signals sent by the master, the method further comprises the steps that the slaves analyze the address information of the target slave in the data packet, verify whether the address information of the target slave is matched with the address information of the target slave, and if the address information of the target slave is not matched with the address information of the target slave, the inquiry signals are not responded.
In this embodiment, after receiving the query packet sent by the host, the slave first analyzes the packet, so as to obtain address information corresponding to the packet, and then compares the address information of the slave with the analyzed address information to determine whether the address information of the packet matches with the address information of the slave, and only when the address information matches, the slave responds to the query signal.
In a fourth aspect, an embodiment of the present application provides an irrigation device networking device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the slaves comprising: an inquiry receiving module, which is used for receiving an inquiry signal sent by the host; and a reply module for sending a reply to the interrogation signal to the host.
The operation of the slave part of the device is performed according to the method provided by the third aspect of the application.
Preferably, in the embodiment of the present application, a communication protocol may be applied, including scanning response, electromagnetic valve control response, sensor data acquisition, etc., and communication thought and data packet protocol are utilized to provide convenience for communication between the host and the slave during irrigation networking, and control of the slave by the host after irrigation networking.
In order to make the above objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of steps performed by a host method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of steps performed by a slave-side method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of overall method execution steps according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a host device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a slave device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an overall apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
Fig. 1 is a schematic diagram of steps performed by a method at a host side according to an embodiment of the present application, as shown in fig. 1, where the method includes:
step 101: the master transmits an interrogation signal to the plurality of slaves.
In the implementation of step 101, the master, as part of an irrigation device comprising a master and a plurality of slaves for irrigation implementation, performs a signaling function in this step, where the signaling may be one-to-one accurate signaling or one-to-many signaling at the same time, and the master may send interrogation signals to a plurality of possible slaves simultaneously in a certain order.
Step 102: the host receives the responses of the plurality of slaves to the inquiry signals and records the address information of the responded slaves.
In the implementation process of step 102, the host executes a receiving task, specifically, responses to signals sent by the slaves, where the signals are responses to the query signals sent by the slaves after receiving the query signals sent by the host in the previous step, and the response signals include address information of the relevant slaves that respond to the responses, and the host records the address information of the slaves while receiving the response signals.
Step 103: and the host sends the recorded address information of the replied slave to the user terminal.
In the implementation process of step 103, the host machine has received the response signal of the response slave machine and records the address information of the corresponding slave machine in the last step, in this step, the host machine needs to execute the sending task, the sending object of this step is the user end, and the host machine sends the response signal of the corresponding slave machine recorded in the last step to the user end.
In one embodiment of the present application, in the step 101, the master transmits an interrogation signal to the plurality of slaves, and during the transmission of the interrogation signal, the master transmits an interrogation packet to each of the slaves in order of the slave address information. The content of the inquiry data packet contains address information of the destination slave and inquiry information about whether the destination slave exists. The host transmits inquiry data packets to the possible slaves according to the address information, and uses the content in the data packets to transmit an inquiry to the corresponding slaves whether the slaves exist or not. The master may send signals to each possible slave one by one or in a random order, or may send signals one by one at the same time, where the signal sending has a certain order, and in the present application, the signals are sent in particular in the order of addresses of the slaves. The address information of the slave includes the number of the slave, and in this embodiment, the slave number can be used as one of the slave address information, and the specific corresponding slave can be easily obtained according to the number of the slave. In one embodiment of the application, the number of the slave is obtained at the time of leaving the factory of the slave, preferably the last four digits of the slave SN number of the irrigation device are unique, and one irrigation network is generally difficult to reach ten thousand slaves, so that 9999 numbers are enough in general, the slaves with the same number cannot be located under the same network, otherwise communication conflicts. Preferably, the number is not changeable, and the slave device factory SN is already cured inside and therefore cannot be changed. The slave number is the address fixed by the slave communication, and the device is solidified in the chip when leaving the factory. Without the concept of an interface, the numbering address is bound to the slave device. If the user clearly knows the range of the slave device numbers to be queried, the address information range scanned by the slave can be appropriately adjusted according to the corresponding range, so that the time for searching the slave is reduced. The address information of the slave can be obtained by its interface with the master, i.e., the number of the slave itself is not used as the address information, for example, for the 0001 number interface of the master, whichever slave is connected to this 0001 number interface, the address information of the slave thereof is determined to be 0001 number, and so on.
In another embodiment of the present application, the order in which the slaves feed back the master's interrogation signals, the order in which the slaves receive the slaves' replies, i.e. the first slave to send a reply to the master is defined as address information 0001, and so on.
In one embodiment of the present application, also in step 101, the interrogation signal sent from the master to the slave refers to an interrogation packet, where the content of the interrogation packet includes address information of the destination slave and interrogation information about whether the destination slave exists. The host transmits inquiry data packets to the possible slaves according to the address information, and uses the content in the data packets to transmit an inquiry to the corresponding slaves whether the slaves exist or not.
In one embodiment of the present application, in the step 102, after the master sends the inquiry signals to the plurality of slaves for a limited response time, the response data packet sent by the slave is still not received, and it is determined that the corresponding slave is not present. The host sets a limited response time when receiving the response signal of the slave, normally, when the corresponding slave exists, the whole time length from the transmission of the inquiry signal by the host to the reception of the response signal of the slave is relatively fixed and is lower than a certain time length, the time length is set to be limited to the response time, and when the host transmits the inquiry signal to a certain slave until the response signal is not received yet after the response time is exceeded, the host is abnormal, and the corresponding slave is judged to be absent.
In one embodiment of the present application, in the above steps 101-103, the master sends an inquiry signal to determine whether the corresponding slave is functioning properly in addition to whether the corresponding slave is present, so that the response signal received by the master also includes a status response to whether the slave is malfunctioning. When the host sends the recorded slave state information to the user terminal, the host sends corresponding state information to the user terminal in addition to the existing slave address information.
In one embodiment of the present application, in step 103, the host sends the corresponding state of the corresponding slave to the client, but the state sent here is only "no fault", when the host receives the fault information sent by the slave, the host records the slave number and the fault information, and only sends the slave address whose state is "no fault" to the client, and does not send the fault slave number and the state information to the client.
In one embodiment of the present application, in the steps 101-103, the steps 101-103 are performed under specific conditions, specifically, after the slave has completed access, after the new slave has been added, after the slave has been removed, and after the client request has been received.
Fig. 2 is a schematic diagram of steps performed by a slave-side method according to an embodiment of the present application, as shown in fig. 2, where the method includes:
step 201: the plurality of slaves receives the interrogation signals transmitted by the master.
In the implementation process of step 201, a plurality of slaves receive an interrogation signal sent from a master, and only the slaves that exist receive the interrogation signal sent from the master, it is obvious that if the corresponding slave does not exist, the corresponding slave cannot receive the interrogation signal sent from the master.
Step 202: the plurality of slaves sends a response to the interrogation signal to the master.
In the implementation of step 202, since the slave computer receives the inquiry signal sent by the host computer in the previous step, the slave computer needs to respond to the host computer, and in this step, sends a response signal to the host computer as a response to the host computer.
In one embodiment of the present application, in the step 202, the response signal from the slave to the master includes sending a response packet to the master, where the response packet includes address information of the responding slave and response information of the slave.
In one embodiment of the present application, in the step 201, the interrogation signal received by the slave includes an interrogation packet, where the interrogation packet includes address information of the destination slave and interrogation information for querying whether the slave exists. After receiving the inquiry data packet, the slave analyzes the address information of the target slave in the data packet, verifies whether the address information of the target slave is matched with the address information of the slave, and does not respond to the inquiry signal if the address information of the target slave is not matched with the address information of the slave. The inquiry data packet contains address information, each slave machine also binds the address information, when the slave machine receives the inquiry data packet, the slave machine analyzes the inquiry data packet, firstly, the address information of the data packet is verified with the address information of the slave machine to see whether the two are matched, and only when the two address information are matched with each other, the slave machine can respond.
Fig. 3 is a schematic diagram of overall method execution steps according to an embodiment of the present application.
Step 301: the master transmits an interrogation signal to the plurality of slaves.
In the implementation of step 301, a master initiates a query of a plurality of slaves.
Step 302: the plurality of slaves receives the interrogation signals transmitted by the master.
In the implementation of step 302, if a corresponding slave exists, the corresponding slave receives the interrogation signal sent by the master.
Step 303: the plurality of slaves send a response to the interrogation signal to the master.
In the implementation process of step 303, when the slave has received the inquiry signal sent by the host in the previous step, the slave needs to respond to the host after receiving the inquiry signal, and the specific response form is that the slave sends a response signal to the host.
Step 304: the host receives the responses of the slaves to the inquiry signals and records the address information of the responded slaves.
In the implementation process of step 304, when the slave machine sends a response signal to the master machine in the previous step, the master machine needs to receive the response signal sent by the slave machine, and records address information corresponding to the slave machine sending the response signal while receiving the response signal.
Step 305: and the host sends the recorded address information of the replied slave to the user terminal.
In the implementation process of step 305, the host executes the sending task, and sends the slave address information recorded in the previous step to the client.
Fig. 4 is a schematic diagram of a host device according to an embodiment of the present application.
Referring to fig. 4, a host 400 is a host 400 applying for an irrigation device networking device. It should be understood that the host 400 may correspond to the embodiment of the method of fig. 1 described above, and is capable of executing the steps involved in the embodiment of the method of fig. 1, and specific functions of the host 400 may be referred to in the description of the related embodiments of the present application, and are omitted herein as appropriate to avoid repetition. In addition, the host 400 may perform different host-slave matching methods according to its modules without departing from the scope of the present application.
The host 400 includes: an interrogation module 401 for transmitting interrogation signals to the plurality of slaves. Under the action of module 401, the master sends an interrogation signal to multiple slaves, performing the task of initiating an interrogation. The present module performs a signaling function that is not a one-to-one accurate transmission, and module 401 will send interrogation signals to a plurality of possible slaves in a certain order.
A reply receiving module 402, configured to receive reply conditions of the plurality of slaves to the query signal and record address information of the replied slaves. The module 402 performs a receiving task, in particular a response to a signal sent by a plurality of slaves, which signal is a response to an interrogation signal sent by a slave after receiving the interrogation signal sent by the master in the previous step, referred to herein as a response signal, which response signal contains address information of the relevant slave in response to the response, and the module 402 records the address information of the slaves at the same time as the response signal is received.
An information sending module 403, configured to send the recorded replied slave address information to the user side. The host has received the response signal of the response slave and recorded the address information of the corresponding slave in the previous step, and in this step, the module 403 needs to perform a transmission task, and the transmission object of this step is the user terminal, and the module 403 transmits the response signal of the corresponding slave recorded in the previous step to the user terminal.
Optionally, in an embodiment of the present application, the query module 401 sends query signals to the plurality of slaves, and during sending of the query signals, the module 401 sends query packets to each of the slaves in order of slave address information. The content of the inquiry data packet contains address information of the destination slave and inquiry information about whether the destination slave exists. The module 401 sends an inquiry packet to the possible slaves according to the address information and uses the content in the packet to send an inquiry whether the corresponding slaves are present. The interrogation modules may send signals to each of the possible slaves one-to-one or in a random order, or may send signals one-to-many at the same time, with the signal sending having a certain order, in the present application, specifically in the order of the slaves' addresses.
Optionally, the address information of the slave includes the number of the slave, and in this embodiment, the slave number may be used as one of the slave address information, and the specific corresponding slave may be easily obtained according to the number of the slave.
Alternatively, the interrogation signal sent by module 401 to the slave refers to an interrogation packet, the contents of which include the address information of the destination slave and the interrogation information about whether the destination slave is present. The module 401 sends an inquiry packet to the possible slaves according to the address information and uses the content in the packet to send an inquiry whether the corresponding slaves are present.
Optionally, after the limited response time of the query signals sent by the module 402 to the plurality of slaves, no response data packet sent by the slaves is received yet, and it is determined that the corresponding slaves do not exist. The module 402 sets a limited response time when receiving the response signal of the slave, and normally, when the corresponding slave exists, the whole time period from when the slave module 401 transmits the inquiry signal to when the response signal of the slave is received is relatively fixed, and is lower than a certain time period, such time period is set to be limited to the response time, and when the module 401 transmits the inquiry signal to a certain slave until the response signal is not received after the response time is exceeded, the module 402 judges that the corresponding slave does not exist.
Optionally, the module 401 sends an inquiry signal to determine whether the corresponding slave is functioning properly in addition to determining whether the corresponding slave is present, and thus the response signal received by the module 402 also includes a status response to whether the slave is malfunctioning. When the module 403 sends the recorded slave status information to the client, the corresponding status information is also sent to the client in addition to the existing slave address information. The module 403 will send the corresponding state of the corresponding slave to the user terminal, but the state sent here is only "no fault", when the module 402 receives the fault information sent by the slave, the module 402 only records the number and the fault information of the slave, and only sends the address of the slave whose state is displayed as "no fault" to the user terminal, and the module 403 will not send the number and the state information of the slave with fault to the user terminal.
Optionally, the modules 401-403 may perform the above functions only in the four cases after the slave has completed access, after the slave has been newly added, after the slave has been removed, and after receiving the client request.
Fig. 5 is a schematic diagram of a slave device according to an embodiment of the present application.
Referring to fig. 5, a slave 500 is a slave that applies for a networking device of an irrigation device. It should be understood that, corresponding to the above embodiment of the method of fig. 2, the slave 500 is capable of executing the steps involved in the embodiment of the method of fig. 2, and specific functions of the slave 500 may be referred to in the description of the related embodiments of the present application above, and are omitted here as appropriate to avoid repetition. In addition, the slave 500 may perform different master-slave matching methods according to its modules without departing from the scope of the present application.
The slave 500 includes: an interrogation receiving module 501 for receiving an interrogation signal sent by the host. The query receiving module 501 receives the query signal sent from the host, and only the modules 501 of the slave that are present receive the query signal sent from the host, and it is obvious that if the corresponding slave is not present, the corresponding modules 501 cannot receive the query signal sent from the host.
A reply module 502 for sending a reply to the interrogation signal to the host. Since the slave corresponding module 501 receives the inquiry signal sent by the host, it needs to answer the host, and in this step, the module 502 sends an answer signal to the host as an answer to the host.
Optionally, the module 502 sends a reply packet to the host, where the reply packet includes address information of the reply slave and reply information of the slave.
Optionally, the interrogation signal received by module 501 includes an interrogation packet that includes address information of the destination slave and interrogation information that interrogates whether the slave is present. After receiving the query packet, the module 501 parses the address information of the destination slave in the packet, verifies whether the address information of the destination slave matches with the address information of the destination slave, and if not, the module 502 does not respond to the query signal. The query packet includes address information, and each slave machine also binds the address information, and when the module 501 receives the query packet and then analyzes the query packet, the module 502 first verifies the address information of the packet and the address information of the slave machine to see whether the two match, and only when the two address information match with each other, the module 502 performs a response operation.
Fig. 6 is a schematic diagram of an overall apparatus according to an embodiment of the present application.
Referring to fig. 6, an apparatus 600 includes a master and a slave of an irrigation device networking device. It should be understood that, in correspondence with the above-described embodiment of the method of fig. 3, the apparatus 600 is capable of executing the steps involved in the embodiment of the method of fig. 3, and the specific functions of the apparatus 600 may be referred to in the description of the related embodiments of the present application above, and are omitted here as appropriate to avoid repetition. In addition, the apparatus 600 may perform different master-slave matching methods according to its modules without departing from the scope of the present application.
The apparatus 600 includes in common: the host module 610, the slave module 620, the slave module 630, the slave module 640, the slave module 650. The slave modules 620-650 each have 2500 slaves in bi-directional communication with the master module 610. The slave module 620 is identical to the internal structure of the other three slaves, as illustrated by way of example in fig. 6, and the slave module 620 includes a query receiving module 622 and a response module 624 within. The host 610 internally includes an interrogation module 612, a reply receiving module 614, and an information transmitting module 616.
An interrogation module 612 for transmitting interrogation signals to the plurality of slaves. In the implementation of block 612, a query is first initiated for a plurality of slaves (slaves 620-650).
An interrogation receiving module 622 for receiving interrogation signals transmitted by the interrogation module 612 in the host 610. In the implementation of block 622, the corresponding slave computer query receiving block 622 receives the query signal sent by the master computer if the corresponding slave computer exists.
A reply module 624 for sending a reply to the interrogation signal to the host. In the implementation of block 624, block 622 may have received an interrogation signal from the host before, and block 624 may need to respond to the host after receiving the signal, in the form of block 624 sending a response signal to the host.
A reply receiving module 614, configured to receive replies of the plurality of slaves to the interrogation signals, and record address information of the replied slaves. In the implementation process of the module 614, the module 624 in the slave sends a response signal to the host before that, so that the module 614 in the host needs to receive the response signal sent by the slave, and records the address information corresponding to the slave sending the response signal while receiving the response signal.
And the information sending module 616 is configured to send the recorded address information of the replied slave to the user terminal. In the implementation process of the block 616, the block 616 performs a sending task, and sends the slave address information recorded in the block 614 to the client.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (7)

1. A networking method of an irrigation device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the networking method comprising:
the master sends an interrogation signal to the plurality of slaves;
the host receives the responses of the plurality of slaves to the inquiry signals and records the address information of the responded slaves; and
the host sends the recorded address information of the replied slave to the user;
wherein the responses of the plurality of slaves to the interrogation signal further comprise: judging information of slave state of whether the slave fails or not;
the method further comprises the steps of: the host sends corresponding slave state information of the replied slave to the user terminal; the slave state information includes no fault;
the host defines address information of the slaves according to the order in which the slaves receive responses;
the master sending an interrogation signal to the plurality of slaves, comprising: the host transmits an inquiry data packet to each slave sequentially according to the slave number; the number of the slave is obtained when the slave leaves the factory;
wherein the interrogation data packet includes: address information of the destination slave, and inquiry information for inquiring whether the slave exists.
2. The method according to claim 1, wherein the method further comprises:
and after the host computer transmits the limited response time of the inquiry signals to the plurality of slaves, if the response data packet transmitted by the slaves is still not received, judging that the corresponding slaves do not exist.
3. The method of claim 1, wherein the networking method is performed at a time comprising: after the slave access is completed, after the slave is newly added, after the slave is removed, and after the client request is received.
4. The method according to claim 1, wherein the networking method comprises:
the slaves receive the inquiry signals sent by the host;
the plurality of slaves sends a response to the interrogation signal to the master.
5. The method of claim 4, wherein the responses of the plurality of slaves to the interrogation signal comprise: and the response data packet is sent to the host by the slave, wherein the response data packet comprises address information of the response slave and response information of the slave.
6. The method of claim 4, wherein after the plurality of slaves receives the interrogation signals transmitted by the master, the method further comprises:
the slave analyzes the address information of the target slave in the data packet, verifies whether the address information of the target slave is matched with the address information of the target slave, and does not respond to the query signal if the address information of the target slave is not matched with the address information of the target slave.
7. An irrigation device networking device, the device comprising a master and a plurality of slaves for performing irrigation, each of the plurality of slaves having address information, the slaves being configured to communicate with the master, the master comprising:
an interrogation module for transmitting interrogation signals to the plurality of slaves;
a response receiving module, which is used for receiving the response condition of the plurality of slaves to the inquiry signals and recording the address information of the answered slaves; and
the information sending module is used for sending the recorded replied slave address information to the user side;
wherein the responses of the plurality of slaves to the interrogation signal further comprise: judging information of slave state of whether the slave fails or not;
the information sending module is used for sending the corresponding slave state information of the replied slave to the user terminal by the host; the slave state information includes no fault;
the irrigation device networking device is also used for defining address information of the slaves according to the order in which the slaves receive responses by the hosts;
the inquiry module is also used for the host to sequentially send inquiry data packets to each slave according to the number of the slave; the number of the slave machine is obtained when the slave machine leaves the factory; wherein the interrogation data packet includes: address information of the destination slave, and inquiry information for inquiring whether the slave exists;
the slave comprises:
an inquiry receiving module, which is used for receiving an inquiry signal sent by the host; and
and the response module is used for sending a response to the inquiry signal to the host.
CN202111269634.3A 2021-10-29 2021-10-29 Networking method and device of irrigation device Active CN114097588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111269634.3A CN114097588B (en) 2021-10-29 2021-10-29 Networking method and device of irrigation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111269634.3A CN114097588B (en) 2021-10-29 2021-10-29 Networking method and device of irrigation device

Publications (2)

Publication Number Publication Date
CN114097588A CN114097588A (en) 2022-03-01
CN114097588B true CN114097588B (en) 2023-10-31

Family

ID=80379408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111269634.3A Active CN114097588B (en) 2021-10-29 2021-10-29 Networking method and device of irrigation device

Country Status (1)

Country Link
CN (1) CN114097588B (en)

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07177161A (en) * 1993-12-21 1995-07-14 Hitachi Denshi Ltd Polling selecting method
JPH0823586A (en) * 1994-07-05 1996-01-23 Toshiba Syst Technol Kk Polling method in monitoring control system
JPH1174915A (en) * 1997-08-29 1999-03-16 Nec Corp Automatic setting method for ip address in tcp/ip network
JP2003124946A (en) * 2001-10-10 2003-04-25 Nec Corp Microwave radio communication system and automatic address allocation method
US6700877B1 (en) * 1997-08-05 2004-03-02 Siemens Aktiengesellschaft Method and bus system for automatic address allocation
WO2008052685A2 (en) * 2006-10-31 2008-05-08 Moeller Gmbh Method and arrangement for communication on an lin bus
CN101247290A (en) * 2008-03-14 2008-08-20 中兴通讯股份有限公司 Ethernet switchboard high temperature ageing real-time monitoring method and system
JP2008301140A (en) * 2007-05-31 2008-12-11 Yokogawa Electric Corp Address acquisition system
CN104811339A (en) * 2015-04-23 2015-07-29 光一科技股份有限公司 Intelligent networking method based on arbitration-free bus
WO2015196654A1 (en) * 2014-06-26 2015-12-30 中兴通讯股份有限公司 Distributed management method and device for network management
CN105578383A (en) * 2015-05-25 2016-05-11 上海归墟电子科技有限公司 2.4G-based networking communication system and communication method
CN105743757A (en) * 2016-01-27 2016-07-06 南京埃斯顿自动化股份有限公司 Free networking method of RS485 communication terminal
KR20170135266A (en) * 2016-05-31 2017-12-08 유넷시스템주식회사 Key management device
CN107580085A (en) * 2017-10-26 2018-01-12 北京科技大学 A kind of internet of things networking method
CN108199867A (en) * 2017-12-20 2018-06-22 北京城市系统工程研究中心 A kind of network-building method and data transmission method of wired sensor network
CN108833602A (en) * 2018-05-24 2018-11-16 湖北文理学院 A kind of bus address auto-allocation method and system based on component manufacturing variation
CN108848199A (en) * 2018-05-28 2018-11-20 浙江嘉宏电力科技有限公司 A kind of peer-to-peer network automatic seeking main system and method
CN109698871A (en) * 2018-12-20 2019-04-30 京信通信系统(中国)有限公司 A kind of optical fiber distributed type access system and its management method
CN111541596A (en) * 2020-04-20 2020-08-14 广州致远电子有限公司 Relay response automatic numbering method, device, equipment and storage medium
CN111756610A (en) * 2020-05-29 2020-10-09 宁波三星医疗电气股份有限公司 RS485 bus communication time sequence control method
CN112199316A (en) * 2020-10-10 2021-01-08 海尔海斯(西安)控制技术有限公司 Configuration method and communication method of chain type master-slave serial port communication device
CN113099431A (en) * 2021-03-24 2021-07-09 瀚云科技有限公司 Communication method and device based on LoRa channel and LoRa host
CN113094321A (en) * 2021-04-30 2021-07-09 中煤科工集团重庆研究院有限公司 RS485 bus communication method based on group call and time slot allocation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8997202B2 (en) * 2012-12-06 2015-03-31 Owl Computing Technologies, Inc. System for secure transfer of information from an industrial control system network
TWI481245B (en) * 2012-12-19 2015-04-11 Motech Ind Inc Address setting method for slave devices of communication network

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07177161A (en) * 1993-12-21 1995-07-14 Hitachi Denshi Ltd Polling selecting method
JPH0823586A (en) * 1994-07-05 1996-01-23 Toshiba Syst Technol Kk Polling method in monitoring control system
US6700877B1 (en) * 1997-08-05 2004-03-02 Siemens Aktiengesellschaft Method and bus system for automatic address allocation
JPH1174915A (en) * 1997-08-29 1999-03-16 Nec Corp Automatic setting method for ip address in tcp/ip network
JP2003124946A (en) * 2001-10-10 2003-04-25 Nec Corp Microwave radio communication system and automatic address allocation method
WO2008052685A2 (en) * 2006-10-31 2008-05-08 Moeller Gmbh Method and arrangement for communication on an lin bus
JP2008301140A (en) * 2007-05-31 2008-12-11 Yokogawa Electric Corp Address acquisition system
CN101247290A (en) * 2008-03-14 2008-08-20 中兴通讯股份有限公司 Ethernet switchboard high temperature ageing real-time monitoring method and system
WO2015196654A1 (en) * 2014-06-26 2015-12-30 中兴通讯股份有限公司 Distributed management method and device for network management
CN104811339A (en) * 2015-04-23 2015-07-29 光一科技股份有限公司 Intelligent networking method based on arbitration-free bus
CN105578383A (en) * 2015-05-25 2016-05-11 上海归墟电子科技有限公司 2.4G-based networking communication system and communication method
CN105743757A (en) * 2016-01-27 2016-07-06 南京埃斯顿自动化股份有限公司 Free networking method of RS485 communication terminal
KR20170135266A (en) * 2016-05-31 2017-12-08 유넷시스템주식회사 Key management device
CN107580085A (en) * 2017-10-26 2018-01-12 北京科技大学 A kind of internet of things networking method
CN108199867A (en) * 2017-12-20 2018-06-22 北京城市系统工程研究中心 A kind of network-building method and data transmission method of wired sensor network
CN108833602A (en) * 2018-05-24 2018-11-16 湖北文理学院 A kind of bus address auto-allocation method and system based on component manufacturing variation
CN108848199A (en) * 2018-05-28 2018-11-20 浙江嘉宏电力科技有限公司 A kind of peer-to-peer network automatic seeking main system and method
CN109698871A (en) * 2018-12-20 2019-04-30 京信通信系统(中国)有限公司 A kind of optical fiber distributed type access system and its management method
CN111541596A (en) * 2020-04-20 2020-08-14 广州致远电子有限公司 Relay response automatic numbering method, device, equipment and storage medium
CN111756610A (en) * 2020-05-29 2020-10-09 宁波三星医疗电气股份有限公司 RS485 bus communication time sequence control method
CN112199316A (en) * 2020-10-10 2021-01-08 海尔海斯(西安)控制技术有限公司 Configuration method and communication method of chain type master-slave serial port communication device
CN113099431A (en) * 2021-03-24 2021-07-09 瀚云科技有限公司 Communication method and device based on LoRa channel and LoRa host
CN113094321A (en) * 2021-04-30 2021-07-09 中煤科工集团重庆研究院有限公司 RS485 bus communication method based on group call and time slot allocation

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
一种PLC扩展板寻址方法的实现;胡文等;制造业自动化(第11期);第36-38页 *
卢存伟等.微机原理及应用系统设计工业检测与控制.河海大学出版社,1992,(第1版),第267页. *
周志敏等.变频调速系统设计与维护.中国电力出版社,2007,(第1版),第152页. *
基于随机数发生器的设备地址自动分配方法;张垒等;《自动化与仪表》;20171130(第11期);第41-44页 *
潘永雄.STM8S系列单片机原理与应用.《STM8S系列单片机原理与应用》.西安电子科技大学出版社,2015,(第2版),第213-214页. *

Also Published As

Publication number Publication date
CN114097588A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN103119916A (en) Method for automatically assigning addresses to identical bus users
US6421317B1 (en) Method and apparatus for an automatic load balancing and back-up of a multi-users network
US6449289B1 (en) Multi-processor bus protocol system
CN113301568A (en) Network distribution method and device and intelligent household equipment
CN114553373A (en) Data transmission method, device, equipment and storage medium
JP2000307624A (en) Transmission information repeating system and its repeating device
CN112585927A (en) Communication link detection method, device and system and movable platform
CN109981404B (en) Ad hoc network structure and diagnosis method thereof
CN114097588B (en) Networking method and device of irrigation device
CN112698640A (en) ECU upgrading test system
CN114422288B (en) Communication system based on Modbus protocol
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
US11537485B2 (en) Test sequencing method, configuration generating method, and configuration generating apparatus for testing devices according to their communication protocols
CN110611678B (en) Method for identifying message and access network equipment
KR102021466B1 (en) Method and apparatus for configuring test environment of tactical data link software and computer readible storage medium therefor
CN107666371B (en) Communication method, device and system
CN108989168B (en) Method and apparatus for identification in a computer network
US11171857B2 (en) Identifying an electronic device connected to a communication network that has XCP enabled
US11711870B2 (en) Communication method, apparatus, and system, storage medium, and terminal
JP3432449B2 (en) Communication control apparatus and method
CN112887450B (en) Communication address configuration method and device of Internet of things equipment
CN113872818B (en) Method for detecting connection state of baseboard management control unit and server device thereof
CN110166558B (en) Communication method, device and equipment of multi-control storage cluster
WO2023005866A1 (en) Bus control method and related apparatus
CN110471799B (en) Server testing method

Legal Events

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