WO2019010784A1 - Method and system for split backup of internet of things repeater - Google Patents

Method and system for split backup of internet of things repeater Download PDF

Info

Publication number
WO2019010784A1
WO2019010784A1 PCT/CN2017/100564 CN2017100564W WO2019010784A1 WO 2019010784 A1 WO2019010784 A1 WO 2019010784A1 CN 2017100564 W CN2017100564 W CN 2017100564W WO 2019010784 A1 WO2019010784 A1 WO 2019010784A1
Authority
WO
WIPO (PCT)
Prior art keywords
repeater
backup
internet
terminal
things
Prior art date
Application number
PCT/CN2017/100564
Other languages
French (fr)
Chinese (zh)
Inventor
杜光东
Original Assignee
深圳市盛路物联通讯技术有限公司
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 深圳市盛路物联通讯技术有限公司 filed Critical 深圳市盛路物联通讯技术有限公司
Publication of WO2019010784A1 publication Critical patent/WO2019010784A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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

Definitions

  • the present invention relates to the field of Internet of Things technologies, and in particular, to a method and system for split-type backup of an Internet of Things repeater.
  • IoT terminals form LANs or WANs through IoT gateway devices.
  • IoT gateway devices For example, in some family scenarios, many IoT terminals in the family form a home network, such as mobile terminals, game consoles, and other household appliances such as televisions, computers, electronic lock security doors, refrigerators, and washing machines, etc. Access to this network to achieve smart home.
  • a repeater is a system that connects network lines. It mainly performs the functions of the physical layer. It is responsible for transmitting information bit by bit on the physical layer of two nodes, completing the signal copying, adjusting and amplifying functions, thereby extending the length of the network. .
  • the premise of the normal operation of the IoT terminal is that the communication with the IoT platform remains normal. When the communication connection is disconnected, the IoT terminal cannot send service data to the service platform, and the service platform cannot monitor the working state of the IoT terminal. In the event of a repeater failure, the network signal is interrupted, resulting in loss of transmitted data and technical problems with the IoT terminal operating abnormally.
  • a first aspect of an embodiment of the present invention provides a method for split backup of an Internet of Things repeater, the method being based on a repeater subsystem, the repeater subsystem including at least a first repeater and a second a repeater and a third repeater, the backup repeater of the first repeater comprising at least the second repeater and the third repeater, the method comprising:
  • the Internet of Things terminal connected to the first repeater is divided into a first terminal set and a second terminal set;
  • the cached data of the second repeater is sent to the third repeater.
  • the method further includes:
  • the method before the detecting that the first repeater fails, the method further includes:
  • the performance parameters include transmission bandwidth occupancy, bit error rate, and/or packet loss rate.
  • the Internet of Things terminal connected to the first repeater is divided into a first terminal set and a second terminal set, including:
  • the switching the IoT terminal in the first terminal set to the second relay, and switching the Internet of Things terminal in the second terminal set to the third Relays including:
  • the second repeater and the third repeater determine, when receiving the connection request of the Internet of Things terminal, whether the device identifier of the Internet of Things terminal that initiates the connection request matches the device authentication code;
  • the determining, by the data type, the first terminal set and the second terminal set, the Internet of Things terminal includes:
  • the first relay device Assigning, by the first relay device, the data type of the Internet of Things terminal connected to the first relay device to the first terminal set corresponding to the uplink data and the downlink data, and using the data type as the uplink data or the downlink data corresponding to the data type a networked terminal is allocated to the second terminal set;
  • the method further includes:
  • the preset verification information of the Internet of Things terminal refers to the identification information embedded in the IoT terminal device chip for distinguishing it from other devices, and cannot be changed after the device leaves the factory, including the serial number of the manufacturer. Information such as the model of the device and the MAC address of the device.
  • the device authentication code is generated according to the device identification information, that is, the information is converted into a character coded form, such as a specific format such as "serial number-model-MAC address", which is convenient for other devices to read.
  • the evaluation indicator of the backup repeater is obtained, and the number of the Internet of Things terminals allocated by the second repeater and the third repeater is determined according to the ratio of the evaluation indicators.
  • the performance parameters of the evaluation indicator include: transmission bandwidth occupancy rate, bit error rate, and packet loss rate.
  • the Internet of Things terminal closely associated with the first repeater is divided into a first terminal set, and the rest is divided into a second terminal set.
  • detecting a signal strength of the first repeater when the signal strength is less than a preset signal threshold, setting a received data waiting time to a second transmission duration; determining whether the second transmission duration is within the second transmission duration Receiving data sent by the Internet of Things terminal, if yes, setting the received data waiting time to the first transmission duration, and if not, confirming that the first relay is faulty.
  • a second aspect of the embodiments of the present invention provides a system for split backup of an Internet of Things repeater, the system is based on a repeater subsystem, and the repeater subsystem includes at least a first repeater and a second a repeater and a third repeater, the backup repeater of the first repeater comprising at least the second repeater and the third repeater, the system comprising:
  • a first backup module configured to acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater;
  • a priority obtaining module configured to acquire a priority of the backup repeater according to a performance parameter of the backup repeater when detecting that the first repeater fails;
  • a repeater setting module configured to sort priorities of the backup repeaters, when the priority of the third repeater is lower than a priority of the second repeater, a triple repeater as a backup repeater of the second repeater;
  • a terminal dividing module configured to divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set;
  • a terminal switching module configured to switch the Internet of Things terminal in the first terminal set to the second repeater, and switch the Internet of Things terminal in the second terminal set to the third repeater;
  • a second backup module configured to send the cached data of the second repeater to the third repeater.
  • an embodiment of the present invention provides a terminal, including: a processor, a memory, an input device, and an output device, where the processor is configured to execute an instruction according to the method described in the first aspect of the embodiment of the present invention.
  • an embodiment of the present invention provides another terminal, including: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory, and are The configuration is performed by the processor, the program comprising instructions for performing the method as described in the first aspect of the embodiments of the present invention.
  • an embodiment of the present invention provides a computer readable storage medium, wherein the computer readable storage medium is configured to store a computer program, wherein the computer program causes a computer to perform the first aspect of the embodiment of the present invention.
  • an embodiment of the present invention provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Part or all of the first aspect described in the first embodiment of the invention step.
  • the computer program product can be a software installation package.
  • the backup repeater of the first repeater backs up the cached data on the first repeater, when the first repeater appears In the event of a failure, the priority of the backup repeater is obtained according to the performance parameters of the backup repeater. Since the priority of the second repeater is higher than that of the third repeater, the third repeater is the second repeater. Backup repeater that caches cached data on the second repeater.
  • the IoT terminal connected to the first repeater is divided into a first terminal set and a second terminal set, and the IoT terminal in the first terminal set is switched to the second repeater, and the second terminal set is The IoT terminal in the switch is switched to the third repeater.
  • the data in the failed first repeater and the connected Internet of Things terminals can be migrated to other normally working repeaters, avoiding the failure of the repeater and causing the Internet of Things to improve the anti-fault capability of the Internet of Things. To ensure continuous delivery of network services and complete the smooth transfer of data.
  • FIG. 1 is a network architecture diagram of an Internet of Things according to an embodiment of the present invention.
  • FIG. 2 is a structural diagram of a backup system of an Internet of Things repeater according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a split-type backup method for an Internet of Things repeater according to an embodiment of the present invention
  • FIG. 4 is a structural diagram of a split-type backup system for an Internet of Things repeater according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an Internet of Things terminal according to an embodiment of the present invention.
  • the first aspect of the embodiment of the present invention provides a processing method of the fault repeater.
  • Implementation of the method may rely on a computer program that can run on a von Neumann system-based computer device, which can be a repeater's driver manager or virtual device manager.
  • the network architecture of the Internet of Things shown in Figure 1 includes servers, gateways, M access points, N repeaters, and several IoT terminals.
  • the access points are connected via Ethernet or 2G, 3G, 4G, etc.
  • the gateway is connected, the repeater is connected with a plurality of IoT terminals and an access point, and the IoT terminal transmits the collected data through the repeater, and the data is exchanged through the access point and the gateway device uploading server.
  • the computer system is based on a repeater subsystem, the repeater subsystem shown in FIG. 2 includes at least a first repeater, a second repeater, and a third repeater, wherein the backup of the first repeater
  • the node includes at least a second repeater and a third repeater.
  • the first repeater and the backup repeater are repeaters at the same node, and have the same function, and can be connected as a repeater to the Internet of Things.
  • the backup repeater of the first repeater is used to back up the cached data of the first repeater.
  • the backup repeater can be a working repeater or an idle repeater. It should be noted that in order to improve the anti-fault capability of the network, there may be more than two backup repeaters, and the cache data of the first repeater is simultaneously backed up to multiple backup repeaters.
  • a method for backing up an Internet of Things repeater includes:
  • Step S101 Acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater.
  • the repeater is mainly used to enhance the coverage of the wireless signal of the access point AP.
  • the repeater can be a Wi-Fi signal amplifier.
  • Presetting a backup repeater for the repeater in the Internet of Things network environment obtaining a repeater in the repeater subsystem, obtaining the first repeater comprising at least a second repeater and a third repeater Repeater.
  • the cache data of the first repeater is obtained to ensure that the data is not lost.
  • the cached data on the first repeater includes data collected by the Internet of Things terminal, and also data sent by the server to the Internet of Things terminal.
  • the capacity of the cached data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, performing backup of the cached data of the first repeater to the backup is performed.
  • the steps of the relay Therefore, it is avoided that the backup failure cannot be made when the first repeater fails, and the backup fails, and the anti-fault capability is improved.
  • the repeater subsystem when the capacity of the cached data is greater than or equal to the load threshold, the repeater subsystem backs up it. Or set the backup interval threshold, and back up the cached data at intervals. This reduces the running load and network maintenance overhead of the IoT network caused by real-time backup, and avoids data loss caused by the first repeater failure.
  • the backup of the second repeater is performed when the capacity of the cached data is 10M; if the preset backup interval is 5 minutes, the first repeater is used every 5 minutes.
  • the cached data on it is backed up.
  • the performance parameter of the backup repeater of the first repeater is calculated.
  • the priority of the backup repeater; the cached data of the first repeater is backed up according to the priority of the backup repeater. Back up based on priority to improve backup efficiency.
  • the performance parameters of the backup repeater include: processing unit utilization, memory utilization, load/output information for the input/output, and the number of backup jobs that are running.
  • the backup repeater may first establish a data structure including the foregoing four types of information, then collect load sampling information of the backup repeater itself, record the load sampling information into the established data structure, and then record through the local Ethernet.
  • the load sampling information is sent to the processor in the Internet of Things for handling the fault; the processor performs weighting calculation according to the performance parameters of the backup repeater, and compares the values in the preset priority to determine the performance of the backup repeater. parameter.
  • the data structure may be a linked list or an array. The specific form of the data structure is not limited in the embodiment of the present invention.
  • the primary server calculates the processing unit utilization, memory utilization, and input/ of the backup server.
  • the weighted sum of the output load information and the number of backup jobs being run, the priority L of the backup repeater can be:
  • repeater 1 performs backup first, and the repeater 2 performs backup after the backup is completed. After the backup is completed, the repeater 4 performs the backup. Backup reduces the operational load and network maintenance overhead of the IoT network caused by simultaneous backup and improves backup efficiency.
  • Step S102 When detecting that the first repeater fails, obtain the priority of the backup repeater according to the performance parameter of the backup repeater.
  • the priority of the backup repeater should be determined, and the backup is performed according to the priority, thereby improving the backup efficiency.
  • repeater 1 For example, in an Internet of Things, there are 4 repeaters at one node, namely repeater 1, repeater 2, repeater 3, and repeater 4, wherein repeater 3 is the first one.
  • the relay communicates in the network, and the other three repeaters are used as backup repeaters of the repeater 3.
  • the repeater 3 fails, and the priorities of the repeater 1, the repeater 2, and the repeater 4 are calculated at this time.
  • detecting a signal strength of the first repeater when the signal strength is less than a preset signal threshold, setting a receive data waiting time to a second transmission duration; determining whether the IoT terminal is sent within the second transmission duration The data, if yes, sets the receive data waiting time to the first transmission duration, and if not, confirms that the first repeater has failed.
  • the IoT terminal connected to the first repeater can be allocated to the backup repeater to extend the waiting time of receiving data, thereby reducing the burden of the first repeater and improving data transmission efficiency.
  • the data traffic when the data traffic is less than or equal to the preset traffic threshold, it indicates that the first repeater may be faulty, that is, prevent the problem from occurring, and improve the anti-fault capability of the Internet of Things repeater.
  • the IoT terminal connected to the first repeater is allocated to the backup repeater in advance, thereby prolonging the waiting time of receiving data, thereby reducing the burden of the first repeater and improving data transmission efficiency.
  • the preset traffic threshold is 60%
  • the data traffic of the first repeater is 50%
  • the first repeater fault is determined, and then the priority of the backup repeater is obtained, according to the priority level. Make a backup of the data.
  • the order of the backups is performed according to the priority level, so that the network bandwidth is not affected, and the network operation load is reduced. It is assumed that the priority of the backup repeater is from the highest to the lowest in the order of the backup repeater. If the identifier of the backup repeater is 1 to n, the backup repeater with the identifier 1 is the highest priority, and the identifier is n. The backup repeater has the lowest priority. If the preset load threshold is 10M, the backup of the second repeater is performed when the capacity of the cached data is 10M, when the backup of the second repeater is completed, the third repeater is backed up, and so on. Since the capacity of the transmitted data is uncontrollable, the second repeater starts backing up as long as the capacity of the cached data reaches a preset load threshold.
  • Step S103 Sort the priorities of the backup repeaters, and when the priority of the third repeater is lower than the priority of the second repeater, use the third repeater as the backup of the second repeater. Relay.
  • the backup repeaters are sorted according to the priority level, and the second repeater has a higher priority than the third repeater, and the second repeater takes over the first
  • the repeater works while the third repeater acts as a backup repeater for the second repeater.
  • Step S104 Divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set.
  • obtaining a data type of the Internet of Things terminal connected to the first repeater; according to the data type The first terminal set and the Internet of Things terminal included in the second terminal set are determined. That is to say, classifying the Internet of Things terminals connected to the first repeater according to the data type can improve the parallel processing performance and backup performance of the Internet of Things backup repeater system.
  • Step S105 Switching the Internet of Things terminal in the first terminal set to the second repeater, and switching the Internet of Things terminal in the second terminal set to the third repeater.
  • the first backup repeater backs up the first repeater in a manner of multiple backups, so that when the first repeater fails, the first cached data on the first repeater is not lost, and the selected priority is the highest.
  • the second repeater is connected to the IoT terminal of the first terminal set on the first repeater, and the third repeater is connected as the backup repeater of the second repeater to the second relay on the first repeater.
  • the IoT terminal of the terminal gathers the cached data on the second repeater, and switches the first repeater while backing up the second repeater, thereby improving the parallel processing performance of the IoT backup repeater system and Backup performance.
  • Step S106 Send the buffer data of the second repeater to the third repeater.
  • the third relay when the third relay backs up the second cached data on the second repeater, since the first backup data on the first repeater has been backed up before the first repeater fails, only the first The cached second cached data on the second repeater is backed up to avoid duplicate backups and save backup time.
  • the first backup repeater is further configured to set a backup state of the first cached data of the first repeater that is backed up to be backed up; and the third repeater is further configured to obtain a backup of the second repeater. The backup status of the data is backed up to the third repeater with the backup data to be backed up.
  • the radio frequency function of the second repeater and the third repeater is enabled; and the device identifier of the Internet of Things terminal connected to the first repeater is obtained;
  • the second repeater and the third repeater determine, when receiving the connection request of the Internet of Things terminal, whether the device identifier of the IoT terminal that initiates the connection request matches the device authentication code; if the matching is successful, The Internet of Things terminal connects.
  • the IoT terminal in order to improve the security of the backup data, should verify the device identifier of the IoT terminal when connecting the relay device, and receive the connection request when the device identifier of the IoT terminal matches successfully.
  • the IoT terminal connects, otherwise if the match fails, the RF function of the backup repeater is turned off.
  • the IoT terminal is a device that connects the sensing network layer and the transmission network layer in the Internet of Things to collect data and send data to the network layer.
  • Different device identifiers are used to distinguish different devices.
  • the device identifier of the Internet of Things terminal may be the MAC address of the Internet of Things terminal, and the MAC address is also referred to as a physical address or a hardware address, and is used to define the location of the network device, and may also access the date of the network time plus the terminal type or
  • the default naming of the Internet of Things terminal by the computer program may also be a combination of the terminal type and the number, or may be the name saved by the user to the Internet of Things terminal.
  • the IoT terminal on the first repeater is switched to the second repeater, that is to say, the second repeater only connects the IoT terminal on the first repeater that is successfully verified.
  • the device identifier of the Internet of Things terminal connected to the first repeater is obtained, where the device identifier is defined in the IoT terminal device chip for distinguishing
  • the identification information of other devices cannot be changed after the device leaves the factory, including the serial number of the manufacturer, the model number of the device, and the MAC address of the device.
  • the device authentication code is generated according to the device identification information, that is, the information is converted into a character coded form, such as a specific format such as "serial number-model-MAC address", which is convenient for other devices to read.
  • the generated device authentication code of the Internet of Things terminal connected to the first terminal set is sent to the second relay
  • the generated device authentication code of the Internet of Things terminal connected to the second terminal set is sent to the third relay.
  • Device When the second repeater and the third repeater receive the connection request of the Internet of Things terminal, acquire the device identifier of the Internet of Things terminal, read the device information from the device, and match the previously saved device authentication code in the Internet of Things. When the device identifier of the terminal matches the saved device authentication code, the IoT terminal can be connected.
  • the device identifier of the Internet of Things terminal and the saved device authentication code may be successfully combined, for example, the serial number, the model number, and the MAC address are all the same; or when only the serial numbers are the same, That is, it is determined that the device identifier matches the saved device authentication code successfully; or if only a certain percentage of the characters in the string match, the matching is considered successful. In this way, the workload of data processing can be reduced and efficiency can be improved.
  • the MAC addresses of the second repeater and the third repeater are broadcast to the Internet of Things terminal, and the MAC address is also referred to as a physical address or a hardware address, and is used to define the network.
  • the location of the network device, each repeater has a separate MAC address, and the IoT terminal can initiate a connection request to the second repeater after receiving the MAC address of the second repeater.
  • the backup repeater can disable the radio function when backing up and only acts as a storage device.
  • the radio function is enabled, and the remaining backup relays are enabled.
  • the device still turns off the RF function, which reduces the memory usage of the system, saves power consumption, and enhances battery life.
  • the implementation process of the present invention is set forth below in conjunction with a specific application scenario.
  • this application scenario there are three repeaters at one node in the Internet of Things, namely, a repeater J, a repeater K, and a repeater L, wherein the repeater J is the first repeater, Communication takes place in the network, and the other two repeaters are used as backup repeaters for repeater J, and only the storage function is enabled.
  • the repeater J fails. According to the priority calculation result of the repeater K and the repeater L, the priority of the repeater K is higher than that of the repeater L, and the repeater K is Set to the second repeater, set the repeater L to the backup repeater of repeater K.
  • the I/O terminal 1, the Internet of Things terminal 2, and the Internet of Things terminal 3 are connected to the repeater J. At this time, the radio frequency function of the repeater K and the repeater L is turned on.
  • the device K obtains the device authentication codes of the Internet of Things terminal 1 and the Internet of Things terminal 2 as "001-A1070-00010010" and "011-BC79-00101100", respectively, and saves them.
  • the device L of the relay device L for obtaining the device authentication code of the Internet of Things terminal 3 is "001-D1070-00010110".
  • the repeater K broadcasts the MAC address "00-01-6C-06-A6-29" of the repeater K to the Internet of Things terminal 1 and the Internet of Things terminal 2, and the repeater L broadcasts the relay to the Internet of Things terminal 3.
  • the MAC address of the L is "00-01-6C-06-A6-30".
  • the Internet of Things terminal 1 and the Internet of Things terminal 2 After receiving the MAC address of the repeater K, the Internet of Things terminal 1 and the Internet of Things terminal 2 initiate a connection request to the repeater K according to the MAC address, and the IoT terminal 3 receives the MAC address of the repeater L according to the The MAC address initiates a connection request to the repeater L.
  • the device K obtains the device identification information of the Internet of Things terminal 1 and the Internet of Things terminal 2 as "001-A1070-00010010” and "011-BC79-00101100” according to the connection request of the Internet of Things terminal 1 and the Internet of Things terminal 2, respectively. Same as the previously saved device authentication code, it is determined that the matching is successful, and the connection of the Internet of Things terminal 1 and the Internet of Things terminal 2 is received.
  • the device identification information of the IoT terminal 3 is “001-A1070-00011010” and “001-D1070-00010110” according to the connection request of the IoT terminal 3, which does not match the previously saved device authentication code.
  • repeater L and The Internet of Things terminal 3 is not connected. During the operation of the repeater K, the cached data is simultaneously hot-backed to the repeater L to ensure the reliability of the Internet of Things communication.
  • the data type of the Internet of Things terminal connected to the first repeater is the uplink data and the IoT terminal corresponding to the downlink data are allocated to the first terminal set, and the data type is the uplink data or the Internet of Things terminal corresponding to the downlink data.
  • the first set of terminals and the second set of terminals are divided according to the data type of the Internet of Things terminal.
  • the IoT terminal corresponding to the uplink data and the downlink data is allocated to the first terminal set, and the Internet of Things terminal corresponding to the uplink data or the downlink data is allocated to the second terminal set. Therefore, the second repeater with higher priority receives the data and transmits the data, and the third repeater with lower priority only receives the data or transmits the data, thereby improving the data transmission efficiency and reducing the third relay. Performance pressure.
  • a data report is generated according to the device authentication code and the data type of the Internet of Things terminal, and the radio frequency function is turned off.
  • Backup data can be sorted to prevent mis-transmission and re-transmission, and it is conducive to energy saving and enhanced endurance.
  • a second aspect of the embodiments of the present invention provides an IoT repeater split backup system.
  • the system is based on a repeater subsystem comprising at least a first repeater, a second repeater and a third repeater, the backup node of the first repeater comprising at least a second repeater and Third repeater.
  • the above-mentioned IoT repeater split backup system includes:
  • the first backup module 101 is configured to acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater.
  • the priority obtaining module 102 is configured to obtain a priority of the backup repeater according to the performance parameter of the backup repeater when detecting that the first repeater fails.
  • the backup repeater determining module 103 is configured to sort the priorities of the backup repeaters, and when the priority of the third repeater is lower than the priority of the second repeater, the third repeater is used as the first Backup repeater for two repeaters.
  • the terminal dividing module 104 is configured to divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set.
  • the terminal switching module 105 is configured to switch the Internet of Things terminal in the first terminal set to the second repeater, and switch the Internet of Things terminal in the second terminal set to the third repeater.
  • the second backup module 106 is configured to send the cached data of the second repeater to the third repeater.
  • system further includes:
  • the priority obtaining module 107 is configured to: when the capacity of the cached data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, the backup relay according to the first repeater The performance parameters of the device calculate the priority of the backup repeater;
  • the first backup module 101 is specifically configured to back up the cached data of the first repeater according to the priority of the backup repeater.
  • system further includes:
  • the first obtaining module 108 is configured to acquire a data type of the Internet of Things terminal connected to the first repeater;
  • the terminal dividing module 104 is specifically configured to determine, according to the data type, the first terminal set and the Internet of Things terminal included in the second terminal set.
  • system further includes:
  • the second obtaining module 109 is configured to acquire a device identifier of the Internet of Things terminal connected to the first repeater;
  • the generating module 110 is configured to generate a device authentication code according to the device identifier.
  • the sending module 111 is configured to send the device authentication code generated by the Internet of Things terminal in the first terminal set to the second relay, and send the device authentication code generated by the Internet of Things terminal in the second terminal set to the third relay.
  • the determining module 112 is configured to: when the second repeater and the third repeater receive the connection request of the Internet of Things terminal, determine whether the device identifier of the IoT terminal that initiates the connection request matches the device authentication code;
  • the terminal switching module 105 is specifically configured to connect to the Internet of Things terminal if the module is successfully matched.
  • the terminal division module 104 is specifically configured to allocate the data type of the Internet of Things terminal connected by the first relay to the uplink terminal and the Internet of Things terminal corresponding to the downlink data to the first terminal set, and set the data type to The IoT terminal corresponding to the uplink data or the downlink data is allocated to the second terminal set; the system further includes:
  • the data report generating module 113 is configured to generate a data report according to the device authentication code and the data type of the Internet of Things terminal.
  • FIG. 5 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
  • the terminal in this embodiment may include: one or more processors 801; one or more input devices 802, one or more output devices 803, and a memory 804.
  • the above processor 801, input device 802, output device 803, and memory 804 are connected by a bus 805.
  • the memory 802 is for storing instructions
  • the processor 801 is for executing instructions stored by the memory 802.
  • the processor 801 is configured to: acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater; when detecting that the first repeater fails, according to the backup The performance parameter of the repeater obtains the priority of the backup repeater; the priority of the backup repeater is sorted, and when the priority of the third repeater is lower than the priority of the second repeater, the third The repeater acts as a backup repeater of the second repeater; switches the IoT terminal connected to the first repeater to the second repeater, and transmits the cached data of the second repeater to the third relay Device.
  • the processor 801 may be a central processing unit (CPU), and the processor may also be another general-purpose processor, a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the input device 802 may include a touchpad, a fingerprint sensor (for collecting fingerprint information of the user and direction information of the fingerprint), a microphone, and the like, and the output device 803 may include a display (LCD or the like), a speaker, and the like.
  • a touchpad for collecting fingerprint information of the user and direction information of the fingerprint
  • a microphone for collecting fingerprint information of the user and direction information of the fingerprint
  • the output device 803 may include a display (LCD or the like), a speaker, and the like.
  • the memory 804 can include read only memory and random access memory and provides instructions and data to the processor 801. A portion of the memory 804 may also include a non-volatile random access memory. For example, the memory 804 can also store information of the device type.
  • the processor 801, the input device 802, and the output device 803, which are described in the embodiments of the present invention, may be implemented in the first aspect provided by the embodiment of the present invention, and may also be described in the embodiment of the present invention.
  • the implementation of the terminal is not described here.
  • Another terminal provided in another embodiment of the present invention includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are Configuration is performed by the processor, the program comprising for performing an embodiment of the present invention
  • a computer readable storage medium in another embodiment, the computer readable storage medium storing a computer program, wherein the computer program causes a computer to perform the first aspect as provided by an embodiment of the present invention Some or all of the steps described.
  • a computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Some or all of the steps described in the first aspect provided by the embodiments of the invention.
  • the computer program product can be a software installation package.
  • the backup repeater of the first repeater backs up the cached data on the first repeater, when the first repeater appears In the event of a failure, the priority of the backup repeater is obtained according to the performance parameters of the backup repeater. Since the priority of the second repeater is higher than that of the third repeater, the third repeater is the second repeater. Backup repeater that caches cached data on the second repeater.
  • the IoT terminal connected to the first repeater is divided into a first terminal set and a second terminal set, and the IoT terminal in the first terminal set is switched to the second repeater, and the Internet of Things in the second terminal set is The terminal switches to the third repeater.
  • the data in the failed first repeater and the connected Internet of Things terminals can be migrated to other normally working repeaters, avoiding the failure of the repeater and causing the Internet of Things to improve the anti-fault capability of the Internet of Things. To ensure continuous delivery of network services and complete the smooth transfer of data.
  • the disclosed terminal and method may be In other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the above-described integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present invention.
  • the foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in the present invention is a method for the slit backup of an Internet of Things repeater, comprising: acquiring a backup repeater of a first repeater and backing up cache data of the first repeater to the backup repeater; when detected that the first repeater experiences an error, acquiring the priority of the backup repeater according to performance parameters of the backup repeater; ranking the priority level of the backup repeater, and when the priority of a third repeater is lower than the priority of a second repeater, using the third repeater as a backup repeater for the second repeater; dividing Internet of Things terminals that are connected to the first repeater into a first terminal set and a second terminal set, and switching the Internet of Things terminals in the first terminal set to the second repeater, while switching the Internet of Things terminals in the second terminal set to the third repeater. By means of the present invention, anti-error capabilities may be improved, thus ensuring that transmitted data is not lost and that a network operates normally.

