CN110995513B - Data sending and receiving method in Internet of things system, internet of things equipment and platform - Google Patents

Data sending and receiving method in Internet of things system, internet of things equipment and platform Download PDF

Info

Publication number
CN110995513B
CN110995513B CN201911379556.5A CN201911379556A CN110995513B CN 110995513 B CN110995513 B CN 110995513B CN 201911379556 A CN201911379556 A CN 201911379556A CN 110995513 B CN110995513 B CN 110995513B
Authority
CN
China
Prior art keywords
gateway
internet
things
equipment
information
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
CN201911379556.5A
Other languages
Chinese (zh)
Other versions
CN110995513A (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.)
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte Ltd
Original Assignee
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte 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 Shanghai Envision Innovation Intelligent Technology Co Ltd, Envision Digital International Pte Ltd filed Critical Shanghai Envision Innovation Intelligent Technology Co Ltd
Priority to CN201911379556.5A priority Critical patent/CN110995513B/en
Publication of CN110995513A publication Critical patent/CN110995513A/en
Application granted granted Critical
Publication of CN110995513B publication Critical patent/CN110995513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The embodiment of the application discloses a data sending and receiving method in an Internet of things system, internet of things equipment and a platform, and belongs to the field of Internet of things. The method comprises the following steps: when the Internet of things equipment acquires gateway group information, equipment data are sent to the Internet of things platform through a first gateway device of at least two candidate gateway devices; when the equipment data transmission fails, the Internet of things equipment determines second gateway equipment different from the first gateway equipment from the at least two candidate gateway equipment, and equipment data is continuously transmitted to the Internet of things platform through the second gateway equipment.

Description

