CN111163139A - Polling communication method and device of Internet of things - Google Patents
Polling communication method and device of Internet of things Download PDFInfo
- Publication number
- CN111163139A CN111163139A CN201911314864.XA CN201911314864A CN111163139A CN 111163139 A CN111163139 A CN 111163139A CN 201911314864 A CN201911314864 A CN 201911314864A CN 111163139 A CN111163139 A CN 111163139A
- Authority
- CN
- China
- Prior art keywords
- polling
- information
- terminal
- extension header
- current round
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements 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/1607—Details of the supervisory signal
- H04L1/1685—Details of the supervisory signal the supervisory signal being transmitted in response to a specific request, e.g. to a polling signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
- H04L43/103—Active monitoring, e.g. heartbeat, ping or trace-route with adaptive polling, i.e. dynamically adapting the polling rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/659—Internet protocol version 6 [IPv6] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Cardiology (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a polling communication method and a polling communication device for the Internet of things, wherein the method comprises the following steps: sending polling information to each first terminal, wherein the polling information is sent by an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset; receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset. The device is used for executing the method. The polling communication method and device for the Internet of things provided by the embodiment of the invention improve the reliability of communication of the Internet of things.
Description
Technical Field
The invention relates to the technical field of Internet of things, in particular to a polling communication method and device of the Internet of things.
Background
In recent years, internet of things devices are widely used in life and production, for example, the internet of things devices are attached to articles to realize data acquisition of the articles, such as position monitoring of luggage in an airport, related data acquisition of pipeline products in a factory, data acquisition of primary devices in a power system, and the like.
In the prior art, in order to obtain data of the internet of things device, a polling mode may be adopted. For example, the internet of things gateway sends inquiry information to internet of things equipment in communication connection with the internet of things gateway at intervals, inquires whether the internet of things equipment has data to upload, and waits for the internet of things equipment to upload the data within a set time; the internet of things equipment can return data needing to be uploaded to the gateway. In the existing polling mode, when data loss and other conditions occur, the lost data cannot be positioned.
Therefore, how to provide a polling communication method for the internet of things is an important issue to be solved in the field, which can improve the reliability of communication of the internet of things.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a polling communication method and device for the Internet of things.
In one aspect, the invention provides a polling communication method of an internet of things, which includes:
sending polling information to each first terminal, wherein the polling information is sent by an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset;
receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
In another aspect, the present invention provides a polling communication device for the internet of things, including:
a transmitting unit, configured to transmit polling information to each first terminal, where the polling information is transmitted by an IPv6 protocol and includes a first polling extension header and a destination terminal address, where the first polling extension header is used to record first polling behavior information; wherein the first poll extension header is preset;
a receiving unit, configured to receive response information returned by the first terminal corresponding to the address of the target terminal, where the response information is sent through an IPv6 protocol and includes a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
In another aspect, the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the polling communication method of the internet of things according to any one of the embodiments.
In yet another aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the polling communication method of the internet of things according to any one of the above embodiments.
The polling communication method and device for the internet of things provided by the embodiment of the invention can send polling information to each first terminal, the polling information is sent through an IPv6 protocol and comprises a first polling extension header and a target terminal address, the first polling extension header is used for recording first polling behavior information, response information returned by the first terminal corresponding to the target terminal address is received, the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information, the polling process can be accurately recorded by carrying the first polling behavior information and the second polling behavior information in the communication process, and the reliability of the communication of the internet of things is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic structural diagram of a communication system of the internet of things according to a first embodiment of the present invention.
Fig. 2 is a schematic flowchart of a polling communication method of the internet of things according to a second embodiment of the present invention.
Fig. 3 is a flowchart illustrating a polling communication method of the internet of things according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a communication system of the internet of things according to a fourth embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a polling communication device of the internet of things according to a fifth embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a polling communication device of the internet of things according to a sixth embodiment of the invention.
Fig. 7 is a schematic physical structure diagram of an electronic device according to a seventh embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a schematic structural diagram of a communication system of the internet of things according to a first embodiment of the present invention, and as shown in fig. 1, the communication system of the internet of things according to the embodiment of the present invention includes a second terminal 2 and a plurality of first terminals 1, and the second terminal 2 is in communication connection with each of the first terminals 1. The second terminal 2 and each first terminal 1 the second terminal 2 have respective link local addresses, the second terminal 2 can start a polling mechanism to communicate with each first terminal, an IPv6 Protocol (Internet Protocol Version 6) is adopted when the second terminal 2 communicates with each first terminal, the second terminal 2 can send polling information to each first terminal 1, the polling information can inquire whether each first terminal has data to be uploaded, each first terminal 1 can respond to the polling information and return response information to the second terminal 2, and the response information can include the data to be uploaded. The second terminal 2 includes, but is not limited to, a gateway and other devices, and is configured according to actual needs, which is not limited in the embodiment of the present invention. The first terminal 1 includes, but is not limited to, a sensor and other devices, and is configured according to actual needs, and the embodiment of the present invention is not limited.
IPv6 is a network layer protocol redesigned to overcome the exposed shortage of IPv4, the upper layer transmission protocol TCP/UDP is not changed, and the address space is 2 of IPv496Besides fundamentally solving the problem of insufficient IPv4 addresses, the method improves IPv4 in expansibility, service quality and safety.
The IPv6 protocol optimizes the message format again, and includes a header and data, specifically including an IPv6 basic header, an IPv6 extension header, and an upper layer protocol data unit, where the IPv6 extension header and the upper layer protocol data unit both belong to a data payload portion. In the IPv6 message, the IPv6 basic header is necessary, and the length is fixed to 40 bytes, which can increase the processing speed of the router on the data packet and improve the forwarding efficiency, thereby improving the overall throughput of the network and making the information transmission faster. The data load part can not exceed 65535 bytes, wherein the length of the IPv6 extension header is variable, the IPv6 protocol realizes various rich functions through the IPv6 extension header, 0, 1 or more IPv6 extension headers (extension headers) can exist, only 6 extension headers are defined in the prior RFC (Request For Comments, a series of memos issued by Internet engineering task force IETF and standard files For recording Internet specifications, protocols, procedures and the like), and the new IPv6 extension header and option types are allowed to be defined and designed to meet new business requirements and function requirements. The upper layer protocol data unit is composed of an upper layer protocol header and a payload, which may be an ICMPv6 message, a TCP message, or a UDP message.
Fig. 2 is a schematic flow chart of a polling communication method of the internet of things according to a second embodiment of the present invention, and as shown in fig. 2, the polling communication method of the internet of things according to the embodiment of the present invention includes:
s201, sending polling information to each first terminal, wherein the polling information is sent through an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset;
specifically, the second terminal may transmit polling information to each first terminal, the polling information being transmitted through the IPv6 protocol, and each first terminal may receive the polling information. The polling information includes a first polling extension header and a target terminal address, the first polling extension header is used for recording first polling behavior information and enabling a polling result to be visualized, and the first polling information may include a first identifier, a polling period, a polling task number of the polling round, the number of times of initiating an inquiry of the polling round and the number of times of receiving an answer of the polling round. The first polling extension header is preset and can be obtained by setting the IPv6 extension header. The destination terminal address may adopt a link local address of IPv 6.
S202, receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
Specifically, after receiving the polling information, each first terminal determines whether to respond to the polling information, that is, determines whether the destination terminal address is a local address, and if the first terminal determines that the destination terminal address is a local address, the first terminal is a first terminal corresponding to the destination terminal address, and may send response information to the second terminal through an IPv6 protocol. And if the first terminal judges that the target terminal address is not the local address, the first terminal does not need to respond to the polling information. The second terminal may receive response information returned by the first terminal corresponding to the destination terminal address. The response information includes a second polling extension header, the second polling extension header is used for recording second polling behavior information, and enabling a polling result to be visualized, and the second polling information may include a second identifier, a polling task number of the current round, and a data mutation identifier. The second polling extension header is preset and can be obtained by setting the IPv6 extension header.
The polling communication method of the internet of things provided by the embodiment of the invention can send polling information to each first terminal, the polling information is sent through an IPv6 protocol, the polling information comprises a first polling extension header and a target terminal address which are used for recording first polling behavior information, response information returned by the first terminal corresponding to the target terminal address is received, the response information is sent through an IPv6 protocol and comprises a second polling extension header which is used for recording second polling behavior information, the polling process can be accurately recorded by carrying the first polling behavior information and the second polling behavior information in the communication process, and the reliability of the communication of the internet of things is improved. In addition, in the debugging process of the communication system of the Internet of things, if a problem occurs, the problem can be quickly positioned through the first polling behavior information and the second polling behavior information.
On the basis of the foregoing embodiments, further, the first polling behavior information includes a first identifier, a polling period, a polling task number of the current round, the number of times of initiating an inquiry of the current round, and the number of times of receiving a response of the current round.
Specifically, the first polling behavior information includes a first identifier, a polling period, a polling task number of the current round, the number of times of initiating an inquiry of the current round, and the number of times of receiving a response of the current round. Wherein the first identifier is used for indicating that the polling information is sent by the second terminal; the polling period is used for indicating a period of the second terminal for sending polling information, and can be expressed in seconds; the polling task number of the current round is used for recording the total number of polling times, can be represented by seconds between the current time and the day zero point, and can be counted to 86400s, the sending time of the polling information can be determined, and when a problem occurs, the time of the problem can be determined; the number of times of initiating the inquiry in the current round is the number of times of sending the polling information in the current round of polling, namely, the number of times of initiating the inquiry in the current round is increased by 1 when the second terminal sends the polling information once in the current round of polling, and the number of times of initiating the inquiry in the current round can be used for determining which polling information is sent, and as each round of polling is directed to one first terminal, when the first terminal has a problem, which first terminal has the problem can be determined; the number of times of receiving the response in this round is used to indicate that the second terminal has received several responses to the polling information in this round of polling, and the number of times of receiving the response in this round may be used to determine the completion of this round of polling, that is, how many first terminals have responded to the polling information.
For example, table 1 is a first polling behavior information table, and as shown in table 1, the first polling extension header includes eight bytes, and when the first byte is 00000001, the first polling extension header is the first identifier indicating that the polling information is transmitted by the second terminal. The second byte is used to indicate the polling period, which is 255 seconds at the maximum, in seconds. Four bytes from the third byte to the sixth byte represent the polling task number of the current round, the maximum time of sending the polling information is 86400 in seconds from the zero point of the current day, and the number is reset every day. The seventh byte represents the number of times of initiating the inquiry in the current round, that is, the count of the second terminal is increased by 1 every time of initiating the inquiry in the current round, and the number of the first terminals does not exceed 255 in the embodiment of the present invention. The eighth byte represents the number of times of receiving the response in the current round, that is, the count of the number of times of receiving the response in the current round is increased by 1 every time the second terminal receives the response information returned by the first terminal in the current round of polling.
Table 1 first polling behavior information table
On the basis of the foregoing embodiments, further, the second polling behavior information includes a second identifier, a polling task number of the current round, and a data mutation identifier.
Specifically, the second polling behavior information includes a second identifier, a polling task number of the current round, and a data mutation identifier. Wherein the second identifier is used for indicating that the response information is sent to the second terminal by the first terminal. The polling task number of the current round is used for recording the number of times of polling, can be represented by seconds from the current time to the current zero point of the day, and can count to 86400s, can determine the sending time of the polling information, and when a problem occurs, can determine the time of the problem occurrence, and can obtain the time from the polling information. The data mutation identifier is used for indicating that the state of the device detected by the first terminal changes, and is set according to actual needs, which is not limited in the embodiment of the present invention.
For example, table 2 is a second polling behavior information table, and as shown in table 2, the second polling extension header includes eight bytes, and when the first byte is 00000000, the second polling extension header indicates that the polling information is sent by the first terminal to the second terminal. The second byte defaults to 0 and has no meaning. Four bytes from the third byte to the sixth byte represent the polling task number of the current round, and the maximum time of sending the polling information is 86400 in seconds from the zero point of the current day, and the number is cleared and restarted every day, which can be obtained from the polling task number of the current round included in the polling information. The seventh byte represents a data mutation identifier, which indicates whether a mutation occurs in the state of the device corresponding to the first terminal, and may be represented by 00000001 if the mutation occurs in the state of the device, or by 00000000 if the mutation does not occur in the state of the device. The eighth byte defaults to 0 and has no meaning. The sudden change of the device state may be a change of a switch state, a data change exceeds a threshold value, and the like, and the setting is performed according to actual needs.
Table 2 second polling behavior information table
Fig. 3 is a schematic flow chart of a polling communication method of the internet of things according to a third embodiment of the present invention, and as shown in fig. 3, the polling communication method of the internet of things according to the embodiment of the present invention further includes:
s203, if the response information returned by the first terminal corresponding to the target terminal address is not received within the preset time, determining that the first terminal corresponding to the target terminal address has a fault.
Specifically, after the second terminal sends the polling information, if no response information returned by the first terminal corresponding to the target address is received within a preset time, it is indicated that the first terminal corresponding to the target address has a problem and cannot respond to the polling information, the second terminal may determine a fault corresponding to the target address, and the second terminal may report fault information, so that a worker may maintain the first terminal having the fault. The preset time is set according to actual needs, and the embodiment of the invention is not limited.
Fig. 4 is a schematic structural diagram of a communication system of the internet of things according to a fourth embodiment of the present invention, and as shown in fig. 4, the communication system of the internet of things includes an edge gateway 41, a location sensor 42, a temperature sensor 43, and a humidity sensor 44, where the edge gateway 41 is in communication connection with the location sensor 42, the temperature sensor 43, and the humidity sensor 44, respectively, and performs data transmission through an IPv6 protocol. Position sensor 42 is used for detecting the switch position of the circuit breaker of the power switch cabinet, temperature sensor 43 is used for detecting the temperature in the power switch cabinet, and humidity sensor 44 is used for detecting the humidity in the power switch cabinet. The edge gateway 41 acquires the detection data of the position sensor 42, the temperature sensor 43 and the humidity sensor 44 by using the polling communication method of the internet of things provided by the embodiment of the invention, assuming that the polling period is 20s, the polling is performed three times per round, the link local address of the edge gateway 41 is IP1, the link local address of the position sensor 42 is IP2, the link local address of the temperature sensor 43 is IP3, and the link local address of the humidity sensor 44 is IP 4.
Assuming that the first polling of the round is performed at 10 am, the edge gateway 41 sends polling information a to the location sensor 42, the temperature sensor 43, and the humidity sensor 44 respectively by using an IPv6 protocol, where the polling information a includes a first polling extension header, and the first polling extension header records a first identifier, a polling period, a polling task number of the round, the number of times of initiating queries of the round, and the number of times of receiving responses of the round. The first identification binary is represented as 00000001, the polling cycle is 20s, the binary is represented as 00010100, the polling task number of the current round is 36000, the secondary system is represented as 00000000000000001000110010100000, the number of times of initiating the inquiry of the current round is 1, the binary is represented as 00000001, the number of times of receiving the response of the current round is 0, and the binary is represented as 00000000. The polling information a also includes the link local address of the edge gateway 41 being IP1 and the link local address of the location sensor 42 being IP 2.
After receiving the polling information a, the position sensor 42 determines that the link local address IP2 included in the polling information a is a local link local address, and sends the detected switch position of the circuit breaker to the edge gateway 41 through the IPv6 protocol by carrying the switch position in the response information a. The response information a further comprises a second polling extension header, and the second polling extension header records a second identifier, a polling task number of the current round and a data mutation identifier. The second identification binary expression is 00000000, the polling task number of the current round is 36000 and the second-level system expression is 00000000000000001000110010100000, the data mutation identification is obtained by comparing whether the switch position of the breaker obtained by the current detection is the same as the switch position of the breaker obtained by the last detection, if so, the binary expression of the data mutation identification is 00000000, and if not, the binary expression of the data mutation identification is 00000001. After the temperature sensor 43 and the humidity sensor 44 receive the polling information a, it can be determined that the polling information a includes a link local address IP2 different from the local link local address, and does not respond to the polling information a.
The edge gateway 41 will perform the second round of polling at 0 minute and 20 seconds at 10 am, the edge gateway 41 sends polling information B to the location sensor 42, the temperature sensor 43 and the humidity sensor 44 respectively by using an IPv6 protocol, and the polling information B includes a first polling extension header, where the first polling extension header records a first identifier, a polling period, a polling task number of the round, the number of times of initiating queries of the round, and the number of times of receiving responses of the round. The first identification binary is represented as 00000001, the polling cycle is 20s, the binary is represented as 00010100, the polling task number of the current round is 36020, the secondary system is represented as 00000000000000001000110010110100, the number of times of initiating the inquiry of the current round is 2, the binary is represented as 00000010, the number of times of receiving the response of the current round is 1, and the binary is represented as 00000001. The polling information B also includes the link local address of the edge gateway 41 being IP1 and the link local address of the temperature sensor 43 being IP 3.
After receiving the polling information B, the temperature sensor 43 determines that the link local address IP3 included in the polling information B is a local link local address, and sends the detected temperature in the power switch cabinet to the edge gateway 41 through the IPv6 protocol by carrying the detected temperature in the response information B. The response information b also comprises a second polling extension header, and the second polling extension header records a second identifier, the polling task number of the current round and a data mutation identifier. The second identification binary expression is 00000000, the polling task number of the current round is 36020, the second-level system expression is 00000000000000001000110010110100, the data mutation identification is obtained by judging the difference between the temperature obtained by the current detection and the temperature obtained by the last detection, if the absolute value of the difference is smaller than the temperature threshold value, the binary expression of the data mutation identification is 00000000, and if the absolute value of the difference is larger than or equal to the temperature threshold value, the binary expression of the data mutation identification is 00000001. After the polling message B is received by the position sensor 42 and the humidity sensor 44, it can be determined that the polling message B includes a link local address IP3 different from the local link local address and does not respond to the polling message B.
The edge gateway 41 will perform the third round of polling at 0 minute and 40 seconds at 10 am, the edge gateway 41 sends polling information C to the location sensor 42, the temperature sensor 43 and the humidity sensor 44 respectively by using an IPv6 protocol, and the polling information C includes a first polling extension header, where the first polling extension header records a first identifier, a polling period, a polling task number of the round, the number of times of initiating queries of the round, and the number of times of receiving responses of the round. The first identification binary is represented as 00000001, the polling cycle is 20s, the binary is represented as 00010100, the polling task number of the current round is 36040, the secondary system is represented as 00000000000000001000110011001000, the number of times of initiating the inquiry of the current round is 3, the binary is represented as 00000011, the number of times of receiving the response of the current round is 2, and the binary is represented as 00000010. The polling information C also includes the link local address of the edge gateway 41 being IP1 and the link local address of the degree sensor 44 being IP 4. The temperature threshold is set according to practical experience, and the embodiment of the invention is not limited.
After receiving the polling information C, the humidity sensor 44 determines that the link local address IP4 included in the polling information C is the local link local address, and sends the detected humidity in the power switch cabinet to the edge gateway 41 through the IPv6 protocol by carrying the detected humidity in the response information C. The response information c further comprises a second polling extension header, and the second polling extension header records a second identifier, a polling task number of the current round and a data mutation identifier. The second identification binary expression is 00000000, the polling task number of the current round is obtained from polling information C, the polling task number of the current round is 36040, the second-level system expression is 00000000000000001000110011001000, the data mutation identification is obtained by judging the difference value between the humidity obtained by the current detection and the humidity obtained by the last detection, if the absolute value of the difference value is smaller than the humidity threshold value, the binary expression of the data mutation identification is 000000000000, and if the absolute value of the difference value is larger than or equal to the humidity threshold value, the binary expression of the data mutation identification is 00000001. After the polling information C is received by the position sensor 42 and the temperature sensor 43, it can be determined that the polling information C includes a link local address IP4 different from the local link local address and does not respond to the polling information C. The humidity threshold is set according to practical experience, and the embodiment of the present invention is not limited.
According to the scheme, the polling communication method of the Internet of things provided by the invention has the advantages that the first polling expansion header records the first polling behavior information, the second polling expansion header records the second polling behavior information, the polling process is visualized, the problem of the communication system of the Internet of things provided by the embodiment of the invention can be conveniently found in the debugging process, and the debugging time is shortened.
Fig. 5 is a schematic structural diagram of a polling communication device of the internet of things according to a fifth embodiment of the present invention, and as shown in fig. 5, the polling communication device of the internet of things according to the embodiment of the present invention includes a sending unit 501 and a receiving unit 502, where:
the sending unit 501 is configured to send polling information to each first terminal, where the polling information is sent by an IPv6 protocol and includes a first polling extension header and a destination terminal address for recording first polling behavior information; wherein the first poll extension header is preset; the receiving unit 502 is configured to receive response information returned by the first terminal corresponding to the address of the target terminal, where the response information is sent through an IPv6 protocol and includes a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
Specifically, the transmitting unit 501 may transmit polling information, which is transmitted by the IPv6 protocol, to each first terminal, and each first terminal may receive the polling information. The polling information includes a first polling extension header and a target terminal address, the first polling extension header is used for recording first polling behavior information and enabling a polling result to be visualized, and the first polling information may include a first identifier, a polling period, a polling task number of the polling round, the number of times of initiating an inquiry of the polling round and the number of times of receiving an answer of the polling round. The first polling extension header is preset and can be obtained by setting the IPv6 extension header. The destination terminal address may adopt a link local address of IPv 6.
Specifically, after receiving the polling information, each first terminal determines whether to respond to the polling information, that is, determines whether the destination terminal address is a local address, and if the first terminal determines that the destination terminal address is a local address, the first terminal is a first terminal corresponding to the destination terminal address, and may send response information to the receiving unit 502 through an IPv6 protocol. And if the first terminal judges that the target terminal address is not the local address, the first terminal does not need to respond to the polling information. The receiving unit 502 may receive response information returned by the first terminal corresponding to the address of the target terminal. The response information includes a second polling extension header, the second polling extension header is used for recording second polling behavior information, and enabling a polling result to be visualized, and the second polling information may include a second identifier, a polling task number of the current round, and a data mutation identifier. The second polling extension header is preset and can be obtained by setting the IPv6 extension header.
The polling communication device for the internet of things provided by the embodiment of the invention can send polling information to each first terminal, the polling information is sent through an IPv6 protocol, the polling information comprises a first polling extension header and a target terminal address, the first polling extension header is used for recording first polling behavior information, response information returned by the first terminal corresponding to the target terminal address is received, the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information, the polling process can be accurately recorded by carrying the first polling behavior information and the second polling behavior information in the communication process, and the reliability of the communication of the internet of things is improved. In addition, in the debugging process of the communication system of the Internet of things, if a problem occurs, the problem can be quickly positioned through the first polling behavior information and the second polling behavior information.
On the basis of the foregoing embodiments, further, the first polling behavior information includes a first identifier, a polling period, a polling task number of the current round, the number of times of initiating an inquiry of the current round, and the number of times of receiving a response of the current round.
Specifically, the first polling behavior information includes a first identifier, a polling period, a polling task number of the current round, the number of times of initiating an inquiry of the current round, and the number of times of receiving a response of the current round. Wherein the first identifier is used for indicating that the polling information is sent by the second terminal; the polling period is used for indicating a period of the second terminal for sending polling information, and can be expressed in seconds; the polling task number of the current round is used for recording the total number of polling times, can be represented by seconds between the current time and the day zero point, and can be counted to 86400s, the sending time of the polling information can be determined, and when a problem occurs, the time of the problem can be determined; the number of times of initiating the inquiry in the current round is the number of times of sending the polling information in the current round of polling, namely, the number of times of initiating the inquiry in the current round is increased by 1 when the second terminal sends the polling information once in the current round of polling, and the number of times of initiating the inquiry in the current round can be used for determining which polling information is sent, and as each round of polling is directed to one first terminal, when the first terminal has a problem, which first terminal has the problem can be determined; the number of times of receiving the response in this round is used to indicate that the second terminal has received several responses to the polling information in this round of polling, and the number of times of receiving the response in this round may be used to determine the completion of this round of polling, that is, how many first terminals have responded to the polling information.
On the basis of the foregoing embodiments, further, the second polling behavior information includes a second identifier, a polling task number of the current round, and a data mutation identifier.
Specifically, the second polling behavior information includes a second identifier, a polling task number of the current round, and a data mutation identifier. Wherein the second identifier is used for indicating that the response information is sent to the second terminal by the first terminal. The polling task number of the current round is used for recording the number of times of polling, can be represented by seconds from the current time to the current zero point of the day, and can count to 86400s, can determine the sending time of the polling information, and when a problem occurs, can determine the time of the problem occurrence, and can obtain the time from the polling information. The data mutation identifier is used for indicating that the state of the device detected by the first terminal changes, and is set according to actual needs, which is not limited in the embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a polling communication device of the internet of things according to a sixth embodiment of the present invention, and as shown in fig. 6, on the basis of the foregoing embodiments, further, the polling communication device of the internet of things according to the embodiment of the present invention further includes a determining unit 503, where:
the determining unit 503 is configured to determine that the first terminal corresponding to the target terminal address has a fault after the response information returned by the first terminal corresponding to the target terminal address is not received within the preset time.
Specifically, after the polling information is sent, if no response information returned by the first terminal corresponding to the target address is received within a preset time, it is indicated that the first terminal corresponding to the target address has a problem and cannot respond to the polling information, the determining unit 503 may determine a fault corresponding to the target address, and the determining unit 503 may report fault information, so that a worker may maintain the first terminal having the fault. The preset time is set according to actual needs, and the embodiment of the invention is not limited.
The embodiment of the apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 7 is a schematic physical structure diagram of an electronic device according to a seventh embodiment of the present invention, and as shown in fig. 7, the electronic device may include: a processor (processor)701, a communication Interface (Communications Interface)702, a memory (memory)703 and a communication bus 704, wherein the processor 701, the communication Interface 702 and the memory 703 complete communication with each other through the communication bus 704. The processor 701 may call logic instructions in the memory 703 to perform the following method: sending polling information to each first terminal, wherein the polling information is sent by an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset; receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
In addition, the logic instructions in the memory 703 can be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: sending polling information to each first terminal, wherein the polling information is sent by an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset; receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes: sending polling information to each first terminal, wherein the polling information is sent by an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset; receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A polling communication method of the Internet of things is characterized by comprising the following steps:
sending polling information to each first terminal, wherein the polling information is sent by an IPv6 protocol and comprises a first polling expansion header and a target terminal address, and the first polling expansion header is used for recording first polling behavior information; wherein the first poll extension header is preset;
receiving response information returned by the first terminal corresponding to the target terminal address, wherein the response information is sent through an IPv6 protocol and comprises a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
2. The method of claim 1, wherein the first polling behavior information comprises a first identifier, a polling period, a polling task number of the current round, the number of times the current round initiates an inquiry, and the number of times the current round receives a response.
3. The method of claim 1, wherein the second polling behavior information comprises a second identifier, a polling task number of the current round, and a data mutation identifier.
4. The method of any of claims 1 to 3, further comprising:
and if the response information returned by the first terminal corresponding to the target terminal address is not received within the preset time, determining that the first terminal corresponding to the target terminal address has a fault.
5. A polling communication device of the Internet of things is characterized by comprising:
a transmitting unit, configured to transmit polling information to each first terminal, where the polling information is transmitted by an IPv6 protocol and includes a first polling extension header and a destination terminal address, where the first polling extension header is used to record first polling behavior information; wherein the first poll extension header is preset;
a receiving unit, configured to receive response information returned by the first terminal corresponding to the address of the target terminal, where the response information is sent through an IPv6 protocol and includes a second polling extension header used for recording second polling behavior information; wherein the second poll extension header is preset.
6. The apparatus of claim 5, wherein the first polling behavior information comprises a first identifier, a polling period, a polling task number of the current round, the number of times the query is initiated in the current round, and the number of times the response is received in the current round.
7. The apparatus of claim 5, wherein the second polling behavior information comprises a second identifier, a polling task number of the current round, and a data mutation identifier.
8. The apparatus of any one of claims 5 to 7, further comprising:
and the determining unit is used for determining that the first terminal corresponding to the target terminal address has a fault after the response information returned by the first terminal corresponding to the target terminal address is not received within the preset time.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911314864.XA CN111163139B (en) | 2019-12-19 | 2019-12-19 | Polling communication method and device of Internet of things |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911314864.XA CN111163139B (en) | 2019-12-19 | 2019-12-19 | Polling communication method and device of Internet of things |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111163139A true CN111163139A (en) | 2020-05-15 |
CN111163139B CN111163139B (en) | 2022-07-29 |
Family
ID=70557405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911314864.XA Active CN111163139B (en) | 2019-12-19 | 2019-12-19 | Polling communication method and device of Internet of things |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111163139B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113110179A (en) * | 2021-04-16 | 2021-07-13 | 广东电网有限责任公司清远供电局 | Electric power safety early warning method, device, equipment and storage medium based on edge calculation |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1531263A (en) * | 2003-03-14 | 2004-09-22 | ������������ʽ���� | Communication system, connector, communication method and identifying method |
CN101437293A (en) * | 2008-12-05 | 2009-05-20 | 浙江大学 | Method for polling long distance wireless multi-hop data facing transparent transmission equipment |
WO2010037893A1 (en) * | 2008-09-30 | 2010-04-08 | Nokia Corporation | Communication of mapping information |
CN102598624A (en) * | 2009-11-18 | 2012-07-18 | Lg电子株式会社 | Apparatus for transmitting MAC pdu with a fragmentation and packing extended header and method thereof |
CN104519554A (en) * | 2014-12-12 | 2015-04-15 | 重庆邮电大学 | Method for supporting parallel access of multiband 6LoWSNs (IPv6 over low power wireless sensor networks) to internet |
US20150205991A1 (en) * | 2014-01-22 | 2015-07-23 | Electronics And Telecommunications Research Institute | Internet-of-things system for public transportation service and method of operating same |
CN106412050A (en) * | 2016-09-26 | 2017-02-15 | 美的智慧家居科技有限公司 | Equipment, client and server in Internet of things and communication method thereof |
US20170237835A1 (en) * | 2014-08-21 | 2017-08-17 | Nokia Technologies Oy | Ipv4 communications using 6lowpan header compression mechanisms |
CN107360269A (en) * | 2017-07-21 | 2017-11-17 | 中国移动通信集团江苏有限公司 | Domain name analysis system optimization method, device, equipment and storage medium |
CN109981668A (en) * | 2019-04-02 | 2019-07-05 | 四川尊古科技有限公司 | Common apparatus Internet of Things communication means based on the extensive agreement of MQTT |
-
2019
- 2019-12-19 CN CN201911314864.XA patent/CN111163139B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1531263A (en) * | 2003-03-14 | 2004-09-22 | ������������ʽ���� | Communication system, connector, communication method and identifying method |
WO2010037893A1 (en) * | 2008-09-30 | 2010-04-08 | Nokia Corporation | Communication of mapping information |
CN101437293A (en) * | 2008-12-05 | 2009-05-20 | 浙江大学 | Method for polling long distance wireless multi-hop data facing transparent transmission equipment |
CN102598624A (en) * | 2009-11-18 | 2012-07-18 | Lg电子株式会社 | Apparatus for transmitting MAC pdu with a fragmentation and packing extended header and method thereof |
US20150205991A1 (en) * | 2014-01-22 | 2015-07-23 | Electronics And Telecommunications Research Institute | Internet-of-things system for public transportation service and method of operating same |
US20170237835A1 (en) * | 2014-08-21 | 2017-08-17 | Nokia Technologies Oy | Ipv4 communications using 6lowpan header compression mechanisms |
CN104519554A (en) * | 2014-12-12 | 2015-04-15 | 重庆邮电大学 | Method for supporting parallel access of multiband 6LoWSNs (IPv6 over low power wireless sensor networks) to internet |
CN106412050A (en) * | 2016-09-26 | 2017-02-15 | 美的智慧家居科技有限公司 | Equipment, client and server in Internet of things and communication method thereof |
CN107360269A (en) * | 2017-07-21 | 2017-11-17 | 中国移动通信集团江苏有限公司 | Domain name analysis system optimization method, device, equipment and storage medium |
CN109981668A (en) * | 2019-04-02 | 2019-07-05 | 四川尊古科技有限公司 | Common apparatus Internet of Things communication means based on the extensive agreement of MQTT |
Non-Patent Citations (2)
Title |
---|
KYU OUK LEE: "《Application method of QoS, IPv6, Security in WiBro》", 《IEEE》 * |
盖昊宇等: "混合服务策略轮询特性下物联网传感节点设计", 《佳木斯大学学报(自然科学版)》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113110179A (en) * | 2021-04-16 | 2021-07-13 | 广东电网有限责任公司清远供电局 | Electric power safety early warning method, device, equipment and storage medium based on edge calculation |
Also Published As
Publication number | Publication date |
---|---|
CN111163139B (en) | 2022-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109688057B (en) | Message forwarding method and device of segment routing network based on IPV6 | |
EP2388956B1 (en) | Ascertaining per-hop network characteristics | |
CN113411260B (en) | Method and device for sending data message in IPv6 network | |
CA2469169A1 (en) | Method and apparatus for determination of network topology | |
CN110266650B (en) | Identification method of Conpot industrial control honeypot | |
CN110740144B (en) | Method, device, equipment and storage medium for determining attack target | |
CN111163139B (en) | Polling communication method and device of Internet of things | |
CN107465621B (en) | Router discovery method, SDN controller, router and network system | |
CN112118151A (en) | Network speed measuring method, device, system, electronic equipment and storage medium | |
CN113973111B (en) | Data forwarding method, device, gateway equipment and computer readable storage medium | |
US20080181215A1 (en) | System for remotely distinguishing an operating system | |
CN114745456A (en) | Message processing method and device and network address translation equipment | |
CN110912904B (en) | Malicious device identification method and device, storage medium and computer device | |
CN111064729B (en) | Message processing method and device, storage medium and electronic device | |
CN110838950B (en) | Method and device for determining network performance jitter value | |
CN110109933B (en) | Information maintenance method, configuration management database system and storage medium | |
GB2621412A (en) | Correlating protocol data units transiting networks with differing addressing schemes | |
CN110099001B (en) | Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment | |
US9912557B2 (en) | Node information detection apparatus, node information detection method, and program | |
CN109889619B (en) | Abnormal domain name monitoring method and device based on block chain | |
US9191268B2 (en) | Extension for the simple network management protocol (SNMP) in order to ascertain information on the status of SET-PDUS | |
CN110535983B (en) | Message forwarding method and device | |
CN111130941A (en) | Network error detection method and device | |
CN111641698B (en) | Data statistical method, system, equipment and storage medium | |
CN112910997B (en) | Resource acquisition method of local area network |
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 |