Description

物联网中继器拆分式备份的方法及系统Method and system for split backup of internet of things repeater 技术领域Technical field
本发明涉及物联网技术领域,尤其涉及一种物联网中继器拆分式备份的方法及系统。The present invention relates to the field of Internet of Things technologies, and in particular, to a method and system for split-type backup of an Internet of Things repeater.
背景技术Background technique
物联网的浪潮影响到社会和生活的各个方面,由于近距离通信技术和产品的普及,越来越多的物联网终端通过物联网网关设备组成局域网或者广域网。例如,在一些家庭场景下,家庭里面的很多物联网终端组成家庭网络,用户的终端如移动终端、游戏机等设备,家用电器如电视、电脑、电子锁防盗门、冰箱和洗衣机等等,可接入到这个网络实现智能家居。The wave of the Internet of Things affects all aspects of society and life. Due to the popularity of short-range communication technologies and products, more and more IoT terminals form LANs or WANs through IoT gateway devices. For example, in some family scenarios, many IoT terminals in the family form a home network, such as mobile terminals, game consoles, and other household appliances such as televisions, computers, electronic lock security doors, refrigerators, and washing machines, etc. Access to this network to achieve smart home.
中继器是连接网络线路的一种系统,主要完成物理层的功能,负责在两个节点的物理层上按位传递信息,完成信号的复制、调整和放大功能,以此来延长网络的长度。物联网终端正常进行业务的前提是与物联网平台的通信保持正常,在通信连接断开的情况下,物联网终端无法发送业务数据到业务平台,业务平台也无法监控物联网终端的工作状态。一旦出现中继器故障时,则网络信号中断,导致传输的数据丢失和物联网终端工作异常的技术问题。A repeater is a system that connects network lines. It mainly performs the functions of the physical layer. It is responsible for transmitting information bit by bit on the physical layer of two nodes, completing the signal copying, adjusting and amplifying functions, thereby extending the length of the network. . The premise of the normal operation of the IoT terminal is that the communication with the IoT platform remains normal. When the communication connection is disconnected, the IoT terminal cannot send service data to the service platform, and the service platform cannot monitor the working state of the IoT terminal. In the event of a repeater failure, the network signal is interrupted, resulting in loss of transmitted data and technical problems with the IoT terminal operating abnormally.
发明内容Summary of the invention
本发明实施例第一方面提出了一种物联网中继器拆分式备份的方法,所述方法基于中继器子系统,所述中继器子系统至少包括第一中继器、第二中继器和第三中继器,所述第一中继器的备份中继器至少包括所述第二中继器和所述第三中继器,所述方法包括:A first aspect of an embodiment of the present invention provides a method for split backup of an Internet of Things repeater, the method being based on a repeater subsystem, the repeater subsystem including at least a first repeater and a second a repeater and a third repeater, the backup repeater of the first repeater comprising at least the second repeater and the third repeater, the method comprising:
获取第一中继器的备份中继器,将所述第一中继器的缓存数据备份至所述备份中继器;Obtaining a backup repeater of the first repeater, and backing up the cached data of the first repeater to the backup repeater;
在检测到所述第一中继器发生故障时,根据所述备份中继器的性能参数获取所述备份中继器的优先级; When detecting that the first repeater is faulty, acquiring a priority of the backup repeater according to performance parameters of the backup repeater;
对所述备份中继器的优先级进行排序,在所述第三中继器的优先级低于所述第二中继器的优先级时,将所述第三中继器作为所述第二中继器的备份中继器;Sorting priorities of the backup repeaters, and when the priority of the third repeater is lower than the priority of the second repeater, the third repeater is used as the first Backup repeater for two repeaters;
将与所述第一中继器连接的物联网终端分为第一终端集合和第二终端集合;The Internet of Things terminal connected to the first repeater is divided into a first terminal set and a second terminal set;
将所述第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器;Switching the Internet of Things terminal in the first terminal set to the second repeater, and switching the Internet of Things terminal in the second terminal set to the third repeater;
将所述第二中继器的缓存数据发送至所述第三中继器。The cached data of the second repeater is sent to the third repeater.
可选的,所述方法还包括:Optionally, the method further includes:
当所述第一中继器的数据流量小于或等于预设流量阈值时,确定所述第一中继器发生故障。When the data traffic of the first repeater is less than or equal to the preset traffic threshold, determining that the first repeater is faulty.
在其中一个实施例中,在所述在检测到所述第一中继器发生故障之前,所述方法还包括:In one embodiment, before the detecting that the first repeater fails, the method further includes:
当所述第一中继器的缓存数据的容量大小到达预设容量阈值时或定时器记录的时间到达预设备份间隔时间时,根据所述第一中继器的备份中继器的性能参数计算所述备份中继器的优先级,根据所述备份中继器的优先级对所述第一中继器的缓存数据进行备份。When the size of the buffered data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, according to performance parameters of the backup repeater of the first repeater Calculating a priority of the backup repeater, and backing up cached data of the first repeater according to a priority of the backup repeater.
其中,性能参数包括传输带宽占用率、误码率和/或丢包率。The performance parameters include transmission bandwidth occupancy, bit error rate, and/or packet loss rate.
在其中一个实施例中,所述将与所述第一中继器连接的物联网终端分为第一终端集合和第二终端集合,包括:In one of the embodiments, the Internet of Things terminal connected to the first repeater is divided into a first terminal set and a second terminal set, including:
获取所述与所述第一中继器连接的物联网终端的数据类型;Obtaining a data type of the Internet of Things terminal connected to the first repeater;
根据所述数据类型确定所述第一终端集合和所述第二终端集合中包含的物联网终端。Determining, according to the data type, the first terminal set and the Internet of Things terminal included in the second terminal set.
在其中一个实施例中,所述将所述第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器,包括:In one embodiment, the switching the IoT terminal in the first terminal set to the second relay, and switching the Internet of Things terminal in the second terminal set to the third Relays, including:
开启所述第二中继器和所述第三中继器的射频功能;Turning on radio frequency functions of the second repeater and the third repeater;
获取所述与所述第一中继器连接的物联网终端的设备标识;Obtaining the device identifier of the Internet of Things terminal connected to the first repeater;
根据所述设备标识生成设备认证编码; Generating a device authentication code according to the device identifier;
将所述第一终端集合中的物联网终端生成的设备认证编码发送至所述第二中继器,将所述第二终端集合中的物联网终端生成的设备认证编码发送至所述第三中继器;Transmitting, to the second repeater, a device authentication code generated by the Internet of Things terminal in the first terminal set, and transmitting a device authentication code generated by the Internet of Things terminal in the second terminal set to the third Repeater
所述第二中继器和所述第三中继器在接收到所述物联网终端的连接请求时,判断所述发起连接请求的物联网终端的设备标识是否与所述设备认证编码匹配;The second repeater and the third repeater determine, when receiving the connection request of the Internet of Things terminal, whether the device identifier of the Internet of Things terminal that initiates the connection request matches the device authentication code;
若匹配成功,与该物联网终端进行连接。If the match is successful, connect to the IoT terminal.
在其中一个实施例中,所述根据所述数据类型确定所述第一终端集合和所述第二终端集合中包含的物联网终端,包括:In one embodiment, the determining, by the data type, the first terminal set and the second terminal set, the Internet of Things terminal includes:
将所述第一中继器连接的物联网终端的数据类型为上行数据和下行数据对应的物联网终端分配至所述第一终端集合,将所述数据类型为上行数据或下行数据对应的物联网终端分配至所述第二终端集合;Assigning, by the first relay device, the data type of the Internet of Things terminal connected to the first relay device to the first terminal set corresponding to the uplink data and the downlink data, and using the data type as the uplink data or the downlink data corresponding to the data type a networked terminal is allocated to the second terminal set;
在所述将所述第二中继器的缓存数据发送至所述第三中继器之后,所述方法还包括:After the sending the cached data of the second repeater to the third repeater, the method further includes:
根据所述物联网终端的设备认证编码和所述数据类型生成数据报告。Generating a data report according to the device authentication code of the Internet of Things terminal and the data type.
物联网终端的预设验证信息即该物联网终端的设备标识,指内置于物联网终端设备芯片中的用于区别于其他设备的识别信息,在设备出厂之后就不能更改,包括生产厂家序列号、设备的型号、设备的MAC地址等信息。根据设备标识信息生成设备认证编码,即将这些信息转化成字符编码的形式,例如“序列号-型号-MAC地址”这样的特定格式,便于其他设备进行读取。The preset verification information of the Internet of Things terminal, that is, the device identification of the Internet of Things terminal, refers to the identification information embedded in the IoT terminal device chip for distinguishing it from other devices, and cannot be changed after the device leaves the factory, including the serial number of the manufacturer. Information such as the model of the device and the MAC address of the device. The device authentication code is generated according to the device identification information, that is, the information is converted into a character coded form, such as a specific format such as "serial number-model-MAC address", which is convenient for other devices to read.
可选的,获取备份中继器的评价指标,按照评价指标的比值确定第二中继器和第三中继器分配的物联网终端数量。其中,评价指标的性能参数包括:传输带宽占用率、误码率和丢包率等等。Optionally, the evaluation indicator of the backup repeater is obtained, and the number of the Internet of Things terminals allocated by the second repeater and the third repeater is determined according to the ratio of the evaluation indicators. The performance parameters of the evaluation indicator include: transmission bandwidth occupancy rate, bit error rate, and packet loss rate.
可选的,根据物联网终端和第一中继器的关联程度划分。将与第一中继器关联密切的物联网终端划分到第一终端集合,其余的划分到第二终端集合。Optionally, it is divided according to the degree of association between the Internet of Things terminal and the first repeater. The Internet of Things terminal closely associated with the first repeater is divided into a first terminal set, and the rest is divided into a second terminal set.
可选的,检测所述第一中继器的信号强度;当所述信号强度小于预设信号阈值时,将接收数据等待时间设置为第二传输时长;判断在所述第二传输时长内是否接收到所述物联网终端发送的数据,若是,将所述接收数据等待时间设置为所述第一传输时长,若否,则确认所述第一中继器发生故障。 Optionally, detecting a signal strength of the first repeater; when the signal strength is less than a preset signal threshold, setting a received data waiting time to a second transmission duration; determining whether the second transmission duration is within the second transmission duration Receiving data sent by the Internet of Things terminal, if yes, setting the received data waiting time to the first transmission duration, and if not, confirming that the first relay is faulty.
本发明实施例第二方面提出了一种物联网中继器拆分式备份的系统,所述系统基于中继器子系统,所述中继器子系统至少包括第一中继器、第二中继器和第三中继器,所述第一中继器的备份中继器至少包括所述第二中继器和所述第三中继器,所述系统包括:A second aspect of the embodiments of the present invention provides a system for split backup of an Internet of Things repeater, the system is based on a repeater subsystem, and the repeater subsystem includes at least a first repeater and a second a repeater and a third repeater, the backup repeater of the first repeater comprising at least the second repeater and the third repeater, the system comprising:
第一备份模块,用于获取第一中继器的备份中继器,将所述第一中继器的缓存数据备份至所述备份中继器;a first backup module, configured to acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater;
优先级获取模块,用于在检测到所述第一中继器发生故障时,根据所述备份中继器的性能参数获取所述备份中继器的优先级;a priority obtaining module, configured to acquire a priority of the backup repeater according to a performance parameter of the backup repeater when detecting that the first repeater fails;
中继器设置模块,用于对所述备份中继器的优先级进行排序,在所述第三中继器的优先级低于所述第二中继器的优先级时,将所述第三中继器作为所述第二中继器的备份中继器;a repeater setting module, configured to sort priorities of the backup repeaters, when the priority of the third repeater is lower than a priority of the second repeater, a triple repeater as a backup repeater of the second repeater;
终端划分模块,用于将与所述第一中继器连接的物联网终端分为第一终端集合和第二终端集合;a terminal dividing module, configured to divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set;
终端切换模块,用于将所述第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器;a terminal switching module, configured to switch the Internet of Things terminal in the first terminal set to the second repeater, and switch the Internet of Things terminal in the second terminal set to the third repeater;
第二备份模块,用于将所述第二中继器的缓存数据发送至所述第三中继器。And a second backup module, configured to send the cached data of the second repeater to the third repeater.
第三方面,本发明实施例提供了一种终端,包括:处理器、存储器、输入设备以及输出设备,其中处理器用于执行如本发明实施例第一方面所描述的方法的指令。In a third aspect, an embodiment of the present invention provides a terminal, including: a processor, a memory, an input device, and an output device, where the processor is configured to execute an instruction according to the method described in the first aspect of the embodiment of the present invention.
第四方面,本发明实施例提供了另一种终端,包括:处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如本发明实施例第一方面所描述的方法的指令。In a fourth aspect, an embodiment of the present invention provides another terminal, including: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory, and are The configuration is performed by the processor, the program comprising instructions for performing the method as described in the first aspect of the embodiments of the present invention.
第五方面,本发明实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质用于存储计算机程序,其中,所述计算机程序使得计算机执行如本发明实施例第一方面所描述的部分或全部步骤。In a fifth aspect, an embodiment of the present invention provides a computer readable storage medium, wherein the computer readable storage medium is configured to store a computer program, wherein the computer program causes a computer to perform the first aspect of the embodiment of the present invention. Some or all of the steps described.
第六方面,本发明实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本发明实施例第一方面中所描述的部分或全部 步骤。该计算机程序产品可以为一个软件安装包。In a sixth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Part or all of the first aspect described in the first embodiment of the invention step. The computer program product can be a software installation package.
可以理解,采用了上述物联网中继器拆分式备份方法及系统之后,第一中继器的备份中继器对第一中继器上的缓存数据进行备份,当第一中继器出现故障时,按照备份中继器的性能参数得到备份中继器的优先级,由于第二中继器的优先级高于第三中继器,因此将第三中继器为第二中继器的备份中继器,缓存第二中继器上的缓存数据。将第一中继器连接的物联网终端分为第一终端集合和第二终端集合,将第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器。从而使得发生故障的第一中继器中的数据和与之连接的物联网终端得以迁移到其他正常工作的中继器上,避免中继器故障导致物联网瘫痪,提高物联网的抗故障能力,确保持续提供网络服务,完成了数据的顺利传输。It can be understood that after the above-mentioned IoT repeater split backup method and system are adopted, the backup repeater of the first repeater backs up the cached data on the first repeater, when the first repeater appears In the event of a failure, the priority of the backup repeater is obtained according to the performance parameters of the backup repeater. Since the priority of the second repeater is higher than that of the third repeater, the third repeater is the second repeater. Backup repeater that caches cached data on the second repeater. The IoT terminal connected to the first repeater is divided into a first terminal set and a second terminal set, and the IoT terminal in the first terminal set is switched to the second repeater, and the second terminal set is The IoT terminal in the switch is switched to the third repeater. Therefore, the data in the failed first repeater and the connected Internet of Things terminals can be migrated to other normally working repeaters, avoiding the failure of the repeater and causing the Internet of Things to improve the anti-fault capability of the Internet of Things. To ensure continuous delivery of network services and complete the smooth transfer of data.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
其中:among them:
图1为本发明实施例提供的一种物联网的组网架构图;1 is a network architecture diagram of an Internet of Things according to an embodiment of the present invention;
图2为本发明实施例提供的一种物联网中继器的备份系统的结构图;2 is a structural diagram of a backup system of an Internet of Things repeater according to an embodiment of the present invention;
图3为本发明实施例提供的一种物联网中继器拆分式备份方法的流程图;FIG. 3 is a flowchart of a split-type backup method for an Internet of Things repeater according to an embodiment of the present invention;
图4为本发明实施例提供的一种物联网中继器拆分式备份系统的结构图;4 is a structural diagram of a split-type backup system for an Internet of Things repeater according to an embodiment of the present invention;
图5是本发明实施例提供的一种物联网终端的结构示意图。FIG. 5 is a schematic structural diagram of an Internet of Things terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
本发明说明书、权利要求书和附图中出现的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或 设备固有的其它步骤或单元。此外,术语“第一”、“第二”和“第三”等是用于区别不同的对象,而并非用于描述特定的顺序。The terms "comprising" and "having", and any variations thereof, appear in the description, the claims, and the drawings are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively For these processes, methods, products or Other steps or units inherent to the device. Moreover, the terms "first," "second," and "third," etc. are used to distinguish different objects, and are not intended to describe a particular order.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
为解决中继器故障时导致传输数据丢失和网络工作异常的技术问题,在一个实施例中,本发明实施例第一方面提出一种故障中继器的处理方法。该方法的实现可依赖于计算机程序,该计算机程序可运行于基于冯诺依曼体系的计算机装置之上,该计算机程序可以是中继器的驱动管理程序或虚拟设备管理程序。In order to solve the technical problem of the transmission data loss and the network operation abnormality when the relay is faulty, in one embodiment, the first aspect of the embodiment of the present invention provides a processing method of the fault repeater. Implementation of the method may rely on a computer program that can run on a von Neumann system-based computer device, which can be a repeater's driver manager or virtual device manager.
如图1所示的物联网的网络构架包含服务器、网关、M个接入点、N个中继器和若干个物联网终端,接入点通过以太网或者2G、3G、4G等网络形式与网关相连,中继器与多个物联网终端和接入点连接,物联网终端将采集的数据通过中继器进行传输,经过接入点和网关设备上传服务器进行数据的交换。The network architecture of the Internet of Things shown in Figure 1 includes servers, gateways, M access points, N repeaters, and several IoT terminals. The access points are connected via Ethernet or 2G, 3G, 4G, etc. The gateway is connected, the repeater is connected with a plurality of IoT terminals and an access point, and the IoT terminal transmits the collected data through the repeater, and the data is exchanged through the access point and the gateway device uploading server.
且该计算机系统基于中继器子系统,如图2所示的中继器子系统至少包括第一中继器、第二中继器和第三中继器,其中第一中继器的备份节点至少包括第二中继器和第三中继器,第一中继器和备份中继器为同一节点处的中继器,其功能相同,均可以作为中继器连接至物联网中,且第一中继器的备份中继器用于备份第一中继器的缓存数据。备份中继器可以是正在工作的中继器,也可以是闲置的中继器。需要说明的是,为了提高网络的抗故障能力,备份中继器可多于两个,且第一中继器的缓存数据同时备份至多个备份中继器中。And the computer system is based on a repeater subsystem, the repeater subsystem shown in FIG. 2 includes at least a first repeater, a second repeater, and a third repeater, wherein the backup of the first repeater The node includes at least a second repeater and a third repeater. The first repeater and the backup repeater are repeaters at the same node, and have the same function, and can be connected as a repeater to the Internet of Things. And the backup repeater of the first repeater is used to back up the cached data of the first repeater. The backup repeater can be a working repeater or an idle repeater. It should be noted that in order to improve the anti-fault capability of the network, there may be more than two backup repeaters, and the cache data of the first repeater is simultaneously backed up to multiple backup repeaters.
具体的,如图3所示,一种物联网中继器的备份方法,包括:Specifically, as shown in FIG. 3, a method for backing up an Internet of Things repeater includes:
步骤S101:获取第一中继器的备份中继器,将第一中继器的缓存数据备份至备份中继器。Step S101: Acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater.
中继器主要用于增强接入点AP的无线信号的覆盖范围,例如,中继器可以是Wi-Fi信号放大器。预先对物联网网络环境中的中继器设定备份中继器,获取中继器子系统中的中继器得到第一中继器至少包括第二中继器和第三中继器两个中继器。获取第一中继器的备份中继器,将第一中继器上缓存的数据备份至备份中继器,也就是说读取第二中继器和第三中继器上的存储数据可获 得第一中继器的缓存数据,确保数据不丢失。第一中继器上的缓存数据包括物联网终端采集的数据,也包括服务器向物联网终端发送的数据。The repeater is mainly used to enhance the coverage of the wireless signal of the access point AP. For example, the repeater can be a Wi-Fi signal amplifier. Presetting a backup repeater for the repeater in the Internet of Things network environment, obtaining a repeater in the repeater subsystem, obtaining the first repeater comprising at least a second repeater and a third repeater Repeater. Obtaining the backup repeater of the first repeater, and backing up the data cached on the first repeater to the backup repeater, that is, reading the stored data on the second repeater and the third repeater. Obtained The cache data of the first repeater is obtained to ensure that the data is not lost. The cached data on the first repeater includes data collected by the Internet of Things terminal, and also data sent by the server to the Internet of Things terminal.
可选的,当第一中继器的缓存数据的容量大小到达预设容量阈值时或定时器记录的时间到达预设备份间隔时间时,执行将第一中继器的缓存数据备份至备份中继器的步骤。从而避免在第一中继器故障时不能与备份中继器进行连接导致备份失败的情况发生,提高抗故障能力。Optionally, when the capacity of the cached data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, performing backup of the cached data of the first repeater to the backup is performed. The steps of the relay. Therefore, it is avoided that the backup failure cannot be made when the first repeater fails, and the backup fails, and the anti-fault capability is improved.
也就是说,当缓存数据的容量大于或等于负载阈值时,中继器子系统才对其进行备份。或者设置备份间隔时间阈值,每隔一段时间对缓存数据进行备份,从而减轻了实时备份造成的物联网网络的运行负荷和网络维护开销,且避免第一中继器故障导致数据丢失。That is, when the capacity of the cached data is greater than or equal to the load threshold, the repeater subsystem backs up it. Or set the backup interval threshold, and back up the cached data at intervals. This reduces the running load and network maintenance overhead of the IoT network caused by real-time backup, and avoids data loss caused by the first repeater failure.
例如:若预设容量阈值为10M,则当缓存数据的容量大小为10M时进行第二中继器的备份;若预设备份间隔时间为5分钟,则每过5分钟对第一中继器上的缓存数据进行备份。进一步的,当第一中继器的缓存数据的容量大小到达预设容量阈值时或定时器记录的时间到达预设备份间隔时间时,根据第一中继器的备份中继器的性能参数计算备份中继器的优先级;根据备份中继器的优先级对第一中继器的缓存数据进行备份。根据优先级进行备份,从而提高备份效率。For example, if the preset capacity threshold is 10M, the backup of the second repeater is performed when the capacity of the cached data is 10M; if the preset backup interval is 5 minutes, the first repeater is used every 5 minutes. The cached data on it is backed up. Further, when the capacity of the cached data of the first repeater reaches the preset capacity threshold or the time recorded by the timer reaches the preset backup interval, the performance parameter of the backup repeater of the first repeater is calculated. The priority of the backup repeater; the cached data of the first repeater is backed up according to the priority of the backup repeater. Back up based on priority to improve backup efficiency.
备份中继器的性能参数包括:处理单元利用率、内存利用率、输入/输出的负载信息和正在运行的备份作业数。具体的,备份中继器可以先建立包括上述四种信息的数据结构,然后采集备份中继器自身的负载采样信息,将负载采样信息记录到建立的数据结构中;再通过本地以太网将记录的负载采样信息发送至物联网中负责处理故障事故的处理器;处理器根据备份中继器的性能参数进行加权计算,与预设的优先级中的数值进行比对确定备份中继器的性能参数。其中,该数据结构可以为链表或数组等,本发明实施例对数据结构的具体形式不作限定。The performance parameters of the backup repeater include: processing unit utilization, memory utilization, load/output information for the input/output, and the number of backup jobs that are running. Specifically, the backup repeater may first establish a data structure including the foregoing four types of information, then collect load sampling information of the backup repeater itself, record the load sampling information into the established data structure, and then record through the local Ethernet. The load sampling information is sent to the processor in the Internet of Things for handling the fault; the processor performs weighting calculation according to the performance parameters of the backup repeater, and compares the values in the preset priority to determine the performance of the backup repeater. parameter. The data structure may be a linked list or an array. The specific form of the data structure is not limited in the embodiment of the present invention.
当处理单元利用率为C、内存利用率为M、正在运行的备份作业数为J、输入/输出的负载信息为IO时,主服务器计算备份服务器的处理单元利用率、内存利用率、输入/输出的负载信息和正在运行的备份作业数的加权和,获得备份中继器的优先级L可以为: When the processing unit utilization is C, the memory utilization is M, the number of running backup jobs is J, and the input/output load information is IO, the primary server calculates the processing unit utilization, memory utilization, and input/ of the backup server. The weighted sum of the output load information and the number of backup jobs being run, the priority L of the backup repeater can be:
L=b1*C+b2*W+b3*D+b4*IO       (1)L=b1*C+b2*W+b3*D+b4*IO (1)
式(1)中,b1、b2、b3和b4分别代表C、M、J和IO在计算优先级的权重,b1+b2+b3+b4=1。其中,bi(i=1,2,3,4)的具体取值可根据服务器的运行情况设置或采用推荐设置。例如,设置b1=0.3,b2=0.3,b3=0.2,b4=0.2。In equation (1), b1, b2, b3, and b4 represent the weights of C, M, J, and IO in calculating the priority, respectively, b1+b2+b3+b4=1. The specific value of bi(i=1, 2, 3, 4) can be set according to the running condition of the server or the recommended setting. For example, set b1 = 0.3, b2 = 0.3, b3 = 0.2, and b4 = 0.2.
例如,在一个物联网中,在一个节点处有4个中继器,分别为中继器1、中继器2、中继器3和中继器4,其中中继器3为第一中继器,按照上述公式(1)计算中继器1、中继器2和中继器4的优先级,假设b1=0.4,b2=0.3,b3=0.3,从而得到中继器1的优先级为89,中继器2的优先级为75,中继器4的优先级为67,则中继器1先进行备份,备份完成后中继器2进行备份,备份完成后中继器4进行备份,减轻了同时备份造成的物联网网络的运行负荷和网络维护开销,提高备份效率。For example, in an Internet of Things, there are 4 repeaters at one node, namely repeater 1, repeater 2, repeater 3, and repeater 4, wherein repeater 3 is the first one. The relay calculates the priority of the repeater 1, the repeater 2, and the repeater 4 according to the above formula (1), assuming that b1 = 0.4, b2 = 0.3, and b3 = 0.3, thereby obtaining the priority of the repeater 1. 89, the priority of the repeater 2 is 75, and the priority of the repeater 4 is 67. The repeater 1 performs backup first, and the repeater 2 performs backup after the backup is completed. After the backup is completed, the repeater 4 performs the backup. Backup reduces the operational load and network maintenance overhead of the IoT network caused by simultaneous backup and improves backup efficiency.
步骤S102:在检测到第一中继器发生故障时,根据备份中继器的性能参数获取备份中继器的优先级。Step S102: When detecting that the first repeater fails, obtain the priority of the backup repeater according to the performance parameter of the backup repeater.
在本实施例中,当检测到第一中继器发生故障时,应当确定备份中继器的优先级,根据优先级进行备份,从而提高备份效率。In this embodiment, when it is detected that the first repeater fails, the priority of the backup repeater should be determined, and the backup is performed according to the priority, thereby improving the backup efficiency.
例如,在一个物联网中,在一个节点处有4个中继器,分别为中继器1、中继器2、中继器3和中继器4,其中中继器3为第一中继器,在网络中进行通信,其他三个中继器都作为中继器3的备份中继器使用。在某一次的通讯过程中,中继器3发生故障,此时计算中继器1、中继器2和中继器4的优先级。假设按照上述公式(1)进行计算,其中b1=0.4,b2=0.3,b3=0.3,从而得到中继器1的优先级为89,中继器2的优先级为75,中继器4的优先级为67,对这三个计算结果进行排序,选择优先级最高的中继器1作为第二中继器,将中继器2和中继器4作为中继器1的备份中继器。从而保证中继器正常通信,提高物联网的可靠性。For example, in an Internet of Things, there are 4 repeaters at one node, namely repeater 1, repeater 2, repeater 3, and repeater 4, wherein repeater 3 is the first one. The relay communicates in the network, and the other three repeaters are used as backup repeaters of the repeater 3. In a certain communication process, the repeater 3 fails, and the priorities of the repeater 1, the repeater 2, and the repeater 4 are calculated at this time. It is assumed that the calculation is performed according to the above formula (1), where b1 = 0.4, b2 = 0.3, and b3 = 0.3, so that the priority of the repeater 1 is 89, and the priority of the repeater 2 is 75, the repeater 4 The priority is 67, the three calculation results are sorted, the repeater 1 with the highest priority is selected as the second repeater, and the repeater 2 and the repeater 4 are used as the backup repeater of the repeater 1. . Thereby ensuring the normal communication of the repeater and improving the reliability of the Internet of Things.
可选的,检测第一中继器的信号强度;当信号强度小于预设信号阈值时,将接收数据等待时间设置为第二传输时长;判断在第二传输时长内是否接收到物联网终端发送的数据,若是,将接收数据等待时间设置为第一传输时长,若否,则确认第一中继器发生故障。Optionally, detecting a signal strength of the first repeater; when the signal strength is less than a preset signal threshold, setting a receive data waiting time to a second transmission duration; determining whether the IoT terminal is sent within the second transmission duration The data, if yes, sets the receive data waiting time to the first transmission duration, and if not, confirms that the first repeater has failed.
也就是说,当信号强度低于预设信息阈值时,在第二传输时长内判断是否 能接受到物联网终端发送的数据,若能,则说明信号虽弱,但是第一中继器没出现故障问题;若不能,则说明第一中继器可能发生故障,即防患于未然,提高物联网中继器的抗故障能力。且可将第一中继器连接的物联网终端分配给备份中继器,延长接收数据等待时间,从而降低第一中继器的负担,提高数据传输效率。That is, when the signal strength is lower than the preset information threshold, it is determined within the second transmission time period whether Can receive the data sent by the IoT terminal. If it is, the signal is weak, but the first repeater has no problem; if not, the first repeater may be faulty, that is, prevent it from happening. Improve the anti-fault capability of IoT repeaters. The IoT terminal connected to the first repeater can be allocated to the backup repeater to extend the waiting time of receiving data, thereby reducing the burden of the first repeater and improving data transmission efficiency.
可选的,根据数据流量大小判断,当第一中继器的数据流量小于或等于预设流量阈值时,确定第一中继器发生故障。Optionally, determining, according to the data traffic size, that the first repeater fails when the data traffic of the first repeater is less than or equal to the preset traffic threshold.
也就是说,当数据流量小于或等于预设流量阈值时,则说明第一中继器可能发生故障,即防患于未然,提高物联网中继器的抗故障能力。且提前将第一中继器连接的物联网终端分配给备份中继器,延长接收数据等待时间,从而降低第一中继器的负担,提高数据传输效率。That is to say, when the data traffic is less than or equal to the preset traffic threshold, it indicates that the first repeater may be faulty, that is, prevent the problem from occurring, and improve the anti-fault capability of the Internet of Things repeater. The IoT terminal connected to the first repeater is allocated to the backup repeater in advance, thereby prolonging the waiting time of receiving data, thereby reducing the burden of the first repeater and improving data transmission efficiency.
举例来说,假设预设流量阈值为60%,当第一中继器的数据流量为50%时,则确定第一中继器故障,然后获得备份中继器的优先级,根据优先级高低进行数据备份。For example, if the preset traffic threshold is 60%, when the data traffic of the first repeater is 50%, the first repeater fault is determined, and then the priority of the backup repeater is obtained, according to the priority level. Make a backup of the data.
进一步的,备份的顺序按照优先级的高低进行,从而不影响网络带宽,减少网络运行负荷。假定按照备份中继器的标识由小至大的顺序优先级由高至低,若备份中继器的标识为1~n时,即标识为1的备份中继器优先级最高,标识为n的备份中继器优先级最低。若预设负载阈值为10M,则当缓存数据的容量大小为10M时进行第二中继器的备份,当第二中继器备份完成,第三中继器备份,依次类推。由于传输数据的容量大小不可控,所以只要缓存数据的容量大小达到预设负载阈值时第二中继器就开始备份。Further, the order of the backups is performed according to the priority level, so that the network bandwidth is not affected, and the network operation load is reduced. It is assumed that the priority of the backup repeater is from the highest to the lowest in the order of the backup repeater. If the identifier of the backup repeater is 1 to n, the backup repeater with the identifier 1 is the highest priority, and the identifier is n. The backup repeater has the lowest priority. If the preset load threshold is 10M, the backup of the second repeater is performed when the capacity of the cached data is 10M, when the backup of the second repeater is completed, the third repeater is backed up, and so on. Since the capacity of the transmitted data is uncontrollable, the second repeater starts backing up as long as the capacity of the cached data reaches a preset load threshold.
步骤S103:对备份中继器的优先级进行排序,在第三中继器的优先级低于第二中继器的优先级时,将第三中继器作为第二中继器的备份中继器。Step S103: Sort the priorities of the backup repeaters, and when the priority of the third repeater is lower than the priority of the second repeater, use the third repeater as the backup of the second repeater. Relay.
在获取了备份中继器的优先级之后,按照优先级的高低对备份中继器进行排序,第二中继器的优先级高于第三中继器,则第二中继器接替第一中继器的工作,而第三中继器作为第二中继器的备份中继器。After obtaining the priority of the backup repeater, the backup repeaters are sorted according to the priority level, and the second repeater has a higher priority than the third repeater, and the second repeater takes over the first The repeater works while the third repeater acts as a backup repeater for the second repeater.
步骤S104:将与第一中继器连接的物联网终端分为第一终端集合和第二终端集合。Step S104: Divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set.
可选的,获取与第一中继器连接的物联网终端的数据类型;根据数据类型 确定第一终端集合和第二终端集合中包含的物联网终端。也就是说,根据数据类型将第一中继器上连接的物联网终端进行分类,可提高了物联网备份中继器系统的并行处理性能和备份性能。Optionally, obtaining a data type of the Internet of Things terminal connected to the first repeater; according to the data type The first terminal set and the Internet of Things terminal included in the second terminal set are determined. That is to say, classifying the Internet of Things terminals connected to the first repeater according to the data type can improve the parallel processing performance and backup performance of the Internet of Things backup repeater system.
步骤S105:将第一终端集合中的物联网终端切换至第二中继器,将第二终端集合中的物联网终端切换至第三中继器。Step S105: Switching the Internet of Things terminal in the first terminal set to the second repeater, and switching the Internet of Things terminal in the second terminal set to the third repeater.
采用多备份的方式,第一备份中继器对第一中继器进行备份,使得第一中继器发生故障时,第一中继器上的第一缓存数据不丢失,且选中优先级最高的第二中继器连接第一中继器上的第一终端集合的物联网终端,将第三中继器作为第二中继器的备份中继器连接第一中继器上的第二终端集合的物联网终端,缓存第二中继器上的缓存数据,切换第一中继器的同时对第二中继器进行备份,从而提高了物联网备份中继器系统的并行处理性能和备份性能。The first backup repeater backs up the first repeater in a manner of multiple backups, so that when the first repeater fails, the first cached data on the first repeater is not lost, and the selected priority is the highest. The second repeater is connected to the IoT terminal of the first terminal set on the first repeater, and the third repeater is connected as the backup repeater of the second repeater to the second relay on the first repeater. The IoT terminal of the terminal gathers the cached data on the second repeater, and switches the first repeater while backing up the second repeater, thereby improving the parallel processing performance of the IoT backup repeater system and Backup performance.
步骤S106:将第二中继器的缓存数据发送至第三中继器。Step S106: Send the buffer data of the second repeater to the third repeater.
优选的,第三中继器备份第二中继器上的第二缓存数据时,由于第一中继器上的第一备份数据在第一中继器故障之前已经备份完成,可只对第二中继器上的所缓存的第二缓存数据进行备份,避免重复备份,节省备份时间。具体的:第一备份中继器还用于将备份完成的第一中继器的第一缓存数据的备份状态设置为已备份;第三中继器还用于获取第二中继器的备份数据的备份状态,将备份状态为待备份的备份数据备份至第三中继器。Preferably, when the third relay backs up the second cached data on the second repeater, since the first backup data on the first repeater has been backed up before the first repeater fails, only the first The cached second cached data on the second repeater is backed up to avoid duplicate backups and save backup time. Specifically, the first backup repeater is further configured to set a backup state of the first cached data of the first repeater that is backed up to be backed up; and the third repeater is further configured to obtain a backup of the second repeater. The backup status of the data is backed up to the third repeater with the backup data to be backed up.
可选的,开启第二中继器和第三中继器的射频功能;获取与第一中继器连接的物联网终端的设备标识;Optionally, the radio frequency function of the second repeater and the third repeater is enabled; and the device identifier of the Internet of Things terminal connected to the first repeater is obtained;
根据设备标识生成设备认证编码;将第一终端集合中的物联网终端生成的设备认证编码发送至第二中继器,将第二终端集合中的物联网终端生成的设备认证编码发送至第三中继器;第二中继器和第三中继器在接收到物联网终端的连接请求时,判断发起连接请求的物联网终端的设备标识是否与设备认证编码匹配;若匹配成功,与该物联网终端进行连接。Generating a device authentication code according to the device identifier; transmitting the device authentication code generated by the IoT terminal in the first terminal set to the second repeater, and transmitting the device authentication code generated by the IoT terminal in the second terminal set to the third a repeater; the second repeater and the third repeater determine, when receiving the connection request of the Internet of Things terminal, whether the device identifier of the IoT terminal that initiates the connection request matches the device authentication code; if the matching is successful, The Internet of Things terminal connects.
在可选实施例中,为了提高备份数据的安全性,物联网终端在连接中继器的时候应该验证物联网终端的设备标识,当物联网终端的设备标识匹配成功时,则接收发起连接请求的物联网终端进行连接,否则若匹配失败,则关闭备份中继器的射频功能。 In an optional embodiment, in order to improve the security of the backup data, the IoT terminal should verify the device identifier of the IoT terminal when connecting the relay device, and receive the connection request when the device identifier of the IoT terminal matches successfully. The IoT terminal connects, otherwise if the match fails, the RF function of the backup repeater is turned off.
物联网终端是物联网中连接传感网络层和传输网络层,实现采集数据及向网络层发送数据的设备,不同的设备标识用于区别标识不同的设备。例如,物联网终端的设备标识可以是物联网终端的MAC地址,MAC地址又称为物理地址或硬件地址,用来定义网络设备的位置,也可以接入网络时间的日期加上终端类型或者是计算机程序对物联网终端默认的命名,也可以是终端类型加数字的组合,还可以是用户对物联网终端另存为的名称。将第一中继器上的物联网终端切换至第二中继器,也就是说第二中继器只连接验证成功的第一中继器上的物联网终端。The IoT terminal is a device that connects the sensing network layer and the transmission network layer in the Internet of Things to collect data and send data to the network layer. Different device identifiers are used to distinguish different devices. For example, the device identifier of the Internet of Things terminal may be the MAC address of the Internet of Things terminal, and the MAC address is also referred to as a physical address or a hardware address, and is used to define the location of the network device, and may also access the date of the network time plus the terminal type or The default naming of the Internet of Things terminal by the computer program may also be a combination of the terminal type and the number, or may be the name saved by the user to the Internet of Things terminal. The IoT terminal on the first repeater is switched to the second repeater, that is to say, the second repeater only connects the IoT terminal on the first repeater that is successfully verified.
在一个实施例中,在第一中继器故障后,获取与第一中继器连接的物联网终端的设备标识,这里的设备标识是指内置于物联网终端设备芯片中的用于区别于其他设备的识别信息,在设备出厂之后就不能更改,包括生产厂家序列号、设备的型号、设备的MAC地址等信息。根据设备标识信息生成设备认证编码,即将这些信息转化成字符编码的形式,例如“序列号-型号-MAC地址”这样的特定格式,便于其他设备进行读取。之后,将生成的与第一终端集合连接的物联网终端的设备认证编码发送至第二中继器,将生成的与第二终端集合连接的物联网终端的设备认证编码发送至第三中继器。在第二中继器和第三中继器接收到物联网终端的连接请求时,获取物联网终端的设备标识,从中读取出设备信息并与之前保存的设备认证编码进行匹配,在物联网终端的设备标识与保存的设备认证编码匹配成功时,可以接收物联网终端进行连接。通过保存设备认证编码,在判断匹配成功后直接进行连接,可以避免在物联网终端向第二中继器和第三中继器发起连接请求时,重新对设备进行会话信息认证及密钥配对等过程,从而提高物联网的通信效率。In an embodiment, after the first repeater fails, the device identifier of the Internet of Things terminal connected to the first repeater is obtained, where the device identifier is defined in the IoT terminal device chip for distinguishing The identification information of other devices cannot be changed after the device leaves the factory, including the serial number of the manufacturer, the model number of the device, and the MAC address of the device. The device authentication code is generated according to the device identification information, that is, the information is converted into a character coded form, such as a specific format such as "serial number-model-MAC address", which is convenient for other devices to read. After that, the generated device authentication code of the Internet of Things terminal connected to the first terminal set is sent to the second relay, and the generated device authentication code of the Internet of Things terminal connected to the second terminal set is sent to the third relay. Device. When the second repeater and the third repeater receive the connection request of the Internet of Things terminal, acquire the device identifier of the Internet of Things terminal, read the device information from the device, and match the previously saved device authentication code in the Internet of Things. When the device identifier of the terminal matches the saved device authentication code, the IoT terminal can be connected. By saving the device authentication code and directly connecting after determining that the matching is successful, it is possible to avoid re-sending the session information and key pairing of the device when the IoT terminal initiates a connection request to the second repeater and the third repeater. Process to improve the communication efficiency of the Internet of Things.
需要说明的是,这里的物联网终端的设备标识与保存的设备认证编码匹配成功包含的情况可以有多种,例如,序列号、型号和MAC地址都完全相同;或者仅识别序列号相同时,即判定设备标识与保存的设备认证编码匹配成功;或者仅字符串中超过一定百分比的字符相匹配即认为匹配成功。通过这样的方式可以减少数据处理的工作量,提高效率。It should be noted that the device identifier of the Internet of Things terminal and the saved device authentication code may be successfully combined, for example, the serial number, the model number, and the MAC address are all the same; or when only the serial numbers are the same, That is, it is determined that the device identifier matches the saved device authentication code successfully; or if only a certain percentage of the characters in the string match, the matching is considered successful. In this way, the workload of data processing can be reduced and efficiency can be improved.
在本实施例中,在第一中继器故障后,向物联网终端广播第二中继器和第三中继器的MAC地址,MAC地址又称为物理地址或硬件地址,用来定义网 络设备的位置,每个中继器都有一个单独的MAC地址,物联网终端可以在接收到第二中继器的MAC地址后,向第二中继器发起连接请求。In this embodiment, after the first repeater fails, the MAC addresses of the second repeater and the third repeater are broadcast to the Internet of Things terminal, and the MAC address is also referred to as a physical address or a hardware address, and is used to define the network. The location of the network device, each repeater has a separate MAC address, and the IoT terminal can initiate a connection request to the second repeater after receiving the MAC address of the second repeater.
需要说明的是,备份中继器可在备份的时候关闭射频功能仅充当存储设备的角色,而在与第一中继器的物联网终端建立连接的时候,才开启射频功能,其余备份中继器仍关闭射频功能,减少系统内存的占用,节约用电量,增强续航时间。It should be noted that the backup repeater can disable the radio function when backing up and only acts as a storage device. When the connection is established with the IoT terminal of the first repeater, the radio function is enabled, and the remaining backup relays are enabled. The device still turns off the RF function, which reduces the memory usage of the system, saves power consumption, and enhances battery life.
下面结合一个具体的应用场景来陈述本发明的执行过程。在该应用场景中,物联网中的一个节点处有3个中继器,分别为中继器J、中继器K和中继器L,其中中继器J为第一中继器,在网络中进行通信,其他两个中继器都作为中继器J的备份中继器使用,只开启了存储功能。The implementation process of the present invention is set forth below in conjunction with a specific application scenario. In this application scenario, there are three repeaters at one node in the Internet of Things, namely, a repeater J, a repeater K, and a repeater L, wherein the repeater J is the first repeater, Communication takes place in the network, and the other two repeaters are used as backup repeaters for repeater J, and only the storage function is enabled.
在某一次的通讯过程中,中继器J发生故障,根据中继器K和中继器L的优先级计算结果得到中继器K的优先级高于中继器L,将中继器K设置为第二中继器,将中继器L设置为中继器K的备份中继器。In a certain communication process, the repeater J fails. According to the priority calculation result of the repeater K and the repeater L, the priority of the repeater K is higher than that of the repeater L, and the repeater K is Set to the second repeater, set the repeater L to the backup repeater of repeater K.
在中继器J发生故障之前,中继器J上连接有物联网终端1、物联网终端2和物联网终端3,此时,开启中继器K和中继器L的射频功能。中继器K获取物联网终端1和物联网终端2的设备认证编码分别为“001-A1070-00010010”和“011-BC79-00101100”,并进行保存。中继器L获取物联网终端3的设备认证编码分别为“001-D1070-00010110”进行保存。之后,中继器K向物联网终端1和物联网终端2广播中继器K的MAC地址“00-01-6C-06-A6-29”,中继器L向物联网终端3广播中继器L的MAC地址“00-01-6C-06-A6-30”。Before the relay J fails, the I/O terminal 1, the Internet of Things terminal 2, and the Internet of Things terminal 3 are connected to the repeater J. At this time, the radio frequency function of the repeater K and the repeater L is turned on. The device K obtains the device authentication codes of the Internet of Things terminal 1 and the Internet of Things terminal 2 as "001-A1070-00010010" and "011-BC79-00101100", respectively, and saves them. The device L of the relay device L for obtaining the device authentication code of the Internet of Things terminal 3 is "001-D1070-00010110". Thereafter, the repeater K broadcasts the MAC address "00-01-6C-06-A6-29" of the repeater K to the Internet of Things terminal 1 and the Internet of Things terminal 2, and the repeater L broadcasts the relay to the Internet of Things terminal 3. The MAC address of the L is "00-01-6C-06-A6-30".
物联网终端1和物联网终端2在接收到中继器K的MAC地址后根据该MAC地址向中继器K发起连接请求,物联网终端3在接收到中继器L的MAC地址后根据该MAC地址向中继器L发起连接请求。After receiving the MAC address of the repeater K, the Internet of Things terminal 1 and the Internet of Things terminal 2 initiate a connection request to the repeater K according to the MAC address, and the IoT terminal 3 receives the MAC address of the repeater L according to the The MAC address initiates a connection request to the repeater L.
中继器K根据物联网终端1和物联网终端2的连接请求,获取物联网终端1和物联网终端2的设备标识信息分别为“001-A1070-00010010”和“011-BC79-00101100”,与之前保存的设备认证编码相同,判定匹配成功,接收物联网终端1和物联网终端2的连接。而中继器L根据物联网终端3的连接请求,获取物联网终端3的设备标识信息分别为“001-A1070-00011010”和“001-D1070-00010110”,与之前保存的设备认证编码不匹配,则中继器L与 物联网终端3不进行连接。在中继器K的工作过程中,同时将缓存数据热备份至中继器L中,保证物联网通信的可靠性。The device K obtains the device identification information of the Internet of Things terminal 1 and the Internet of Things terminal 2 as "001-A1070-00010010" and "011-BC79-00101100" according to the connection request of the Internet of Things terminal 1 and the Internet of Things terminal 2, respectively. Same as the previously saved device authentication code, it is determined that the matching is successful, and the connection of the Internet of Things terminal 1 and the Internet of Things terminal 2 is received. The device identification information of the IoT terminal 3 is “001-A1070-00011010” and “001-D1070-00010110” according to the connection request of the IoT terminal 3, which does not match the previously saved device authentication code. , repeater L and The Internet of Things terminal 3 is not connected. During the operation of the repeater K, the cached data is simultaneously hot-backed to the repeater L to ensure the reliability of the Internet of Things communication.
可选的,将第一中继器连接的物联网终端的数据类型为上行数据和下行数据对应的物联网终端分配至第一终端集合,将数据类型为上行数据或下行数据对应的物联网终端分配至第二终端集合;在将第二中继器的缓存数据发送至第三中继器之后,方法还包括:根据物联网终端的设备认证编码和数据类型生成数据报告;关闭射频功能。Optionally, the data type of the Internet of Things terminal connected to the first repeater is the uplink data and the IoT terminal corresponding to the downlink data are allocated to the first terminal set, and the data type is the uplink data or the Internet of Things terminal corresponding to the downlink data. Assigning to the second terminal set; after transmitting the cached data of the second repeater to the third repeater, the method further comprises: generating a data report according to the device authentication code and the data type of the Internet of Things terminal; and turning off the radio frequency function.
在可选实施例中,根据物联网终端的数据类型划分第一终端集合和第二终端集合。将数据类型为上行数据和下行数据对应的物联网终端分配至第一终端集合,将数据类型为上行数据或下行数据对应的物联网终端分配至第二终端集合。从而优先级较高的第二中继器即接收数据,又传输数据,而优先级较低的第三中继器只接收数据或传输数据,提高了数据的传输效率,降低了第三中继器的性能压力。In an alternative embodiment, the first set of terminals and the second set of terminals are divided according to the data type of the Internet of Things terminal. The IoT terminal corresponding to the uplink data and the downlink data is allocated to the first terminal set, and the Internet of Things terminal corresponding to the uplink data or the downlink data is allocated to the second terminal set. Therefore, the second repeater with higher priority receives the data and transmits the data, and the third repeater with lower priority only receives the data or transmits the data, thereby improving the data transmission efficiency and reducing the third relay. Performance pressure.
在可选实施例中,当备份数据完成后,根据物联网终端的设备认证编码和数据类型生成数据报告,并关闭射频功能。可对备份数据进行整理,防止误传和重传,且利于节能,增强续航能力。In an optional embodiment, after the backup data is completed, a data report is generated according to the device authentication code and the data type of the Internet of Things terminal, and the radio frequency function is turned off. Backup data can be sorted to prevent mis-transmission and re-transmission, and it is conducive to energy saving and enhanced endurance.
本发明实施例第二方面提出了一种物联网中继器拆分式备份系统。该系统基于中继器子系统,中继器子系统至少包括第一中继器、第二中继器和第三中继器,第一中继器的备份节点至少包括第二中继器和第三中继器。如图4所示,上述物联网中继器拆分式备份系统包括:A second aspect of the embodiments of the present invention provides an IoT repeater split backup system. The system is based on a repeater subsystem comprising at least a first repeater, a second repeater and a third repeater, the backup node of the first repeater comprising at least a second repeater and Third repeater. As shown in FIG. 4, the above-mentioned IoT repeater split backup system includes:
第一备份模块101,用于获取第一中继器的备份中继器,将第一中继器的缓存数据备份至备份中继器。The first backup module 101 is configured to acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater.
优先级获取模块102,用于在检测到第一中继器发生故障时,根据备份中继器的性能参数获取备份中继器的优先级。The priority obtaining module 102 is configured to obtain a priority of the backup repeater according to the performance parameter of the backup repeater when detecting that the first repeater fails.
备份中继器确定模块103,用于对备份中继器的优先级进行排序,在第三中继器的优先级低于第二中继器的优先级时,将第三中继器作为第二中继器的备份中继器。The backup repeater determining module 103 is configured to sort the priorities of the backup repeaters, and when the priority of the third repeater is lower than the priority of the second repeater, the third repeater is used as the first Backup repeater for two repeaters.
终端划分模块104,用于将与第一中继器连接的物联网终端分为第一终端集合和第二终端集合。 The terminal dividing module 104 is configured to divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set.
终端切换模块105,用于将第一终端集合中的物联网终端切换至第二中继器,将第二终端集合中的物联网终端切换至第三中继器。The terminal switching module 105 is configured to switch the Internet of Things terminal in the first terminal set to the second repeater, and switch the Internet of Things terminal in the second terminal set to the third repeater.
第二备份模块106,用于将第二中继器的缓存数据发送至第三中继器。The second backup module 106 is configured to send the cached data of the second repeater to the third repeater.
在其中一个实施例中,系统还包括:In one embodiment, the system further includes:
优先级获取模块107,用于当第一中继器的缓存数据的容量大小到达预设容量阈值时或定时器记录的时间到达预设备份间隔时间时,根据第一中继器的备份中继器的性能参数计算备份中继器的优先级;The priority obtaining module 107 is configured to: when the capacity of the cached data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, the backup relay according to the first repeater The performance parameters of the device calculate the priority of the backup repeater;
第一备份模块101具体用于根据备份中继器的优先级对第一中继器的缓存数据进行备份。The first backup module 101 is specifically configured to back up the cached data of the first repeater according to the priority of the backup repeater.
在其中一个实施例中,系统还包括:In one embodiment, the system further includes:
第一获取模块108,用于获取与第一中继器连接的物联网终端的数据类型;The first obtaining module 108 is configured to acquire a data type of the Internet of Things terminal connected to the first repeater;
终端划分模块104具体用于根据数据类型确定第一终端集合和第二终端集合中包含的物联网终端。The terminal dividing module 104 is specifically configured to determine, according to the data type, the first terminal set and the Internet of Things terminal included in the second terminal set.
在其中一个实施例中,系统还包括:In one embodiment, the system further includes:
第二获取模块109,用于获取与第一中继器连接的物联网终端的设备标识;The second obtaining module 109 is configured to acquire a device identifier of the Internet of Things terminal connected to the first repeater;
生成模块110,用于根据设备标识生成设备认证编码;The generating module 110 is configured to generate a device authentication code according to the device identifier.
发送模块111,用于将第一终端集合中的物联网终端生成的设备认证编码发送至第二中继器,将第二终端集合中的物联网终端生成的设备认证编码发送至第三中继器;The sending module 111 is configured to send the device authentication code generated by the Internet of Things terminal in the first terminal set to the second relay, and send the device authentication code generated by the Internet of Things terminal in the second terminal set to the third relay. Device
判断模块112,用于第二中继器和第三中继器在接收到物联网终端的连接请求时,判断发起连接请求的物联网终端的设备标识是否与设备认证编码匹配;The determining module 112 is configured to: when the second repeater and the third repeater receive the connection request of the Internet of Things terminal, determine whether the device identifier of the IoT terminal that initiates the connection request matches the device authentication code;
终端切换模块105具体用于若判断模块匹配成功时,与该物联网终端进行连接。The terminal switching module 105 is specifically configured to connect to the Internet of Things terminal if the module is successfully matched.
在其中一个实施例中,终端划分模块104具体用于将第一中继器连接的物联网终端的数据类型为上行数据和下行数据对应的物联网终端分配至第一终端集合,将数据类型为上行数据或下行数据对应的物联网终端分配至第二终端集合;系统还包括:In one embodiment, the terminal division module 104 is specifically configured to allocate the data type of the Internet of Things terminal connected by the first relay to the uplink terminal and the Internet of Things terminal corresponding to the downlink data to the first terminal set, and set the data type to The IoT terminal corresponding to the uplink data or the downlink data is allocated to the second terminal set; the system further includes:
数据报告生成模块113,用于根据物联网终端的设备认证编码和数据类型生成数据报告。 The data report generating module 113 is configured to generate a data report according to the device authentication code and the data type of the Internet of Things terminal.
参见图5,图5是本发明实施例提供的另一种终端的结构示意图。如图5所示,本实施例中的终端可以包括:一个或多个处理器801;一个或多个输入设备802,一个或多个输出设备803和存储器804。上述处理器801、输入设备802、输出设备803和存储器804通过总线805连接。存储器802用于存储指令,处理器801用于执行存储器802存储的指令。其中,处理器801用于:获取第一中继器的备份中继器,将第一中继器的缓存数据备份至备份中继器;在检测到第一中继器发生故障时,根据备份中继器的性能参数获取备份中继器的优先级;对备份中继器的优先级进行排序,在第三中继器的优先级低于第二中继器的优先级时,将第三中继器作为第二中继器的备份中继器;将与第一中继器连接的物联网终端切换至第二中继器,将第二中继器的缓存数据发送至第三中继器。Referring to FIG. 5, FIG. 5 is a schematic structural diagram of another terminal according to an embodiment of the present invention. As shown in FIG. 5, the terminal in this embodiment may include: one or more processors 801; one or more input devices 802, one or more output devices 803, and a memory 804. The above processor 801, input device 802, output device 803, and memory 804 are connected by a bus 805. The memory 802 is for storing instructions, and the processor 801 is for executing instructions stored by the memory 802. The processor 801 is configured to: acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater; when detecting that the first repeater fails, according to the backup The performance parameter of the repeater obtains the priority of the backup repeater; the priority of the backup repeater is sorted, and when the priority of the third repeater is lower than the priority of the second repeater, the third The repeater acts as a backup repeater of the second repeater; switches the IoT terminal connected to the first repeater to the second repeater, and transmits the cached data of the second repeater to the third relay Device.
应当理解,在本发明实施例中,所称处理器801可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present invention, the processor 801 may be a central processing unit (CPU), and the processor may also be another general-purpose processor, a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
输入设备802可以包括触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出设备803可以包括显示器(LCD等)、扬声器等。The input device 802 may include a touchpad, a fingerprint sensor (for collecting fingerprint information of the user and direction information of the fingerprint), a microphone, and the like, and the output device 803 may include a display (LCD or the like), a speaker, and the like.
该存储器804可以包括只读存储器和随机存取存储器,并向处理器801提供指令和数据。存储器804的一部分还可以包括非易失性随机存取存储器。例如,存储器804还可以存储设备类型的信息。The memory 804 can include read only memory and random access memory and provides instructions and data to the processor 801. A portion of the memory 804 may also include a non-volatile random access memory. For example, the memory 804 can also store information of the device type.
具体实现中,本发明实施例中所描述的处理器801、输入设备802、输出设备803可执行本发明实施例提供的第一方面中所描述的实现方式,也可执行本发明实施例所描述的终端的实现方式,在此不再赘述。In a specific implementation, the processor 801, the input device 802, and the output device 803, which are described in the embodiments of the present invention, may be implemented in the first aspect provided by the embodiment of the present invention, and may also be described in the embodiment of the present invention. The implementation of the terminal is not described here.
在本发明的另一实施例中提供的另一种终端,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如本发明实施例提供的 第一方面中所描述的实现方法的指令。Another terminal provided in another embodiment of the present invention includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are Configuration is performed by the processor, the program comprising for performing an embodiment of the present invention The instructions for implementing the method described in the first aspect.
在本发明的另一实施例中提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,其中,所述计算机程序使得计算机执行如本发明实施例提供的第一方面中所描述的部分或全部步骤。In another embodiment of the present invention, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, wherein the computer program causes a computer to perform the first aspect as provided by an embodiment of the present invention Some or all of the steps described.
在本发明的另一实施例中提供一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本发明实施例提供的第一方面中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In another embodiment of the present invention, a computer program product is provided, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Some or all of the steps described in the first aspect provided by the embodiments of the invention. The computer program product can be a software installation package.
可以理解,采用了上述物联网中继器拆分式备份方法及系统之后,第一中继器的备份中继器对第一中继器上的缓存数据进行备份,当第一中继器出现故障时,按照备份中继器的性能参数得到备份中继器的优先级,由于第二中继器的优先级高于第三中继器,因此将第三中继器为第二中继器的备份中继器,缓存第二中继器上的缓存数据。将第一中继器连接的物联网终端分为第一终端集合和第二终端集合,将第一终端集合中的物联网终端切换至第二中继器,将第二终端集合中的物联网终端切换至第三中继器。从而使得发生故障的第一中继器中的数据和与之连接的物联网终端得以迁移到其他正常工作的中继器上,避免中继器故障导致物联网瘫痪,提高物联网的抗故障能力,确保持续提供网络服务,完成了数据的顺利传输。It can be understood that after the above-mentioned IoT repeater split backup method and system are adopted, the backup repeater of the first repeater backs up the cached data on the first repeater, when the first repeater appears In the event of a failure, the priority of the backup repeater is obtained according to the performance parameters of the backup repeater. Since the priority of the second repeater is higher than that of the third repeater, the third repeater is the second repeater. Backup repeater that caches cached data on the second repeater. The IoT terminal connected to the first repeater is divided into a first terminal set and a second terminal set, and the IoT terminal in the first terminal set is switched to the second repeater, and the Internet of Things in the second terminal set is The terminal switches to the third repeater. Therefore, the data in the failed first repeater and the connected Internet of Things terminals can be migrated to other normally working repeaters, avoiding the failure of the repeater and causing the Internet of Things to improve the anti-fault capability of the Internet of Things. To ensure continuous delivery of network services and complete the smooth transfer of data.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的终端和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the terminal and the unit described above can be referred to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的终端和方法,可 以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided by the present application, it should be understood that the disclosed terminal and method may be In other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present invention. The foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
以上对本发明实施例提供的物联网中继器的备份方法及系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The method and system for backing up the Internet of Things repeater provided by the embodiment of the present invention are described in detail. The principles and embodiments of the present invention are described in the following. The description of the above embodiment is only used to help understanding. The method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and the scope of application. It is understood to be a limitation of the invention.