Data sending and receiving method in Internet of things system, internet of things equipment and platform
Technical Field
The embodiment of the application relates to the field of Internet of things, in particular to a data sending and receiving method in an Internet of things system, internet of things equipment and a platform.
Background
In an internet of things system, the processing and storage capacities of internet of things devices are relatively limited, and the internet of things devices and an internet of things platform are often required to be used for communication.
In the related technology, a user manually configures the topological relation between the internet of things equipment and the gateway equipment, that is, the internet of things equipment and the designated gateway equipment are statically bound, the internet of things equipment can only send data and receive instructions to the internet of things platform through the designated gateway equipment, when the designated gateway equipment breaks down, the internet of things equipment cannot communicate with the internet of things platform, the internet of things equipment and new gateway equipment need to be re-bound in a manual configuration mode, and after the internet of things equipment is restarted, communication is continuously performed with the internet of things platform through the new gateway equipment.
However, by using the data sending and receiving method in the related art, when the designated gateway device fails, the internet of things device and the internet of things platform can resume communication only by manually binding the internet of things device with the new gateway device, which is relatively complicated and time-consuming in operation.
Disclosure of Invention
The embodiment of the application provides a data sending and receiving method in an Internet of things system, internet of things equipment and a platform. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a data sending method in an internet of things system, where the method includes:
acquiring gateway group information, wherein the gateway group information comprises gateway information of at least two candidate gateway devices;
sending device data to the Internet of things platform through a first gateway device of the at least two candidate gateway devices;
when the device data transmission fails, determining a second gateway device from the at least two candidate gateway devices, wherein the second gateway device is different from the first gateway device;
and sending the equipment data to the Internet of things platform through the second gateway equipment.
In another aspect, an embodiment of the present application provides a data receiving method in an internet of things system, where the method includes:
sending gateway group information to target Internet of things equipment, wherein the gateway group information comprises gateway information of at least two candidate gateway devices;
receiving device data sent by the target internet of things device through a first gateway device, wherein the first gateway device belongs to the at least two candidate gateway devices;
and when the equipment data transmission fails, receiving the equipment data transmitted by the target Internet of things equipment through second gateway equipment, wherein the second gateway equipment belongs to the at least two candidate gateway equipment and is different from the first gateway equipment.
In another aspect, an embodiment of the present application provides a data transmission apparatus in an internet of things system, the apparatus including:
the first acquisition module is used for acquiring gateway group information, wherein the gateway group information comprises gateway information of at least two candidate gateway devices;
the first sending module is used for sending the device data to the Internet of things platform through a first gateway device of the at least two candidate gateway devices;
a determining module, configured to determine, when the device data transmission fails, a second gateway device from the at least two candidate gateway devices, where the second gateway device is different from the first gateway device;
and the second sending module is used for sending the equipment data to the Internet of things platform through the second gateway equipment.
In another aspect, an embodiment of the present application provides a data receiving apparatus in an internet of things system, where the apparatus includes:
a sixth sending module, configured to send gateway group information to a target internet of things device, where the gateway group information includes gateway information of at least two candidate gateway devices;
a first receiving module, configured to receive, through a first gateway device, device data sent by the target internet of things device, where the first gateway device belongs to the at least two candidate gateway devices;
and the second receiving module is used for receiving the device data sent by the target internet of things device through a second gateway device when the device data is failed to be sent, wherein the second gateway device belongs to the at least two candidate gateway devices and is different from the first gateway device.
In another aspect, an embodiment of the present application provides an internet of things device, where the internet of things device includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the data transmission method in the internet of things system according to the above aspect.
In another aspect, an embodiment of the present application provides an internet of things platform, where the internet of things platform includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the data receiving method in the internet of things system according to the foregoing aspect.
On the other hand, an embodiment of the application provides an internet of things system, wherein the internet of things system comprises at least one internet of things device, at least two gateway devices and an internet of things platform, and the internet of things device is used for sending device data to the internet of things platform through the gateway device;
the internet of things device comprises the internet of things device in the aspect;
the internet of things platform comprises the internet of things platform in the aspect.
In another aspect, an embodiment of the present application provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the computer-readable storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the data transmission and reception methods in the internet of things system according to the above aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
when the Internet of things equipment acquires gateway group information which comprises gateway information of at least two candidate gateway devices, sending equipment data to the Internet of things platform through a first gateway device of the at least two candidate gateway devices; when the equipment data transmission fails, the IOT equipment determines second gateway equipment different from the first gateway equipment from the at least two candidate gateway equipment, and continuously transmits the equipment data to the IOT platform through the second gateway equipment, and the IOT equipment is associated with the at least two candidate gateway equipment, so that the IOT equipment can automatically select other candidate gateway equipment when the first gateway equipment fails, and continuously communicate with the IOT platform through the other candidate gateway equipment, the relation between the IOT equipment and the gateway equipment is prevented from being manually reconfigured, and the operation steps of recovering data transmission are simplified.
Drawings
Fig. 1 is a schematic diagram illustrating an implementation of data transmission and reception processes in an internet of things system in the related art;
FIG. 2 illustrates a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating a data transmission and reception method in an internet of things system according to an exemplary embodiment of the present application;
fig. 4 is a flowchart illustrating a data transmitting and receiving method in an internet of things system according to another exemplary embodiment of the present application;
fig. 5 is a flowchart illustrating a target internet of things device reestablishing a connection with a first gateway device according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a target internet of things device reestablishing a connection with a first gateway device according to another embodiment of the present application;
FIG. 7 is a flow chart illustrating a data sending and receiving process in an Internet of things system according to an exemplary embodiment of the application;
fig. 8 is a block diagram illustrating a data transmission apparatus in an internet of things system according to an exemplary embodiment of the present application;
fig. 9 is a block diagram illustrating a data receiving apparatus in an internet of things system according to an exemplary embodiment of the present application;
fig. 10 is a block diagram illustrating a structure of an internet of things device according to an exemplary embodiment of the present application;
fig. 11 illustrates a schematic structural diagram of an internet of things platform according to an exemplary embodiment of the present application;
fig. 12 is a system architecture diagram of an internet of things system provided by an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
A method for transmitting and receiving data in an internet of things system is provided in the related art, and as shown in fig. 1, an implementation diagram of a data transmitting and receiving process in the internet of things system in the related art is shown. The internet of things system comprises an internet of things platform 101, a plurality of gateway devices and a plurality of internet of things devices.
In the internet of things system, the internet of things equipment communicates with the internet of things platform through the gateway equipment, in the related technology, a user manually configures the topological relation between the internet of things equipment and the gateway equipment, namely the internet of things equipment and the specified gateway equipment are statically bound, the internet of things equipment can only send data and receive instructions to the internet of things platform through the specified gateway equipment, for example, both the internet of things equipment 2 and the internet of things equipment 4 can only carry out data transmission with the internet of things platform 101 through the gateway equipment 1; both the internet of things device 1 and the internet of things device 3 can only perform data transmission with the internet of things platform 101 through the gateway device 2. When the gateway device 1 fails, the internet of things device 1 and the internet of things device 4 cannot communicate with the internet of things platform 101, and the topological relation between the internet of things device and the gateway device needs to be reconfigured manually, for example, the internet of things device 1 and the internet of things device 4 are manually bound with the gateway device 2 again, and after the internet of things device 1 and the physical network device 4 are restarted, the internet of things device 1 and the physical network device 4 can continue to communicate with the internet of things platform 101 through the gateway device 2.
By adopting the method in the technology, because the relationship between the internet of things equipment and the designated gateway equipment is statically bound, namely the internet of things equipment can only communicate with the internet of things platform through the designated gateway equipment, when the designated gateway equipment fails, the internet of things equipment needs to be manually bound with new gateway equipment, and after the internet of things equipment is restarted, the communication between the internet of things equipment and the internet of things platform can be recovered.
In order to solve the above problem, an embodiment of the present application provides a method for transmitting and receiving data in an internet of things system. Referring to fig. 2, a schematic diagram of an implementation environment provided by an exemplary embodiment of the application is shown. The implementation environment comprises an internet of things device 201, a gateway group 202 and an internet of things platform 203.
The internet of things 201 is an information acquisition device in an internet of things system, is mainly responsible for acquiring data, is generally provided with a sensor (such as a photovoltaic sensor, a speed sensor, a pressure sensor and the like), can convert information acquired by the device into an electric signal or output information in other required forms according to a certain rule, and besides acquiring and transmitting data, the internet of things device also needs to have data processing and storing functions and is generally applied to the fields of industry, power grids, smart homes, intelligent transportation and the like. In this embodiment, the internet of things device 201 may send the acquired device data to the internet of things platform 203 through the gateway device.
The internet of things device 201 and any gateway device included in the gateway group 202 are connected through a wired or wireless network.
The gateway group 102 is a set of at least two gateway devices, each gateway device is a computer system or a device providing data conversion service among multiple networks, and in the internet of things system, the gateway device is configured to receive device data uploaded by multiple internet of things devices, convert the device data into a predetermined format, and upload the device data to the internet of things platform 203. In this embodiment of the application, the gateway group 202 includes a gateway device 204 and a gateway device 205, and the gateway group 202 is associated with the internet of things device 201, that is, the internet of things device 201 may communicate with the internet of things platform 203 through any gateway device included in the gateway group 202, schematically, the internet of things device 201 may send device data to the internet of things platform 203 through the gateway device 204, and may also receive an instruction sent by the internet of things platform 203 through the gateway device 204.
The gateway device 204 or the gateway device 205 is connected with the internet of things platform 203 through a wired or wireless network.
The internet of things platform 203 is a cloud device in the internet of things system, and is configured to receive device data from the gateway device 104 or the gateway device 205, and store, process, and analyze the device data, so as to perform service discovery, provide a service query function, and implement an internet of things application service logic, and may be a server, a server cluster formed by a plurality of servers, or a cloud computing center. Optionally, the internet of things platform 203 includes a configuration center, where a corresponding relationship between the internet of things device and the gateway group, a corresponding relationship between the gateway group and the gateway device, and the like are stored in the configuration center, and optionally, the internet of things platform 203 may further include an access center, where the access center is configured to verify a device access request of the internet of things device 201 uploaded by the gateway device, and issue a request passing instruction after the verification passes.
In a possible implementation manner, when the internet of things device 201 comes online, an information acquisition request may be sent to a configuration center in the internet of things platform to acquire information of a gateway group 202 related to the internet of things device 201, where the gateway group 202 includes at least two candidate gateway devices, that is, a gateway device 204 and a gateway device 205, the internet of things device 201 may send device data to the internet of things platform 203 through the gateway device 204, and when the device data is failed to be sent, that is, when the gateway device 204 fails, the internet of things device 201 may further continue to send the device data to the internet of things platform 203 through the gateway device 205. By associating the Internet of things equipment with the at least two candidate gateway equipment, the Internet of things equipment can automatically select other candidate gateway equipment when the first gateway equipment breaks down, and can continuously communicate with the Internet of things platform through the other candidate gateway equipment, so that the relationship between the Internet of things equipment and the gateway equipment is prevented from being manually reconfigured, and the operation steps of recovering data transmission are simplified.
Referring to fig. 3, a flowchart of a data transmitting and receiving method in an internet of things system according to an exemplary embodiment of the present application is shown. This embodiment is described by taking the method as an example for use in the implementation environment shown in fig. 2, and the method includes the following steps.
Step 301, the internet of things platform sends gateway group information to the target internet of things device, wherein the gateway group information includes gateway information of at least two candidate gateway devices.
The gateway group information comprises gateway information of at least two candidate gateway devices, namely, the target internet of things device is associated with a plurality of candidate gateway devices.
In a possible implementation manner, when a target internet of things device is online, a configuration center in an internet of things platform is used to obtain gateway group information associated with the target internet of things device, when the internet of things platform receives a request for obtaining the gateway group information from the target internet of things device and the request for obtaining the gateway group information is verified, the gateway group information (gateway information of at least two candidate gateway devices) is searched in the configuration center, and the searched gateway group information is sent to the target internet of things device.
Optionally, the gateway information may include a unique Identifier (ID) of the gateway device, an address of the gateway device, or the like, or gateway information of the gateway device that is needed when the other target internet of things device sends the device data, and the content included in the gateway group information is not limited in this embodiment.
Optionally, the domain name of the configuration center is known, and the internet of things device may access the configuration center through the domain name.
Step 302, the target internet of things device acquires gateway group information.
In a possible implementation manner, when the target internet of things device is online, gateway group information associated with the target internet of things device is acquired through a configuration center in the internet of things platform, and the gateway group information is stored in a corresponding position.
Optionally, the gateway group information related to the target internet of things device may also be directly stored in the target internet of things device, that is, when the internet of things device is on line, the gateway group information does not need to be acquired in the internet of things platform.
Step 303, the target internet of things device sends device data to the internet of things platform through a first gateway device of the at least two candidate gateway devices.
In a possible implementation manner, after the target internet of things device acquires the gateway group information, the number of the candidate gateway devices is determined, the number of the candidate gateways is subjected to modulo operation through the generated random number, the first gateway device is determined, and communication is performed with the internet of things platform through the first gateway device. The random number can be generated according to a device event of the target internet of things device, for example, the online time of the target internet of things device.
Illustratively, if the reference numbers of the candidate gateway devices are respectively gateway device 0, gateway device 1, gateway device 2, gateway device 3, and gateway device 4, that is, the number of the candidate gateway devices associated with the target internet of things device is 5, and if the random number generated according to the online time of the target internet of things device is 1, performing modulo operation to obtain a number 1, determining the gateway device 1 as the first gateway device.
Optionally, a number of candidate internet of things devices may also be modulo by using the pseudo random number to determine the first gateway device. The present embodiment does not limit the method for determining the first gateway device.
Illustratively, before the target internet of things device sends the device data through the first gateway device, the device access request needs to be sent through the first gateway device first, and only after the device access request is verified to be passed, the target internet of things device can send the device data to the internet of things platform through the first gateway device.
Step 304, the internet of things platform receives the device data sent by the target internet of things device through the first gateway device.
In a possible implementation manner, when the internet of things platform receives a device access request of a target internet of things device sent by a first gateway device, the device access request is firstly verified, and if the verification is passed, the target internet of things device is allowed to continue sending device data through the first gateway device.
When the device access request is verified, the device information of the target internet of things device is verified firstly, if the verification is passed, whether the target internet of things device is associated with the first gateway device or not is verified continuously, if the target internet of things device is associated with the first gateway device, the device access request is verified to be passed, and the target internet of things device is allowed to send device data through the first gateway.
Step 305, when the device data transmission fails, the target internet of things device determines a second gateway device from the at least two candidate gateway devices, wherein the second gateway device is different from the first gateway device.
In a possible implementation manner, when the sending of the device data by the internet of things device is not successful for N consecutive times, the first gateway device may malfunction, and at this time, the target internet of things device may determine a second gateway device from the candidate gateway devices, where the second gateway device is different from the first gateway device. Wherein N is a positive integer and is greater than or equal to 2.
Optionally, when the target internet of things device determines that the first gateway device fails, the first gateway device may be added to a blacklist, so that the first gateway device is skipped when the second gateway device is selected.
Optionally, the method for determining the second gateway device may refer to the method for determining the first gateway device, which is not described herein again.
And step 306, the target internet of things device sends device data to the internet of things platform through the second gateway device.
In a possible implementation manner, after the target internet of things device determines the second gateway device, the device data may continue to be sent to the internet of things platform through the second gateway device.
Optionally, before the device data is sent to the internet of things platform through the second gateway device, the device access request still needs to be verified, and after the device access request passes verification, the target internet of things device may continue to send the device data to the internet of things platform through the second gateway device.
Step 307, when the device data transmission fails, the internet of things platform receives the device data transmitted by the target internet of things device through the second gateway device.
In a possible implementation manner, the internet of things platform can monitor whether the gateway device fails, and when the internet of things platform monitors that the first gateway device fails, that is, the device data transmission fails, the target internet of things device is allowed to transmit the device data through the second gateway device.
Illustratively, when the internet of things platform receives device data sent by the target internet of things device through the second gateway device, the device information of the target internet of things device and the relationship between the target internet of things device and the second gateway device also need to be verified, and only after the verification is passed, the device data sent by the target internet of things device through the second gateway device is allowed to be received.
To sum up, in the embodiment of the present application, when the internet of things device acquires gateway group information, and the gateway group information includes gateway information of at least two candidate gateway devices, the device data is sent to the internet of things platform through a first gateway device of the at least two candidate gateway devices; when the equipment data transmission fails, the Internet of things equipment determines second gateway equipment different from the first gateway equipment from the at least two candidate gateway equipment, and equipment data is continuously transmitted to the Internet of things platform through the second gateway equipment.
Referring to fig. 4, a flowchart of a data transmitting and receiving method in an internet of things system according to another exemplary embodiment of the present application is shown. The embodiment is described by taking the method as an example for being used in the implementation environment shown in fig. 2, and the method includes the following steps.
Step 401, when the target internet of things device is on line, sending an information acquisition request to the internet of things platform, wherein the information acquisition request includes device information of the target internet of things device.
The device information refers to a device ID and device digest information of the target internet of things device, and the device digest information is generated by encrypting a device key of the target internet of things device.
In a possible implementation manner, when a target internet of things device is online, the device key is encrypted according to an encryption algorithm to generate device digest information, and the device ID of the target internet of things device, the device digest information, the encryption algorithm used for generating the device digest information, and the like are sent to a configuration center in an internet of things platform.
Optionally, the encryption algorithm may be a hash algorithm, or may be another encryption algorithm, and the type of the encryption algorithm used in the embodiment of the present application is not limited.
Optionally, the device ID of the target internet of things device is pre-stored in the target internet of things device with the device key.
Step 402, the internet of things platform receives an information acquisition request sent by a target internet of things device.
In a possible implementation manner, a configuration center receives an information acquisition request sent by a target internet of things device through a wired or wireless network, wherein the configuration center is located in an internet of things platform.
Step 403, the internet of things platform searches for gateway group information from the first relation table according to the device information, and the first relation table stores a corresponding relation between the internet of things device and the gateway group.
In a possible implementation manner, the configuration center stores a correspondence table between the internet of things device and the gateway group, a correspondence table between the gateway group and the gateway device, and the like.
Schematically, the corresponding relationship between the internet of things device and the gateway group is shown in table one; the corresponding relationship between the gateway group and the gateway device is shown in table two.
Watch 1
Device ID Device key Gateway group ID
Device
1 QY7TT-VJ7VG-XCDJB-QXHD3 Gateway group 1
Device 2 HDM9X-B48DV-HYV3K-8XD73 Gateway group 2
Device 3 KYY32-RCGMK-6976P-BH4M6 Gateway group 1
Watch two
Gateway ID Gateway key Gateway group ID Gateway address
Gateway
1 AKIDCgOPWjQ6BAxvWABJSBj548pN Gateway group 1 192.168.1.1
Gateway 2 ZxF2whO0RhuwnV5JMMAuqcDcN2oP Gateway group 1 192.168.1.254
Gateway 3 6BM3YH2GDY4TKFQH6GQQF7VG8PJ Gateway group 2 192.168.2.1
Gateway 4 37X8QCJ46FRB8XPGJ6RKRHYT76TH Gateway group 2 192.168.2.254
In a possible implementation manner, when a configuration center receives an information acquisition request of a target internet of things device, namely, an equipment ID, equipment summary information, an encryption algorithm and the like of the target internet of things device are acquired, firstly, an equipment key corresponding to the equipment ID is found in a table I according to the equipment ID, the found equipment key is encrypted according to the encryption algorithm, target equipment summary information is generated and matched with the received equipment summary information, and if the matching is successful, the target internet of things device is determined to be legal; therefore, gateway group information corresponding to the equipment ID, namely the gateway group ID, is determined in the first table according to the equipment ID, gateway equipment information associated with the gateway group is searched in the second table according to the gateway group ID, and then the gateway ID and the gateway address are obtained.
And step 404, the internet of things platform sends the searched gateway group information to the target internet of things equipment.
In a possible implementation manner, the configuration center finds gateway group information corresponding to the target internet of things device, that is, gateway information of the gateway device indirectly associated with the target internet of things device, and sends the gateway information to the target internet of things device, where the gateway information may include a gateway ID, a gateway address, and the like.
Step 405, the target internet of things device receives gateway group information sent by the internet of things platform.
In one possible implementation, the target internet of things device receives the gateway group information sent by the configuration center through a wired or wireless network. Alternatively, the gateway group information may include a gateway ID, a gateway address, and the like.
In step 406, the target internet of things device sends device data to the internet of things platform through a first gateway device of the at least two candidate gateway devices.
In a possible implementation manner, before the target internet of things device sends the device data to the internet of things platform, a device access request needs to be sent to the internet of things platform through the first gateway device, and only after the device access request passes verification, the target internet of things device can continue to send the device data to the internet of things platform through the first gateway device.
Illustratively, the target internet of things device sends a device access request to the internet of things platform through the first gateway device, where the device access request may include a device ID and device digest information of the target internet of things device, and an encryption algorithm for generating the device digest information.
Optionally, after the gateway device is turned on, a long-term connection is established with the internet of things platform in advance. Illustratively, the gateway device sends a connection request to the internet of things platform, where the connection request may include a gateway ID of the gateway device, gateway digest information, and an encryption algorithm for generating the gateway digest information; when the Internet of things platform receives the connection request sent by the gateway equipment, the gateway key is obtained by going to a configuration center according to the gateway ID in the connection request, so that the gateway key is encrypted according to an encryption algorithm in the connection request, target gateway abstract information is generated and matched with the gateway abstract information in the connection request, if the matching is successful, the gateway equipment is determined to be legal, and the gateway equipment is allowed to establish connection with the Internet of things platform.
Optionally, if the internet of things platform does not receive the device data sent by the gateway device within the preset time period, the connection with the gateway device may be disconnected. The preset time period may be set manually, for example, 1h.
Step 407, the internet of things platform receives device data sent by the target internet of things device through the first gateway device.
In a possible implementation manner, when the internet of things platform receives a device access request sent by a target internet of things device through a first gateway device, the device access request is verified, and after the verification is passed, a request passing message is sent to the target internet of things device through the first gateway device, and a subsequent target internet of things device can continue to send device data through the first gateway device.
Illustratively, after receiving a device access request, an internet of things platform first searches for relevant information according to a device ID of a target internet of things device in the device access request, where the relevant information may include a device key of the target internet of things device, gateway group information corresponding to the target internet of things device, and gateway information; after the relevant information is acquired, the device access request is verified, and the verification process may be divided into the following steps:
1. and verifying the equipment information of the target Internet of things equipment, namely determining whether the target Internet of things equipment is legal or not.
In a possible implementation manner, the processes of receiving the device access request and verifying the device access request can be performed in an access center in the platform of the internet of things, that is, the access center generates target device digest information according to the searched device key and an encryption algorithm in the access request, matches the target device digest information with the device digest information in the device access request, and if the matching is successful, the device information is verified to be passed.
2. And verifying the corresponding relation between the target Internet of things equipment and the first gateway equipment.
In one possible implementation, since the first gateway device has established a long-term connection with the internet of things platform before sending the device access request, when the target internet of things device sends the device access request to the internet of things platform through the first gateway device, the internet of things platform may determine that the device access request is sent by the first gateway device; when the access center acquires gateway group information and gateway information corresponding to the target internet of things device, namely whether the gateway information contains the gateway information of the first gateway device is determined, and if yes, the corresponding relation between the target internet of things device and the first gateway device is determined to be verified.
After the verification passes in the two aspects, the internet of things platform sends a request passing message to the target internet of things device through the first gateway device, and therefore the target internet of things device can continue to send device data through the first gateway device.
Step 408, when the device data transmission fails, the target internet of things device determines a second gateway device from the at least two candidate gateway devices, where the second gateway device is different from the first gateway device.
Step 305 may be referred to in the implementation manner of this step, and this embodiment is not described herein again.
And step 409, the target Internet of things equipment sends an equipment access request to the Internet of things platform through the second gateway equipment.
The device connection request may include device information of the target internet of things device, and optionally, the device information may include a device ID of the target internet of things device, device digest information, and an encryption algorithm used to generate the digest information.
In a possible implementation manner, the target internet of things device sends the device ID and the device digest information of the target internet of things device, and an encryption algorithm used for generating the digest information, to the internet of things platform through the second gateway device.
Step 410, the internet of things platform receives a device access request sent by the target internet of things device through the second gateway device.
In a possible implementation manner, the access center receives the device access request sent by the target internet of things device through the second gateway device, and the access center is located in the internet of things platform.
The device access request may include device information of the target internet of things device, that is, a device ID and device digest information of the target internet of things device, and an encryption algorithm used to generate the digest information.
Step 411, the internet of things platform searches a gateway group to which the second gateway device belongs from a second relation table according to the gateway information of the second gateway device, and the second relation table stores a corresponding relation between the gateway device and the gateway group.
Because the second gateway device establishes a long-term connection with the internet of things platform in advance, the internet of things platform can determine that the sender of the device access request is the second gateway device, so that gateway information of the second gateway device is obtained, and the gateway information can include a gateway ID.
In a possible implementation manner, the internet of things platform searches the gateway group associated with the second gateway device from the second relation table according to the gateway information of the second gateway device. Illustratively, if the gateway ID of the second gateway device is gateway 1, it can be known from table two that the gateway group corresponding to gateway 1 is gateway group 1.
Step 412, when the internet of things platform determines that the gateway group to which the second gateway device belongs corresponds to the target internet of things device according to the first relation table and the device information, sending a request passing message to the target internet of things device through the second gateway device.
In a possible implementation manner, when the internet of things platform determines gateway group information corresponding to the second gateway device, whether a gateway group to which the second gateway device belongs corresponds to the device information of the target internet of things device is determined according to the first relation table and the device information, and if so, request passing information is sent to the target internet of things device through the second gateway device.
Illustratively, if the device ID of the target internet of things device is device 1, and the gateway group to which the second gateway device belongs is gateway group 1, it can be known from table one that there is a corresponding relationship between device 1 and gateway group 1, it is determined that the gateway group to which the second gateway device belongs corresponds to the target internet of things device.
Optionally, the device information of the target internet of things device needs to be checked, and step 407 may be referred to in the checking process, which is not described herein again in this embodiment.
In a possible implementation manner, when the device information of the target internet of things device passes verification and it is determined that the gateway group to which the second gateway device belongs corresponds to the target internet of things device, the second gateway device sends request passing information to the target internet of things device.
Step 413, when the target internet of things device receives the request passing message sent by the internet of things platform, sending device data to the internet of things platform through the second gateway device.
In a possible implementation manner, after the target internet of things device receives the request passing message, the device data may continue to be sent to the internet of things platform through the second gateway device.
In this embodiment, the corresponding relationship between the internet of things device and the gateway group and the corresponding relationship between the gateway device and the gateway group are stored in the configuration center of the internet of things platform in advance, so that the corresponding gateway group information can be acquired when the internet of things device is online, and a subsequent process of determining the gateway device is performed; in addition, the target internet of things equipment can be ensured to send equipment data through the corresponding gateway equipment through the verification of the equipment access request sent by the target internet of things equipment.
When the first gateway device fails, the internet of things devices connected to the first gateway device are randomly allocated to other candidate gateway devices in the gateway group, for example, the second gateway device, because the load of the gateway device has a limit, in order to reasonably allocate resources of each gateway device, after the target internet of things device determines that the first gateway device recovers the available state, the target internet of things device may reestablish a connection with the first gateway device.
Referring to fig. 5, a flowchart illustrating a method for a target internet of things device to reestablish a connection with a first gateway device in an embodiment of the present application is shown, where the method includes:
step 501, a target internet of things device sets a preset identifier and a timer for a first gateway device, wherein the preset identifier is used for representing that the first gateway device is in an unavailable state.
The target Internet of things equipment stores gateway group information associated with the target Internet of things equipment, namely candidate gateway equipment information, and the first gateway equipment is any one of the candidate gateway equipment.
The preset identifier may be a special identifier, for example, a flag is set after the device ID of the first gateway device, or the device information of the first gateway device is stored in a blacklist.
In a possible implementation manner, when the target internet of things device determines that the first gateway device is faulty, a preset identifier and a timer are set for the first gateway device, where a duration of the timer is preset by a developer, for example, the duration of the timer is 10 minutes.
Optionally, the timer starts timing when it is determined that the first gateway device fails.
Step 502, when the timer reaches the timer duration, the target internet of things device sends device data to the first gateway device according to the preset identifier.
In a possible implementation manner, when the timer reaches the timer duration, the target internet of things device sends device data to the first gateway device according to the preset identifier. Illustratively, when the target internet of things device determines that the first gateway device fails, device data is sent to the first gateway device 10 minutes later.
Step 503, if the device data is successfully sent, the target internet of things device clears the preset identifier, and sends the device data to the internet of things platform through the first gateway device again.
In a possible implementation manner, if the device data is successfully sent, it is determined that the first gateway device has recovered to an available state, and at this time, the target internet of things device may clear the preset identifier, or extract the device information of the first gateway device from a blacklist, and send the device data to the internet of things platform through the first gateway device again.
Optionally, if the device data is not successfully transmitted for N consecutive times, it is determined that the first gateway device is still in the unavailable state, and the device data is continuously transmitted through other candidate gateway devices. And resetting the timer so as to continuously determine whether the state of the first gateway device is an available state when the timer reaches a preset time length.
In this embodiment, after the first gateway device fails, the target internet of things device attempts to send device data through the first gateway device by setting the preset identifier and the timer for the first gateway device and after the timer reaches the set time length, so that the target internet of things device can timely know the state of the first gateway device, and when the first gateway device recovers to an available state, the device data continues to be sent through the first gateway device, and reasonable allocation and utilization of gateway device resources can be achieved.
Because the internet of things platform can monitor the use state of each gateway device in real time, in a possible implementation manner, the device recovery message of the failed gateway device can be issued through the internet of things platform.
Referring to fig. 6, a flowchart illustrating a method for a target internet of things device to reestablish a connection with a first gateway device in another embodiment of the present application is shown, where the method includes:
step 601, setting a preset identifier for the first gateway device, where the preset identifier is used to represent that the first gateway device is in an unavailable state.
The implementation of this step may refer to step 501, which is not described herein.
Step 602, the internet of things platform sends an equipment recovery message to the target internet of things equipment through the second gateway equipment, where the equipment recovery message includes gateway information of the recovered gateway equipment.
In a possible implementation manner, when the internet of things platform monitors that the first gateway device has recovered to an available state, the device recovery message may be sent to the target internet of things device through the second gateway device, where the second gateway device is the gateway device that reestablishes the connection when the target internet of things device determines that the first gateway device has failed.
Optionally, the gateway information may include a gateway ID, a gateway address, and the like of the gateway device.
Step 603, when the target internet of things device receives the device recovery message sent by the internet of things platform, acquiring gateway information of the recovered gateway device contained in the device recovery message.
In a possible implementation manner, when the target internet of things device receives the device recovery message through the second gateway device, gateway information of the recovered gateway device, that is, a gateway ID, a gateway address, and the like of the gateway device, is obtained.
In step 604, if the recovered gateway device is the first gateway device including the preset identifier, the preset identifier is cleared.
In a possible implementation manner, when the target internet of things device acquires gateway information of a recovered gateway device, the gateway information is matched with device information of a first gateway device containing a preset identifier, which is stored in the target internet of things device, and if the matching is successful, it is determined that the first gateway device is recovered to be in an available state, and at this time, the target internet of things device may clear the preset identifier of the first gateway device.
Optionally, if the device information of the first gateway is not matched in the acquired gateway information of the recovered gateway device, it is determined that the first gateway device is still in the unavailable state.
Step 605, if the device data transmission fails, preferentially selecting to transmit the device data to the internet of things platform through the first gateway device.
In a possible implementation manner, in the process that the target internet of things device sends the device data through the second gateway device, the second gateway device fails to send the device data, and at this time, since the target internet of things device determines that the first gateway device is restored to the available state, the first gateway device may preferentially select to send the device data to the internet of things platform.
In this embodiment, the service state of the gateway device is monitored in real time through the internet of things platform, and if it is monitored that a certain gateway device is recovered from an unavailable state to an available state, the device recovery message is sent to the target internet of things device through the rest candidate gateway devices, so that the target internet of things device can know the service state of the first gateway device in time; in addition, if the target internet of things device determines that the first gateway device is recovered to be in the available state, when the second gateway device fails, the first gateway device can be preferentially selected to send device data to the internet of things platform, the step of randomly selecting the gateway device is avoided, and the efficiency of switching the gateway device is improved.
Referring to fig. 7, a flowchart of a data transmitting and receiving process in an internet of things system according to an exemplary embodiment of the present application is shown. The process may include the steps of:
(1) And the user establishes the corresponding relation between the Internet of things equipment and the gateway group and the corresponding relation between the gateway group and the gateway equipment in the configuration center in advance.
(2) When the internet of things device 1 is online, gateway group information associated with the internet of things device 1 is acquired from a configuration center, and the gateway group 1 comprises 3 candidate gateway devices, namely, device information of the gateway devices 1 to 3 is acquired.
(3) And after the Internet of things equipment 1 acquires the gateway group information, randomly selecting the gateway equipment 2 in the candidate gateway equipment as first gateway equipment to establish connection with the gateway equipment 2.
(4) The internet of things device sends a device access request to the access center 703 through the gateway device 2, where the device access request includes the device ID of the internet of things device 1, device digest information, and an encryption algorithm for generating the device digest information.
(5) And after the access center 703 receives the device access request, the device access request is verified. Illustratively, the access center 703 acquires the device information, the correspondence between the internet of things device 1 and the gateway group, the correspondence between the gateway group and the gateway device, and the like from the configuration center according to the device ID of the internet of things device 1 in the device access request.
(6) When it is determined that the device information of the internet of things device 1 passes verification and the gateway group to which the internet of things device 1 and the gateway device 2 belong corresponds, the access center 703 sends request passing information to the internet of things device 1 through the gateway device 2, so that the internet of things device 1 sends device data to the internet of things platform 701 through the gateway device 2 after receiving the request passing information.
In a possible implementation manner, when the internet of things device 1 does not successfully transmit the device data through the gateway device 2N times continuously, it is determined that the gateway device 2 fails, and the internet of things device 1 and the internet of things device 3 cannot normally communicate with the internet of things platform 701, at this time, the internet of things device 1 may automatically reconnect to the remaining available gateway devices in the gateway group 1, for example, the gateway device 3, according to the gateway group information obtained from the configuration center, that is, according to the correspondence between the internet of things device 1 and the gateway group 1 shown in table 1 and the correspondence between the gateway group and the gateway device shown in table 2, and perform the verification of the device access request again, and after the verification of the device access request is completed, the internet of things device 1 may communicate with the internet of things platform 701 again through the gateway device 3.
It should be noted that, in the foregoing embodiments, the step that takes the internet of things device as an execution subject may be implemented separately as a data sending method in the internet of things system, and the step that takes the internet of things platform as an execution subject may be implemented separately as a data receiving method in the internet of things system, which is not described herein again in this embodiment of the present application.
Referring to fig. 8, a block diagram of a data transmitting device in an internet of things system according to an exemplary embodiment of the present application is shown. The apparatus can be implemented by software, hardware or a combination of the two to become all or part of the internet of things device in fig. 1, and the apparatus includes:
a first obtaining module 801, configured to obtain gateway group information, where the gateway group information includes gateway information of at least two candidate gateway devices;
a first sending module 802, configured to send device data to the internet of things platform through a first gateway device of the at least two candidate gateway devices;
a determining module 803, configured to determine, when the device data transmission fails, a second gateway device from the at least two candidate gateway devices, where the second gateway device is different from the first gateway device;
a second sending module 804, configured to send the device data to the internet of things platform through the second gateway device.
Optionally, the first obtaining module 801 includes:
the first sending unit is used for sending an information acquisition request to the Internet of things platform when the target Internet of things equipment is online, wherein the information acquisition request contains equipment information of the target Internet of things equipment;
the first receiving unit is configured to receive the gateway group information sent by the internet of things platform, where the gateway group information is obtained by looking up the internet of things platform from a first relation table according to the device information, and a corresponding relationship between the internet of things device and the gateway group is stored in the first relation table.
Optionally, the apparatus further comprises:
a third sending module, configured to send a device access request to the internet of things platform through the second gateway device, where the device access request includes the device information;
optionally, the second sending module 804 includes:
a second sending unit, configured to send the device data to the internet of things platform through the second gateway device when a request passing message sent by the internet of things platform is received, where the request passing message is sent when the internet of things platform determines, according to a second relationship table, a gateway group to which the second gateway device belongs, and determines, according to the first relationship table, that the target internet of things device corresponds to the gateway group to which the second gateway device belongs, and the second relationship table stores a correspondence relationship between gateway devices and gateway groups.
Optionally, the apparatus further comprises:
the first setting module is used for setting a preset identifier and a timer for the first gateway device, wherein the preset identifier is used for representing that the first gateway device is in an unavailable state;
a fourth sending module, configured to send the device data to the first gateway device according to the preset identifier when the timer reaches a timer duration;
and the resending module is used for clearing the preset identifier if the equipment data is sent successfully, and resending the equipment data to the Internet of things platform through the first gateway equipment.
Optionally, the apparatus further comprises:
the second setting module is used for setting a preset identifier for the first gateway device, wherein the preset identifier is used for representing that the first gateway device is in an unavailable state;
a second obtaining module, configured to obtain, when an equipment recovery message sent by the internet of things platform is received, gateway information of a recovered gateway device included in the equipment recovery message, where the equipment recovery message is sent when the internet of things platform detects that the gateway device is recovered;
a clearing module, configured to clear the preset identifier if the recovered gateway device is the first gateway device that includes the preset identifier;
and a fifth sending module, configured to preferentially select to send the device data to the internet of things platform through the first gateway device when the device data is unsuccessfully sent.
In the embodiment of the application, when the internet of things equipment acquires gateway group information, and the gateway group information comprises gateway information of at least two candidate gateway devices, the equipment data is sent to the internet of things platform through a first gateway device of the at least two candidate gateway devices; when the equipment data transmission fails, the Internet of things equipment determines second gateway equipment different from the first gateway equipment from the at least two candidate gateway equipment, and equipment data is continuously transmitted to the Internet of things platform through the second gateway equipment.
Referring to fig. 9, a block diagram of a data receiving device in an internet of things system according to an exemplary embodiment of the present application is shown. The device can be implemented by software, hardware or a combination of the two to form all or part of the platform of the internet of things in fig. 1, and the device comprises:
a sixth sending module 901, configured to send gateway group information to a target internet of things device, where the gateway group information includes gateway information of at least two candidate gateway devices;
a first receiving module 902, configured to receive, by a first gateway device, device data sent by the target internet of things device, where the first gateway device belongs to the at least two candidate gateway devices;
a second receiving module 903, configured to receive, when the device data transmission fails, the device data transmitted by the target internet of things device through a second gateway device, where the second gateway device belongs to the at least two candidate gateway devices and is different from the first gateway device.
Optionally, the sixth sending module 901 includes:
a second receiving unit, configured to receive an information acquisition request sent by the target internet of things device, where the information acquisition request is sent when the target internet of things device is online, and the information acquisition request includes device information of the target internet of things device;
the searching unit is used for searching the gateway group information from a first relation table according to the equipment information, and the first relation table stores the corresponding relation between the Internet of things equipment and the gateway group;
and the third sending unit is used for sending the searched gateway group information to the target Internet of things equipment.
Optionally, the apparatus further comprises:
a third receiving module, configured to receive, through the second gateway device, a device access request sent by the target internet of things device;
the searching module is used for searching a gateway group to which the second gateway device belongs from a second relation table according to the gateway information of the second gateway device, and the second relation table stores the corresponding relation between the gateway device and the gateway group;
a seventh sending module, configured to send a request passing message to the target internet of things device through the second gateway device when it is determined that the gateway group to which the second gateway device belongs corresponds to the target internet of things device according to the first relation table and the device information, where the target internet of things device is configured to send the device data through the second gateway device after receiving the request passing message.
Optionally, the apparatus further comprises:
optionally, the eighth sending module is configured to send, through the second gateway device, a device recovery message to the target internet of things device, gateway information of a recovered gateway device included in the device recovery message, where the target internet of things device is configured to send, through the first gateway device, the device data to the internet of things platform when the recovered gateway device includes a preset identifier, and the device data sending fails, preferentially select to send the device data to the internet of things platform through the first gateway device, where the preset identifier is set by the target internet of things device and is used to represent that the first gateway device is in an unavailable state.
In the embodiment of the application, when the internet of things equipment acquires gateway group information, and the gateway group information comprises gateway information of at least two candidate gateway devices, the equipment data is sent to the internet of things platform through a first gateway device of the at least two candidate gateway devices; when the equipment data transmission fails, the IOT equipment determines second gateway equipment different from the first gateway equipment from the at least two candidate gateway equipment, and continuously transmits the equipment data to the IOT platform through the second gateway equipment, and the IOT equipment is associated with the at least two candidate gateway equipment, so that the IOT equipment can automatically select other candidate gateway equipment when the first gateway equipment fails, and continuously communicate with the IOT platform through the other candidate gateway equipment, the relation between the IOT equipment and the gateway equipment is prevented from being manually reconfigured, and the operation steps of recovering data transmission are simplified.
It should be noted that: the data transmitting and receiving device in the internet of things system provided in the above embodiment is only illustrated by the division of the above functional modules, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the data sending and receiving device in the internet of things system provided by the above embodiment and the data sending and receiving method embodiment in the internet of things system belong to the same concept, and the specific implementation process thereof is described in detail in the method embodiment, which is not described herein again.
Referring to fig. 10, a block diagram of an internet of things device 1000 according to an exemplary embodiment of the present application is shown. The physical network device in the present application may include one or more of the following components: a processor 1001 and a memory 1002.
Processor 1001 may include one or more processing cores. The processor 1001, which is connected to various parts throughout the internet of things device 1000 using various interfaces and lines, performs various functions of the gateway device and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1002, and calling data stored in the memory 1002. Alternatively, the processor 1001 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of a Central Processing Unit (CPU) and a modem. Wherein, the CPU mainly processes an operating system, an application program and the like; the modem is used to handle wireless communications. It is understood that the above modem may not be integrated into the processor 1001, but may be implemented by a communication chip.
The Memory 1002 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 1002 includes a non-transitory computer-readable medium. The memory 1002 may be used to store instructions, programs, code sets, or instruction sets. The memory 1002 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, and the like. The storage data area may also store data created by the internet of things device in use, and the like.
Referring to fig. 11, a schematic structural diagram of an internet of things platform 1100 provided in an exemplary embodiment of the present application is shown. The internet of things platform 1100 includes a CPU1101, a system memory 1104 including a RAM1102 and a ROM1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The internet of things platform 1100 also includes a basic Input/Output system (I/O system) 1106 that facilitates transfer of information between devices of the internet of things platform and a mass storage device 1107 for storing an operating system 1113, application programs 1114 and other program modules 1115.
The basic input/output system 1106 includes a display 1108 for displaying information and an input device 1109 such as a mouse, keyboard, etc. for user input of information. Wherein the display 1108 and input device 1109 are connected to the central processing unit 1101 through an input output controller 1110 connected to the system bus 1105. The basic input/output system 1106 may also include an input/output controller 1110 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 1110 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1107 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated computer-readable storage media provide non-volatile storage for the internet of things platform 1100. That is, the mass storage device 1107 may include a computer-readable storage medium (not shown) such as a hard disk or Compact disk Read-Only Memory (CD-ROM) drive.
Without loss of generality, the computer-readable storage media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable storage instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, erasable Programmable Read-Only Memory (EPROM), flash Memory or other solid state Memory technology, CD-ROM, digital Versatile Disks (DVD), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1104 and mass storage device 1107 described above may be collectively referred to as memory.
The memory also includes one or more programs, which are stored in the memory, and the one or more programs include instructions for performing the steps performed by the internet of things platform in the methods provided by the embodiments of the present application.
Referring to fig. 12, a system architecture diagram of an internet of things system provided by an exemplary embodiment of the present application is shown. The internet of things system 1200 includes at least one internet of things device 1201, a gateway group 1202 and an internet of things platform 1203, where the gateway group 1202 includes at least two gateway devices, such as a gateway device 1204 and a gateway device 1205, and the internet of things device 1201 is configured to send device data to the internet of things platform 1203 through the gateway device.
The embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending and receiving methods in the internet of things system as described in the above embodiments.
The embodiment of the present application further provides a computer program product, where the computer program product stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending and receiving methods in the internet of things system as described in the above embodiments.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (8)

1. A data sending method in an Internet of things system is characterized in that the method is used for a target Internet of things device, and the method comprises the following steps:
when the target Internet of things equipment is on line, sending an information acquisition request to an Internet of things platform, wherein the information acquisition request comprises equipment information of the target Internet of things equipment;
receiving gateway group information sent by the Internet of things platform, wherein a first relation table and a second relation table are stored in the Internet of things platform, a corresponding relation between Internet of things equipment and a gateway group is stored in the first relation table, a corresponding relation between gateway equipment and the gateway group is stored in the second relation table, the gateway group information is obtained by the Internet of things platform through searching from the first relation table and the second relation table according to the equipment information, and the gateway group information comprises gateway information of at least two candidate gateway equipment;
sending device data to the Internet of things platform through a first gateway device of the at least two candidate gateway devices;
when the device data transmission fails, determining a second gateway device from the at least two candidate gateway devices, wherein the second gateway device is different from the first gateway device;
sending the device data to the Internet of things platform through the second gateway device;
setting a preset identifier for the first gateway device, wherein the preset identifier is used for representing that the first gateway device is in an unavailable state;
when an equipment recovery message sent by the Internet of things platform is received, acquiring gateway information of recovered gateway equipment contained in the equipment recovery message, wherein the equipment recovery message is sent when the Internet of things platform detects that the gateway equipment is recovered;
if the recovered gateway device is the first gateway device containing the preset identifier, clearing the preset identifier;
when the target Internet of things equipment fails to send the equipment data through the second gateway equipment, the equipment data is preferentially selected to be sent to the Internet of things platform through the first gateway equipment.
2. The method of claim 1, wherein prior to sending the device data to the internet of things platform via the second gateway device, the method further comprises:
sending a device access request to the Internet of things platform through the second gateway device, wherein the device access request comprises the device information;
the sending the device data to the internet of things platform through the second gateway device includes:
when a request passing message sent by the Internet of things platform is received, the second gateway device sends the device data to the Internet of things platform, the request passing message is sent when the Internet of things platform determines a gateway group to which the second gateway device belongs according to a second relation table and determines that the target Internet of things device corresponds to the gateway group to which the second gateway device belongs according to the first relation table, and the second relation table stores the corresponding relation between the gateway devices and the gateway groups.
3. A data receiving method in an Internet of things system is used for an Internet of things platform, and comprises the following steps:
receiving an information acquisition request sent by target Internet of things equipment, wherein the information acquisition request is sent when the target Internet of things equipment is online and comprises equipment information of the target Internet of things equipment;
according to the equipment information, gateway group information is searched from a first relation table and a second relation table, the first relation table and the second relation table are stored in the Internet of things platform, the corresponding relation between the Internet of things equipment and a gateway group is stored in the first relation table, and the corresponding relation between the gateway equipment and the gateway group is stored in the second relation table;
sending the searched gateway group information to the target Internet of things equipment, wherein the gateway group information comprises gateway information of at least two candidate gateway equipment;
receiving device data sent by the target internet of things device through a first gateway device, wherein the first gateway device belongs to the at least two candidate gateway devices;
when the device data transmission fails, receiving the device data transmitted by the target internet of things device through a second gateway device, wherein the second gateway device belongs to the at least two candidate gateway devices and is different from the first gateway device;
the second gateway device sends a device recovery message to the target internet of things device, the device recovery message contains gateway information of recovered gateway devices, the target internet of things device is used for sending the device data to the internet of things platform through the first gateway device when the recovered gateway devices contain preset marks, and the second gateway device sends the device data failure, the preset marks are set by the target internet of things device and used for representing that the first gateway device is in an unavailable state.
4. The method of claim 3, wherein before the receiving, by the second gateway device, the device data sent by the target IOT device, the method further comprises:
receiving, by the second gateway device, a device access request sent by the target internet of things device;
according to the gateway information of the second gateway device, searching a gateway group to which the second gateway device belongs from a second relation table, wherein the second relation table stores the corresponding relation between the gateway device and the gateway group;
when it is determined that the gateway group to which the second gateway device belongs corresponds to the target internet of things device according to the first relation table and the device information, a request passing message is sent to the target internet of things device through the second gateway device, and the target internet of things device is used for sending the device data through the second gateway device after receiving the request passing message.
5. A data transmission device in an Internet of things system is used for a target Internet of things device, and the device comprises:
the first acquisition module is used for sending an information acquisition request to an Internet of things platform when the target Internet of things equipment is on line, wherein the information acquisition request comprises equipment information of the target Internet of things equipment;
the first obtaining module is further configured to receive gateway group information sent by the internet of things platform, a first relation table and a second relation table are stored in the internet of things platform, a corresponding relation between internet of things equipment and a gateway group is stored in the first relation table, a corresponding relation between gateway equipment and the gateway group is stored in the second relation table, the gateway group information is obtained by the internet of things platform through searching from the first relation table and the second relation table according to the equipment information, and the gateway group information includes gateway information of at least two candidate gateway equipment;
a first sending module, configured to send device data to the internet of things platform through a first gateway device of the at least two candidate gateway devices;
a determining module, configured to determine a second gateway device from the at least two candidate gateway devices when the device data transmission fails, where the second gateway device is different from the first gateway device;
the second sending module is used for sending the device data to the Internet of things platform through the second gateway device;
the second setting module is used for setting a preset identifier for the first gateway device, wherein the preset identifier is used for representing that the first gateway device is in an unavailable state;
a second obtaining module, configured to obtain, when an equipment recovery message sent by the internet of things platform is received, gateway information of a recovered gateway device included in the equipment recovery message, where the equipment recovery message is sent when the internet of things platform detects that the gateway device is recovered;
a clearing module, configured to clear the preset identifier if the recovered gateway device is the first gateway device that includes the preset identifier;
and the fifth sending module is used for preferentially selecting to send the device data to the internet of things platform through the first gateway device when the target internet of things device fails to send the device data through the second gateway device.
6. A data receiving device in an Internet of things system, which is used for an Internet of things platform, and comprises:
a sixth sending module, configured to receive an information acquisition request sent by a target internet of things device, where the information acquisition request is sent when the target internet of things device is online, and the information acquisition request includes device information of the target internet of things device;
the sixth sending module is further configured to search for gateway group information from a first relation table and a second relation table according to the device information, where the first relation table and the second relation table are stored in the internet of things platform, a correspondence between internet of things devices and gateway groups is stored in the first relation table, and a correspondence between gateway devices and gateway groups is stored in the second relation table;
the sixth sending module is further configured to send the searched gateway group information to the target internet of things device, where the gateway group information includes gateway information of at least two candidate gateway devices;
a first receiving module, configured to receive, through a first gateway device, device data sent by the target internet of things device, where the first gateway device belongs to the at least two candidate gateway devices;
a second receiving module, configured to receive, through a second gateway device when the device data transmission fails, the device data transmitted by the target internet of things device, where the second gateway device belongs to the at least two candidate gateway devices and is different from the first gateway device;
an eighth sending module, configured to send an equipment recovery message to the target internet of things equipment through the second gateway equipment, where the equipment recovery message includes gateway information of the recovered gateway equipment, the target internet of things equipment is configured to send the equipment data to the internet of things platform through the first gateway equipment when the recovered gateway equipment includes a preset identifier, and the second gateway equipment fails to send the equipment data, where the preset identifier is set by the target internet of things equipment and is used to represent that the first gateway equipment is in an unavailable state.
7. An internet of things device, comprising a processor and a memory, wherein the memory has stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the data transmission method in the internet of things system as claimed in claim 1 or 2.
8. An internet of things platform, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the data receiving method in the internet of things system as claimed in claim 3 or 4.
CN201911379556.5A 2019-12-27 2019-12-27 Data sending and receiving method in Internet of things system, internet of things equipment and platform Active CN110995513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911379556.5A CN110995513B (en) 2019-12-27 2019-12-27 Data sending and receiving method in Internet of things system, internet of things equipment and platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911379556.5A CN110995513B (en) 2019-12-27 2019-12-27 Data sending and receiving method in Internet of things system, internet of things equipment and platform