Claims (10)

  1. 一种物联网中继器拆分式备份的方法,其特征在于,所述方法基于中继器子系统,所述中继器子系统至少包括第一中继器、第二中继器和第三中继器,所述第一中继器的备份中继器至少包括所述第二中继器和所述第三中继器,所述方法包括:A method for split backup of an Internet of Things repeater, characterized in that the method is based on a repeater subsystem, the repeater subsystem comprising at least a first repeater, a second repeater and a a third repeater, the backup repeater of the first repeater includes at least the second repeater and the third repeater, and the method includes:
    获取第一中继器的备份中继器,将所述第一中继器的缓存数据备份至所述备份中继器;Obtaining a backup repeater of the first repeater, and backing up the cached data of the first repeater to the backup repeater;
    在检测到所述第一中继器发生故障时,根据所述备份中继器的性能参数获取所述备份中继器的优先级;When detecting that the first repeater is faulty, acquiring a priority of the backup repeater according to performance parameters of the backup repeater;
    对所述备份中继器的优先级进行排序,在所述第三中继器的优先级低于所述第二中继器的优先级时,将所述第三中继器作为所述第二中继器的备份中继器;Sorting priorities of the backup repeaters, and when the priority of the third repeater is lower than the priority of the second repeater, the third repeater is used as the first Backup repeater for two repeaters;
    将与所述第一中继器连接的物联网终端分为第一终端集合和第二终端集合;The Internet of Things terminal connected to the first repeater is divided into a first terminal set and a second terminal set;
    将所述第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器;Switching the Internet of Things terminal in the first terminal set to the second repeater, and switching the Internet of Things terminal in the second terminal set to the third repeater;
    将所述第二中继器的缓存数据发送至所述第三中继器。The cached data of the second repeater is sent to the third repeater.
  2. 根据权利要求1所述的方法,其特征在于,在所述在检测到所述第一中继器发生故障之前,所述方法还包括:The method according to claim 1, wherein before the detecting that the first repeater fails, the method further comprises:
    当所述第一中继器的缓存数据的容量大小到达预设容量阈值时或定时器记录的时间到达预设备份间隔时间时,根据所述第一中继器的备份中继器的性能参数计算所述备份中继器的优先级;When the size of the buffered data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, according to performance parameters of the backup repeater of the first repeater Calculating a priority of the backup repeater;
    根据所述备份中继器的优先级对所述第一中继器的缓存数据进行备份。The cached data of the first repeater is backed up according to the priority of the backup repeater.
  3. 根据权利要求1或2所述的方法,其特征在于,所述将与所述第一中继器连接的物联网终端分为第一终端集合和第二终端集合,包括:The method according to claim 1 or 2, wherein the dividing the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set comprises:
    获取所述与所述第一中继器连接的物联网终端的数据类型; Obtaining a data type of the Internet of Things terminal connected to the first repeater;
    根据所述数据类型确定所述第一终端集合和所述第二终端集合中包含的物联网终端。Determining, according to the data type, the first terminal set and the Internet of Things terminal included in the second terminal set.
  4. 根据权利要求3所述的方法,其特征在于,所述将所述第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器,包括:The method according to claim 3, wherein the switching of the Internet of Things terminal in the first terminal set to the second repeater, switching the Internet of Things terminal in the second terminal set To the third repeater, comprising:
    开启所述第二中继器和所述第三中继器的射频功能;Turning on radio frequency functions of the second repeater and the third repeater;
    获取所述与所述第一中继器连接的物联网终端的设备标识;Obtaining the device identifier of the Internet of Things terminal connected to the first repeater;
    根据所述设备标识生成设备认证编码;Generating a device authentication code according to the device identifier;
    将所述第一终端集合中的物联网终端生成的设备认证编码发送至所述第二中继器,将所述第二终端集合中的物联网终端生成的设备认证编码发送至所述第三中继器;Transmitting, to the second repeater, a device authentication code generated by the Internet of Things terminal in the first terminal set, and transmitting a device authentication code generated by the Internet of Things terminal in the second terminal set to the third Repeater
    所述第二中继器和所述第三中继器在接收到所述物联网终端的连接请求时,判断所述发起连接请求的物联网终端的设备标识是否与所述设备认证编码匹配;The second repeater and the third repeater determine, when receiving the connection request of the Internet of Things terminal, whether the device identifier of the Internet of Things terminal that initiates the connection request matches the device authentication code;
    若匹配成功,与该物联网终端进行连接。If the match is successful, connect to the IoT terminal.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述数据类型确定所述第一终端集合和所述第二终端集合中包含的物联网终端,包括:The method according to claim 4, wherein the determining the first terminal set and the Internet of Things terminal included in the second terminal set according to the data type comprises:
    将所述第一中继器连接的物联网终端的数据类型为上行数据和下行数据对应的物联网终端分配至所述第一终端集合,将所述数据类型为上行数据或下行数据对应的物联网终端分配至所述第二终端集合;Assigning, by the first relay device, the data type of the Internet of Things terminal connected to the first relay device to the first terminal set corresponding to the uplink data and the downlink data, and using the data type as the uplink data or the downlink data corresponding to the data type a networked terminal is allocated to the second terminal set;
    在所述将所述第二中继器的缓存数据发送至所述第三中继器之后,所述方法还包括:After the sending the cached data of the second repeater to the third repeater, the method further includes:
    根据所述物联网终端的设备认证编码和所述数据类型生成数据报告。Generating a data report according to the device authentication code of the Internet of Things terminal and the data type.
  6. 一种物联网中继器拆分式备份的系统,其特征在于,所述系统基于中继器子系统,所述中继器子系统至少包括第一中继器、第二中继器和第三中继器,所述第一中继器的备份中继器至少包括所述第二中继器和所述第三中继器, 所述系统包括:A system for split backup of an Internet of Things repeater, characterized in that the system is based on a repeater subsystem, the repeater subsystem comprising at least a first repeater, a second repeater and a a third repeater, the backup repeater of the first repeater includes at least the second repeater and the third repeater, The system includes:
    第一备份模块,用于获取第一中继器的备份中继器,将所述第一中继器的缓存数据备份至所述备份中继器;a first backup module, configured to acquire a backup repeater of the first repeater, and back up the cached data of the first repeater to the backup repeater;
    优先级获取模块,用于在检测到所述第一中继器发生故障时,根据所述备份中继器的性能参数获取所述备份中继器的优先级;a priority obtaining module, configured to acquire a priority of the backup repeater according to a performance parameter of the backup repeater when detecting that the first repeater fails;
    中继器设置模块,用于对所述备份中继器的优先级进行排序,在所述第三中继器的优先级低于所述第二中继器的优先级时,将所述第三中继器作为所述第二中继器的备份中继器;a repeater setting module, configured to sort priorities of the backup repeaters, when the priority of the third repeater is lower than a priority of the second repeater, a triple repeater as a backup repeater of the second repeater;
    终端划分模块,用于将与所述第一中继器连接的物联网终端分为第一终端集合和第二终端集合;a terminal dividing module, configured to divide the Internet of Things terminal connected to the first repeater into a first terminal set and a second terminal set;
    终端切换模块,用于将所述第一终端集合中的物联网终端切换至所述第二中继器,将所述第二终端集合中的物联网终端切换至所述第三中继器;a terminal switching module, configured to switch the Internet of Things terminal in the first terminal set to the second repeater, and switch the Internet of Things terminal in the second terminal set to the third repeater;
    第二备份模块,用于将所述第二中继器的缓存数据发送至所述第三中继器。And a second backup module, configured to send the cached data of the second repeater to the third repeater.
  7. 根据权利要求6所述的系统,其特征在于,所述系统还包括:The system of claim 6 wherein the system further comprises:
    优先级获取模块,用于当所述第一中继器的缓存数据的容量大小到达预设容量阈值时或定时器记录的时间到达预设备份间隔时间时,根据所述第一中继器的备份中继器的性能参数计算所述备份中继器的优先级;a priority acquiring module, configured to: when the size of the buffered data of the first repeater reaches a preset capacity threshold or when the time recorded by the timer reaches a preset backup interval, according to the first repeater The performance parameters of the backup repeater calculate the priority of the backup repeater;
    所述第一备份模块具体用于根据所述备份中继器的优先级对所述第一中继器的缓存数据进行备份。The first backup module is specifically configured to back up cached data of the first repeater according to a priority of the backup repeater.
  8. 根据权利要求6或7所述的系统,其特征在于,所述系统还包括:The system of claim 6 or claim 7, wherein the system further comprises:
    第一获取模块,用于获取所述与所述第一中继器连接的物联网终端的数据类型;a first acquiring module, configured to acquire a data type of the Internet of Things terminal connected to the first repeater;
    所述终端划分模块具体用于根据所述数据类型确定所述第一终端集合和所述第二终端集合中包含的物联网终端。The terminal dividing module is specifically configured to determine, according to the data type, the first terminal set and the Internet of Things terminal included in the second terminal set.
  9. 一种计算机可读存储介质,其特征在于,其用于存储计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-5任一项所述的方法。 A computer readable storage medium for storing a computer program, wherein the computer program causes a computer to perform the method of any of claims 1-5.
  10. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如权利要求1-5任一项所述的方法。 A computer program product, comprising: a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to perform any of claims 1-5 The method described.
PCT/CN2017/100564 2017-07-14 2017-09-05 Method and system for split backup of internet of things repeater WO2019010784A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710578815.1A CN107483228B (en) 2017-07-14 2017-07-14 Method and system for split backup of Internet of things repeater
CN201710578815.1 2017-07-14

Publications (1)

Publication Number Publication Date
WO2019010784A1 true WO2019010784A1 (en) 2019-01-17

Family

ID=60596763

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100564 WO2019010784A1 (en) 2017-07-14 2017-09-05 Method and system for split backup of internet of things repeater

Country Status (2)

Country Link
CN (1) CN107483228B (en)
WO (1) WO2019010784A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756380B (en) * 2019-01-14 2022-02-15 山东建筑大学 Self-adaptive access and sharing method and system for Internet of things equipment
CN112543452B (en) * 2020-11-23 2023-06-27 广州技象科技有限公司 Data skip selection method and device based on signal transmission safety management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656624A (en) * 2008-08-18 2010-02-24 中兴通讯股份有限公司 Multi-node application-level disaster recovery system and multi-node application-level disaster recovery method
US20110119458A1 (en) * 2005-01-21 2011-05-19 Natsume Matsuzaki Relay device
CN105046925A (en) * 2015-08-26 2015-11-11 安徽农业大学 Agricultural environment information collection system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110119458A1 (en) * 2005-01-21 2011-05-19 Natsume Matsuzaki Relay device
CN101656624A (en) * 2008-08-18 2010-02-24 中兴通讯股份有限公司 Multi-node application-level disaster recovery system and multi-node application-level disaster recovery method
CN105046925A (en) * 2015-08-26 2015-11-11 安徽农业大学 Agricultural environment information collection system