Publications (2)

Publication Number Publication Date
CN110995513A CN110995513A (en) 2020-04-10
CN110995513B true CN110995513B (en) 2023-02-17

Family

ID=70078079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911379556.5A Active CN110995513B (en) 2019-12-27 2019-12-27 Data sending and receiving method in Internet of things system, internet of things equipment and platform

Country Status (1)

Country Link
CN (1) CN110995513B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835842B (en) * 2020-07-02 2023-02-28 远景智能国际私人投资有限公司 Gateway resource updating method and device and Internet of things control platform
CN111865688B (en) * 2020-07-20 2023-04-18 北京百度网讯科技有限公司 Gateway monitoring method and device, electronic equipment and storage medium
CN112565353A (en) * 2020-11-20 2021-03-26 珠海格力电器股份有限公司 Communication method of terminal network, terminal network and controller
CN112689010B (en) * 2020-12-23 2023-03-28 青岛海尔科技有限公司 Equipment message transmission method and device, storage medium and electronic device
CN113037568B (en) * 2021-04-16 2022-11-08 重庆中源绿蓝能源科技有限公司 Information distribution method of Internet of things equipment
CN113141661B (en) * 2021-04-16 2022-11-22 福建实达集团股份有限公司 Wireless gateway allocation method
CN114666154B (en) * 2022-04-08 2023-11-24 深圳市欧瑞博科技股份有限公司 Device communication method, device, gateway, device, system, medium and product
CN114884805B (en) * 2022-05-25 2023-07-21 远景智能国际私人投资有限公司 Data transmission method, device, terminal and storage medium
CN115309062A (en) * 2022-07-20 2022-11-08 青岛海尔科技有限公司 Device control method, device, storage medium, and electronic apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040079656A (en) * 2003-03-08 2004-09-16 삼성전자주식회사 Method for paging in a mobile communication system
CN104601682A (en) * 2014-12-31 2015-05-06 北京海尔广科数字技术有限公司 Method for switching gateway of internet of things as well as associated device and system
CN107466079A (en) * 2017-08-17 2017-12-12 深圳市盛路物联通讯技术有限公司 Automatic relay switching method and device
CN109802985A (en) * 2017-11-17 2019-05-24 北京金山云网络技术有限公司 Data transmission method, device, equipment and read/write memory medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101138256B (en) * 2005-06-06 2010-05-12 中兴通讯股份有限公司 Cooperative method for protection recovery between layered network in automatic exchange optical network
KR100757896B1 (en) * 2006-05-24 2007-09-11 한국전자통신연구원 System and method for remote home-service download in home network system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040079656A (en) * 2003-03-08 2004-09-16 삼성전자주식회사 Method for paging in a mobile communication system
CN104601682A (en) * 2014-12-31 2015-05-06 北京海尔广科数字技术有限公司 Method for switching gateway of internet of things as well as associated device and system
CN107466079A (en) * 2017-08-17 2017-12-12 深圳市盛路物联通讯技术有限公司 Automatic relay switching method and device
CN109802985A (en) * 2017-11-17 2019-05-24 北京金山云网络技术有限公司 Data transmission method, device, equipment and read/write memory medium