Also Published As

Publication number Publication date
CN107483228A (en) 2017-12-15
CN107483228B (en) 2020-02-18

Similar Documents

Publication Publication Date Title
WO2019010778A1 (en) Backup method and system for internet of things repeater
CN110572481A (en) intelligent electromechanical equipment data interaction method and system based on LoRa communication
JP7234402B2 (en) Secondary link monitoring method for vehicle communication, vehicle communication terminal, electronic device and computer program
CN109548019B (en) Network distribution method and system
US20170150455A1 (en) Power Adjustment Method and Apparatus
CN109040295B (en) Method and device for determining abnormal disconnection, terminal and storage medium
CN111417140A (en) Wireless dual-channel communication method, system, equipment and computer equipment
CN110688133A (en) Method, system and device for upgrading distributed firmware and electronic equipment
CN103686854A (en) Method and device for controlling AP
CN107483234B (en) Method and device for split backup of access point of Internet of things
CN106792694B (en) Access authentication method and access equipment
CN111064552A (en) Intelligent device control method and device, electronic device and storage medium
WO2019010784A1 (en) Method and system for split backup of internet of things repeater
CN113691935A (en) Network optimization method and device and electronic equipment
CN115150795A (en) Information filtering method, bluetooth antenna and Internet of things data platform
CN107483236B (en) Method and device for backing up access point of Internet of things
CN103124290A (en) Load balancing method based on combined application of reverse isolation devices and isolation gateway
CN112383948A (en) Data transmission method, device, storage medium and electronic equipment
CN110868701A (en) Vehicle-mounted access equipment, control method thereof and rail vehicle
CN106789279B (en) Gateway control method, remote control end control method and device
US10153961B2 (en) Communication device, communication method, and communication system
CN109561487B (en) Method and device for reducing energy consumption of mobile terminal and mobile terminal
CN113965904A (en) Device registration method, device and storage medium
CN113163008A (en) Connection intelligent management method and device of network service system and related equipment thereof
CN100413248C (en) Improved method and system for carrying out charging based on flow

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17917503

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/06/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17917503

Country of ref document: EP

Kind code of ref document: A1