Also Published As

Publication number Publication date
CN110995513A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110995513B (en) Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN107819828B (en) Data transmission method and device, computer equipment and storage medium
CN107294729B (en) Communication method and device between different nodes in block chain
CN111625593B (en) Block chain-based data processing method and device and computer equipment
CN108769146B (en) Data transmission method and device based on block chain and block chain system
CN111262822B (en) File storage method, device, block link point and system
CN110263579B (en) Data processing method, system and related equipment
CN102325167A (en) Verifying method for network file transmission
US20190320009A1 (en) End-to-end file transmission method and system thereof
CN110336848B (en) Scheduling method, scheduling system and scheduling equipment for access request
CN103973421A (en) File transmitting method and device
CN101848188A (en) Method and device for updating data block checking information
CN105657677A (en) Short message sending method, short message gateway and service platform
CN110930254A (en) Data processing method, device, terminal and medium based on block chain
CN103281356A (en) File distribution method and system
CN108243146A (en) A kind of efficient information submits method
CN104484167A (en) Task processing method and device
CN110460668B (en) File uploading method and device, computer equipment and storage medium
CN107172112B (en) Computer file transmission method and device
CN110888892B (en) Block synchronization method, device and storage medium
CN108829735B (en) Synchronization method, device, server and storage medium for parallel execution plan
CN110839077A (en) File request processing method, request feedback information processing method and related components
CN107395772B (en) Management method and management system for repeated data
CN114173396B (en) Method and device for determining terminal networking time, electronic equipment and storage medium
CN107563942B (en) Logistics data batch processing method, logistics processing system and processing device

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Zhang Jian

Inventor after: Ming Lang

Inventor after: Yu Haifeng

Inventor before: Zhang Jian

Inventor before: Ming Lang

GR01 Patent grant
GR01 Patent grant