CN107733683B - Data backup method and device based on Internet of things - Google Patents

Data backup method and device based on Internet of things Download PDF

Info

Publication number
CN107733683B
CN107733683B CN201710747419.7A CN201710747419A CN107733683B CN 107733683 B CN107733683 B CN 107733683B CN 201710747419 A CN201710747419 A CN 201710747419A CN 107733683 B CN107733683 B CN 107733683B
Authority
CN
China
Prior art keywords
repeater
data
terminals
cached
relay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710747419.7A
Other languages
Chinese (zh)
Other versions
CN107733683A (en
Inventor
杜光东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shenglu IoT Communication Technology Co Ltd
Original Assignee
Shenzhen Shenglu IoT Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shenglu IoT Communication Technology Co Ltd filed Critical Shenzhen Shenglu IoT Communication Technology Co Ltd
Priority to CN201710747419.7A priority Critical patent/CN107733683B/en
Publication of CN107733683A publication Critical patent/CN107733683A/en
Application granted granted Critical
Publication of CN107733683B publication Critical patent/CN107733683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams

Abstract

The embodiment of the invention discloses a data backup method based on the Internet of things, which comprises the following steps: receiving data to be cached sent by a first repeater; comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater; and when the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater, the data to be cached is subjected to hot backup to the second repeater. The embodiment of the invention also discloses a data backup device based on the Internet of things, and the data and the terminals on the fault repeater are migrated by judging the number of the terminals mounted on other repeaters after the repeater fails, so that the data can be normally transmitted under the condition that the fault repeater cannot work.

Description

Data backup method and device based on Internet of things
Technical Field
The invention relates to the technical field of communication, in particular to a data backup method and device based on the Internet of things.
Background
A repeater is a device that connects network lines and is often used for bi-directional forwarding of physical signals between two network nodes. The repeater mainly completes the function of a physical layer, is responsible for transmitting information on the physical layers of two nodes according to bits, and completes the functions of copying, adjusting and amplifying signals so as to prolong the length of the network. Due to the loss, the power of the signal transmitted on the line will gradually attenuate, and when the attenuation reaches a certain degree, the signal will be distorted, thereby causing a receiving error. Repeaters are designed to solve this problem. It completes the connection of physical line, amplifies the attenuated signal and keeps the same as the original data.
When the repeater breaks down in the operation process, the signal transmitted on the line cannot be normally transmitted, the buffered data in the signal can be influenced, and the terminal mounted on the broken-down repeater cannot continue to normally work, so that data loss and trouble are brought to a user.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method and an apparatus for data backup based on the internet of things, after a relay fails, by determining how many terminals are mounted on other relays, to select to which relay the data cached on the failed relay and the mounted terminals are migrated, so as to ensure that the data is normally transmitted when the failed relay fails to operate.
In a first aspect, an embodiment of the present invention provides a method for data backup based on an internet of things, including:
receiving data to be cached sent by a first repeater;
specifically, the data to be cached is data sent when the first repeater has a fault sign; when the first repeater fails and cannot continue to work, or the first repeater detects the fault sign of the first repeater, the data to be cached is sent to the gateway, so that the situation that the first repeater fails to send the data is prevented.
Comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater;
specifically, after receiving the data to be cached sent by the first repeater, the gateway indicates that the first repeater is about to appear or has appeared with a sign of failure and cannot continue to operate normally, and the gateway selects a second repeater and a third repeater in a network area controlled by the gateway, and compares the number of the mount terminals of the second repeater and the third repeater.
The specific selection mode of the second repeater and the third repeater can be set in advance. Two relays with the least number of mounted terminals can be selected in the network area as the second relay and the third relay respectively, or two relays closest to the first relay in the network position can be selected as the second relay and the third relay.
It should be noted that the second repeater and the third repeater may be selected by the gateway, or may be selected by a repeater near the first repeater controlled by the gateway.
When the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater, the data to be cached is subjected to hot backup to the second repeater;
with reference to the first aspect, in a first possible implementation manner, after the hot backing up the data to be cached to the second relay, the method further includes:
and migrating the terminal mounted on the first repeater to the third repeater for mounting.
With reference to the first aspect, in a second possible implementation manner, after the data to be cached is hot backed up to the second relay, the data to be cached of the first relay backed up in the second relay is not updated any more.
With reference to the first aspect, the first possible implementation manner of the first aspect, and the second possible implementation manner of the first aspect, in a third possible implementation manner, the data to be cached is data sent when the first repeater has a fault sign; each terminal and other terminals form an Internet of things through a repeater and/or a gateway;
before receiving the data to be buffered sent by the first repeater, the method further includes:
receiving a fault prompt message sent by the first repeater;
sending a data request message to the first repeater according to the fault prompt message; the data request message is used for requesting to acquire data to be cached in the first repeater; the data to be cached in the first repeater further comprises an identity, and the identity is used for indicating that the data to be cached in the first repeater comes from the first repeater;
the comparing the number of the mounted terminals of the second repeater with the number of the mounted terminals of the third repeater includes:
selecting a second repeater and a third repeater through a gateway;
acquiring the number of mounting terminals of a second repeater and the number of mounting terminals of a third repeater;
and comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater.
With reference to the first aspect, the first possible implementation manner of the first aspect, and the second possible implementation manner of the first aspect, in a fourth possible implementation manner, the data to be cached is data sent when the first repeater has a fault sign; each terminal and other terminals form an Internet of things through a repeater and/or a gateway;
before receiving the data to be buffered sent by the first repeater, the method further includes:
receiving a fault prompt message sent by the first repeater;
sending a data request message to the first repeater according to the fault prompt message; the data request message is used for requesting to acquire data to be cached in the first repeater; the data currently cached by the first repeater further comprises an identity, and the identity is used for indicating that the currently cached data comes from the first repeater;
the comparing the number of the mounted terminals of the second repeater with the number of the mounted terminals of the third repeater includes:
selecting a second repeater and a third repeater through a gateway;
acquiring the number of mounting terminals of a second repeater and the number of mounting terminals of a third repeater;
comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater;
and when detecting that the number of the terminals mounted on the second repeater is the same as that of the terminals mounted on the third repeater, randomly selecting one of the second repeater and the third repeater to perform hot backup on the data currently cached by the first repeater, and migrating the terminals mounted on the first repeater to the other repeater for mounting.
In a second aspect, an embodiment of the present invention provides an apparatus for data backup based on an internet of things, including:
the data receiving module is used for receiving data to be cached sent by a first repeater, and the data to be cached is sent when the first repeater shows a fault;
specifically, when the first repeater fails and cannot continue to work, or the first repeater detects the fault indication of the first repeater, the data to be buffered is sent to the gateway, so that the situation that the data cannot be sent when the first repeater fails is prevented.
The terminal ratio comparison module is used for comparing the mounting terminal number of the second repeater with the mounting terminal number of the third repeater;
specifically, after receiving the data to be cached sent by the first repeater, the gateway indicates that the first repeater is about to appear or has appeared with a sign of failure and cannot continue to operate normally, and the gateway selects a second repeater and a third repeater in a network area controlled by the gateway, and compares the number of the mount terminals of the second repeater and the third repeater.
The specific selection mode of the second repeater and the third repeater can be set in advance. Two relays with the least number of mounted terminals can be selected in the network area as the second relay and the third relay respectively, or two relays closest to the first relay in the network position can be selected as the second relay and the third relay.
It should be noted that the second repeater and the third repeater may be selected by the gateway, or may be selected by a repeater near the first repeater controlled by the gateway.
The hot backup transfer module is used for hot backup of the data to be cached to the second repeater when the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater;
specifically, when the gateway detects that the number of the mounting terminals of the second relay is greater than that of the mounting terminals of the third relay, the data to be cached sent by the first relay is backed up to the second relay in a hot manner.
After the data currently cached by the first relay is hot backed up to the second relay, the current cached data of the first relay backed up in the second relay is not updated any more, and the data is only stored in the second relay.
With reference to the second aspect, in a first possible implementation manner, the apparatus further includes:
and the mounting transfer module is used for transferring the terminals mounted on the first repeater to the third repeater for mounting when the number of the mounting terminals of the second repeater is greater than that of the mounting terminals of the third repeater.
Specifically, after the gateway performs hot backup on the to-be-cached data sent by the first repeater to the second repeater, all terminals mounted on the first repeater are migrated to the third repeater for mounting at the same time.
Meanwhile, after the original terminal of the first relay is mounted on the third relay, the backup data of the terminal during operation are all backed up on the third relay.
With reference to the second aspect, the first possible implementation manner of the second aspect, and the second possible implementation manner of the second aspect, in a third possible implementation manner, the apparatus further includes:
the first prompt message receiving module is used for receiving a fault prompt message sent by a first repeater before receiving data to be cached sent by the first repeater;
a first data request sending module, configured to send a data request message to the first relay according to the fault notification message received by the first notification message receiving module, where the data request message is used to request to acquire data to be cached in the first relay; the data to be cached in the first repeater further includes an identity, and the identity is used for indicating that the data to be cached in the first repeater is from the first repeater.
The terminal ratio comparing module comprises:
the first selection unit is used for selecting the second repeater and the third repeater through the gateway;
a first number obtaining unit, configured to obtain the number of mounted terminals of the second repeater and the number of mounted terminals of the third repeater;
and the first comparison unit is used for comparing the mounting terminal number of the second repeater with the mounting terminal number of the third repeater.
With reference to the second aspect, the first possible implementation manner of the second aspect, and the second possible implementation manner of the second aspect, in a fourth possible implementation manner, the apparatus further includes: further comprising:
the second prompt message receiving module is used for receiving a fault prompt message sent by the first repeater before receiving the data to be cached sent by the first repeater;
a second data request sending module, configured to send a data request message to the first relay according to the fault notification message received by the second notification message receiving module, where the data request message is used to request to acquire data to be cached in the first relay; the data currently cached by the first repeater further comprises an identity, and the identity is used for indicating that the currently cached data comes from the first repeater;
the terminal ratio comparing module comprises:
the second selection unit is used for selecting a second repeater and a third repeater through the gateway;
a second number obtaining unit configured to obtain the number of mounted terminals of the second repeater and the number of mounted terminals of the third repeater;
a second comparing unit that compares the number of the mounted terminals of the second repeater with the number of the mounted terminals of the third repeater;
and a random selection module, configured to randomly select one of the second repeater and the third repeater to perform hot backup on the data currently cached by the first repeater when the second comparison unit detects that the number of the terminals mounted on the second repeater is the same as the number of the terminals mounted on the third repeater, and migrate the terminal mounted on the first repeater to another repeater for mounting.
By implementing the embodiment of the invention, when the repeater has a fault or fault signs in the operation process, the data to be cached sent by the first repeater is received, wherein the data to be cached is the data sent when the first repeater has the fault signs; comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater; when the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater, the data to be cached is hot backed up to the second repeater, and meanwhile, the terminals mounted on the first repeater are migrated to the third repeater for mounting; and when detecting that the number of the terminals mounted on the second repeater is the same as that of the terminals mounted on the third repeater, randomly selecting one of the second repeater and the third repeater to perform hot backup on the data currently cached by the first repeater, and migrating the terminals mounted on the first repeater to the other repeater for mounting. So that data can continue to be transmitted normally. And the fault-resistant capability of the whole signal transmission device is further enhanced through a double backup method under the fault condition, so that the whole device can continue to normally work when the repeater fails.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic diagram of a network architecture for data backup based on the internet of things provided in the present invention.
FIG. 2 is a schematic flow chart of a method for backing up data based on the Internet of things provided by the invention;
fig. 3 is a schematic flow chart of another embodiment of a method for data backup based on the internet of things provided in the present invention;
FIG. 4 is a schematic diagram of a device module for data backup based on the Internet of things provided by the present invention;
fig. 5 is a schematic block diagram of an apparatus for data backup based on the internet of things according to another embodiment of the present invention;
fig. 6 is a schematic diagram of a unit structure of the terminal ratio comparison module provided by the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that the terms "comprises" and "comprising," and any variations thereof, as used in the embodiments of the present invention, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to those listed but may alternatively include other steps or elements not listed or inherent to such process, method, product, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used to distinguish between different objects and are not used to describe a particular order.
Fig. 1 is a schematic diagram of a network architecture for data backup based on the internet of things provided by the present invention, and in a specific embodiment, the network architecture diagram of the internet of things may be as shown in fig. 1, and includes: network 101, fiber 102, gateway 103, Access Point (AP)104, first level terminal 105, and second level terminal 106, wherein:
the network 101 is connected to the gateway 103 through the optical fiber 102, the access point 104 is connected to the gateway 103, the repeaters in the first-stage terminal 105 are connected to the access point 104, and the terminals of the internet of things located in the first-stage terminal 105 and the second-stage terminal 106 may be directly connected to the access point 104 or connected to the repeaters in the first-stage terminal 105, wherein the repeaters connected to the same access point 104 are backup repeaters.
As can be seen from fig. 1, each of the terminals forms an internet of things with other terminals through a repeater and/or a gateway. Specifically, the internet of things terminal can be each smart home in a family, each smart home in the family is connected together through the internet of things, and a gateway in the family performs mutual coupling and data transmission through intermediate devices such as a repeater. After the repeater fails and cannot work continuously, the gateway performs hot backup on data on the failed repeater to the second repeater, and meanwhile, the intelligent home terminal mounted on the failed repeater is transferred to the third repeater for mounting, so that normal operation of the whole intelligent home Internet of things is guaranteed, and double safety guarantees are provided for safe operation of the whole Internet of things.
Fig. 2 is a schematic flow chart of a method for backing up data based on the internet of things, which includes the following steps:
s201: receiving data to be cached sent by a first repeater;
specifically, when the first repeater fails and cannot continue to work, or the first repeater detects the fault indication of the first repeater, the data to be buffered is sent to the gateway, so that the situation that the data cannot be sent when the first repeater fails is prevented.
S202: comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater;
specifically, after receiving the data to be cached sent by the first repeater, the gateway indicates that the first repeater is about to appear or has appeared with a sign of failure and cannot continue to operate normally, and the gateway selects a second repeater and a third repeater in a network area controlled by the gateway, and compares the number of the mount terminals of the second repeater and the third repeater.
The specific selection mode of the second repeater and the third repeater can be set in advance. Two relays with the least number of mounted terminals can be selected in the network area as the second relay and the third relay respectively, or two relays closest to the first relay in the network position can be selected as the second relay and the third relay.
It should be noted that the second repeater and the third repeater may be selected by the gateway, or may be selected by a repeater near the first repeater controlled by the gateway.
S203: when the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater, the data with the cache is subjected to hot backup to the second repeater;
specifically, after the gateway selects the network locations of the second repeater and the third repeater, the number of terminals respectively mounted on the second repeater and the third repeater is compared, and it is determined that the number of mounted terminals of the second repeater is greater than the number of mounted terminals of the third repeater;
specifically, when the gateway detects that the number of the mounted terminals of the second relay is greater than the number of the mounted terminals of the third relay, the data to be cached sent by the first relay is hot backed up to the second relay, and simultaneously, all the terminals mounted on the first relay are migrated to the third relay for mounting.
After the data currently cached by the first relay is hot backed up to the second relay, the current cached data of the first relay backed up in the second relay is not updated any more, and the data is only stored in the second relay.
Meanwhile, after the original terminal of the first relay is mounted on the third relay, the backup data of the terminal during operation are all backed up on the third relay.
Specifically, when the gateway detects that the number of the mounted terminals of the second relay is smaller than the number of the mounted terminals of the third relay, the data to be cached sent by the first relay is hot backed up to the third relay, and simultaneously, all the terminals mounted on the first relay are migrated to the second relay for mounting.
After the data currently cached by the first relay is hot backed up to the third relay, the current cached data of the first relay backed up in the third relay is not updated any more, and the data is only stored in the third relay.
Meanwhile, after the second repeater mounts the original terminal of the first repeater, the backup data of the terminal in operation are all backed up on the second repeater.
Fig. 3 is a schematic flow chart of another embodiment of the method for data backup based on the internet of things according to the present invention; the method comprises the following steps:
s301: receiving a fault prompt message sent by a first repeater;
specifically, when the first repeater has a fault or a fault sign, the fault notification message is sent to the gateway, where the fault notification message may also be considered as a request to send data to be cached to the gateway, and after the gateway receives the fault notification message sent by the first repeater, the gateway sends a data request message to the first repeater according to the fault notification message, where the data request message is used to request to acquire the data to be cached in the first repeater.
S302: receiving data to be cached sent by a first repeater;
specifically, when the first repeater fails and cannot continue to work, or the first repeater detects a failure sign of the first repeater, the first repeater sends a failure prompt message to the gateway, and after receiving the failure prompt message sent by the first repeater, the gateway sends data to be cached to prevent the first repeater from failing to send the data when the first repeater fails.
S303: comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater;
specifically, after receiving the data to be cached sent by the first repeater, the gateway indicates that the first repeater is about to appear or has appeared with a sign of failure and cannot continue to operate normally, and the gateway selects a second repeater and a third repeater in a network area controlled by the gateway, and compares the number of the mount terminals of the second repeater and the third repeater.
The specific selection mode of the second repeater and the third repeater can be set in advance. Two relays with the least number of mounted terminals can be selected in the network area as the second relay and the third relay respectively, or two relays closest to the first relay in the network position can be selected as the second relay and the third relay.
It should be noted that the second repeater and the third repeater may be selected by the gateway, or may be selected by a repeater near the first repeater controlled by the gateway.
S304: confirming whether the number of the mounted terminals of the second repeater is larger than that of the mounted terminals of the third repeater;
specifically, after the gateway selects the network locations of the second repeater and the third repeater, the number of terminals respectively mounted on the second repeater and the third repeater is compared.
S305: the data to be cached is hot backed up to the second repeater, and meanwhile, the terminal mounted on the first repeater is migrated to the second repeater for mounting;
specifically, when it is determined that the number of the mounted terminals of the second relay is greater than the number of the mounted terminals of the third relay in S304, the data to be cached is hot backed up to the second relay, and the terminals mounted on the first relay are migrated to the second relay for mounting.
It should be noted that the hot backup data and the mount terminal may be migrated by a gateway, or a gateway may control a repeater near the first repeater to migrate.
S306: judging whether the number of the mounting terminals of the second repeater is equal to that of the mounting terminals of the third repeater or not;
specifically, when the determination result of S304 that whether the number of mounted terminals of the second relay is greater than the number of mounted terminals of the third relay is no, it is further determined whether the number of mounted terminals of the second relay is equal to the number of mounted terminals of the third relay.
S307: randomly selecting one of the second repeater or the third repeater to perform hot backup on the data currently cached by the first repeater, and migrating the terminal mounted on the first repeater to the other repeater for mounting;
specifically, when the determination result that S306 determines whether the number of the mounted terminals of the second relay is equal to the number of the mounted terminals of the third relay is yes, that is, the number of the terminals mounted on the second relay and the third relay selected by the gateway is the same, one of the second relay and the third relay is randomly selected to perform hot backup on the data currently cached by the first relay, and the terminal mounted on the first relay is migrated to the other relay to be mounted.
In another embodiment, in the case that the number of terminals mounted on the second relay is equal to the number of terminals mounted on the third relay, the distances between the first relay and each of the second relay and the third relay are checked;
and under the condition that the distance between the second repeater and the first repeater is larger than the distance between the third repeater and the first repeater, carrying out hot backup on the terminal data cached in the first repeater to the second repeater, and carrying out migration and mounting on the terminal mounted by the first repeater to the third repeater.
In another embodiment, in the case that the number of terminals mounted on the second relay is equal to the number of terminals mounted on the third relay, the upload data status information of the second relay and the upload data status information of the third relay are checked; the uploading data state information comprises the size of the uploading data volume or the urgency degree of the uploading data;
and when the size of the uploaded data volume or the uploaded data emergency degree of a second repeater is larger than that of the third repeater, the terminal data cached in the first repeater is hot backed up to the second repeater, and the terminal mounted by the first repeater is migrated and mounted to the third repeater.
It should be noted that the hot backup data and the mount terminal may be migrated by a gateway, or a gateway may control a repeater near the first repeater to migrate.
S308: the data to be cached is hot backed up to the third repeater, and meanwhile, the terminal mounted on the first repeater is migrated to the second repeater for mounting;
specifically, when the determination in S306 is negative, that is, the number of terminals mounted on the second relay is smaller than the number of terminals mounted on the third relay, the data to be cached is hot backed up to the third relay, and meanwhile, the terminal mounted on the first relay is migrated to the second relay for mounting.
It should be noted that the hot backup data and the mount terminal may be migrated by a gateway, or a gateway may control a repeater near the first repeater to migrate.
Fig. 4 is a schematic diagram of an apparatus module for data backup based on the internet of things according to the present invention; the internet-of-things-based data backup apparatus 40 includes: a data receiving module 401, a terminal ratio comparing module 402, a hot backup transfer module 403, and a mount transfer module 404, wherein,
the data receiving module 401 is configured to receive data to be cached sent by a first repeater, where the data to be cached is sent when the first repeater has a fault sign;
specifically, when the first repeater fails and cannot continue to work, or the first repeater detects the fault indication of the first repeater, the data to be buffered is sent to the gateway, so that the situation that the data cannot be sent when the first repeater fails is prevented.
A terminal number comparing module 402, configured to compare the number of the mounted terminals of the second relay with the number of the mounted terminals of the third relay;
specifically, after receiving the data to be cached sent by the first repeater, the gateway indicates that the first repeater is about to appear or has appeared with a sign of failure and cannot continue to operate normally, and the gateway selects a second repeater and a third repeater in a network area controlled by the gateway, and compares the number of the mount terminals of the second repeater and the third repeater.
The specific selection mode of the second repeater and the third repeater can be set in advance. Two relays with the least number of mounted terminals can be selected in the network area as the second relay and the third relay respectively, or two relays closest to the first relay in the network position can be selected as the second relay and the third relay.
It should be noted that the second repeater and the third repeater may be selected by the gateway, or may be selected by a repeater near the first repeater controlled by the gateway.
A hot backup transfer module 403, configured to hot backup the data to be cached to a second relay when the number of mounted terminals of the second relay is greater than the number of mounted terminals of a third relay;
specifically, when the gateway detects that the number of the mounting terminals of the second relay is greater than that of the mounting terminals of the third relay, the data to be cached sent by the first relay is backed up to the second relay in a hot manner.
A mount transfer module 404, configured to migrate a terminal mounted on the first relay to a third relay for mounting when the number of terminals mounted on the second relay is greater than the number of terminals mounted on the third relay,
specifically, after the gateway performs hot backup on the to-be-cached data sent by the first repeater to the second repeater, all terminals mounted on the first repeater are migrated to the third repeater for mounting at the same time.
After the data currently cached by the first relay is hot backed up to the second relay, the current cached data of the first relay backed up in the second relay is not updated any more, and the data is only stored in the second relay.
Meanwhile, after the original terminal of the first relay is mounted on the third relay, the backup data of the terminal during operation are all backed up on the third relay.
Fig. 5 is a schematic block diagram of an apparatus for data backup based on the internet of things according to another embodiment of the present invention; the internet-of-things-based data backup device 40 further includes: a first prompt message receiving module 405, a first data request sending module 406, a second prompt message receiving module 407, a second data request sending module 408, and a random selecting module 409; wherein the content of the first and second substances,
a first prompt message receiving module 405, configured to receive a fault prompt message sent by a first relay before receiving data to be cached sent by the first relay;
a first data request sending module 406, configured to send a data request message to the first relay according to the fault notification message received by the first notification message receiving module, where the data request message is used to request to acquire data to be cached in the first relay; the data to be cached in the first repeater further comprises an identity, and the identity is used for indicating that the data to be cached in the first repeater comes from the first repeater;
a second prompt message receiving module 407, configured to receive a fault prompt message sent by a first relay before receiving data to be cached sent by the first relay;
a second data request sending module 408, configured to send a data request message to the first relay according to the fault notification message received by the second notification message receiving module, where the data request message is used to request to acquire data to be cached in the first relay; the data currently cached by the first repeater further comprises an identity, and the identity is used for indicating that the currently cached data comes from the first repeater;
a random selection module 409, configured to randomly select one of the second repeater and the third repeater to perform hot backup on the data currently cached by the first repeater when the second comparison unit detects that the number of the terminals mounted on the second repeater is the same as the number of the terminals mounted on the third repeater, and migrate the terminal mounted on the first repeater to another repeater for mounting.
Fig. 6 is a schematic diagram of a unit structure of a terminal ratio comparison module provided in the present invention, where the terminal ratio comparison module 402 includes: a first selecting unit 4021, a first quantity acquiring unit 4022, a first comparing unit 4023, a second selecting unit 4024, a second quantity acquiring unit 4025, and a second comparing unit 4026; wherein the content of the first and second substances,
a first selecting unit 4021, configured to select a second repeater and a third repeater through a gateway;
a first number obtaining unit 4022, configured to obtain the number of mounted terminals of the second relay and the number of mounted terminals of the third relay;
a first comparing unit 4023, configured to compare the number of the mounted terminals of the second relay with the number of the mounted terminals of the third relay;
a second selecting unit 4024, configured to select a second repeater and a third repeater through the gateway;
a second quantity obtaining unit 4025, configured to obtain the number of mounted terminals of the second relay and the number of mounted terminals of the third relay;
and a second comparing unit 4026 configured to compare the number of terminals mounted on the second relay with the number of terminals mounted on the third relay.
In summary, by implementing the embodiment of the present invention, data to be cached sent by a first repeater is received, where the data to be cached is data sent when the first repeater has a fault sign; comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater; and when the number of the mounting terminals of the second repeater is greater than that of the mounting terminals of the third repeater, performing hot backup on the data to be cached to the second repeater, and simultaneously migrating the terminals mounted on the first repeater to the third repeater for mounting. The embodiment of the invention provides a method and a device for data backup based on the Internet of things, wherein after a repeater fails, the number of terminals mounted on other repeaters is judged to select to which repeater the data cached on the failed repeater and the mounted terminals are migrated, so that the data can be normally transmitted under the condition that the failed repeater cannot work
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one type of logical function division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The 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 may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for data backup based on the Internet of things is characterized by comprising the following steps:
receiving data to be cached sent by a first repeater;
comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater;
when the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater, the data to be cached is subjected to hot backup to the second repeater;
the data to be cached is data sent when the first repeater has a fault sign; each terminal and other terminals form an Internet of things through a repeater and/or a gateway;
before receiving the data to be buffered sent by the first repeater, the method further includes:
receiving a fault prompt message sent by the first repeater;
sending a data request message to the first repeater according to the fault prompt message; the data request message is used for requesting to acquire data to be cached in the first repeater; the data to be cached in the first repeater further comprises an identity, and the identity is used for indicating that the data to be cached in the first repeater comes from the first repeater;
the comparing the number of the mounted terminals of the second repeater with the number of the mounted terminals of the third repeater includes:
selecting a second repeater and a third repeater through a gateway;
acquiring the number of mounting terminals of a second repeater and the number of mounting terminals of a third repeater;
and comparing the number of the mounting terminals of the second repeater with the number of the mounting terminals of the third repeater.
2. The method of claim 1, wherein after hot backing up the data to be cached to the second repeater, further comprising:
and migrating the terminal mounted on the first repeater to the third repeater for mounting.
3. The method of claim 1, wherein after the data to be cached is hot backed up to the second repeater, the data to be cached of the first repeater backed up in the second repeater is not updated any more.
4. The method of any of claims 1-3, wherein the currently buffered data of the first relay further comprises an identity indicating that the currently buffered data is from the first relay;
after comparing the number of the mounted terminals of the second repeater with the number of the mounted terminals of the third repeater, the method further includes:
and when detecting that the number of the terminals mounted on the second repeater is the same as that of the terminals mounted on the third repeater, randomly selecting one of the second repeater and the third repeater to perform hot backup on the data currently cached by the first repeater, and migrating the terminals mounted on the first repeater to the other repeater for mounting.
5. An apparatus for data backup based on internet of things, comprising:
the data receiving module is used for receiving data to be cached sent by the first repeater;
the terminal ratio comparison module is used for comparing the mounting terminal number of the second repeater with the mounting terminal number of the third repeater;
the hot backup transfer module is used for hot backup of the data to be cached to the second repeater when the number of the mounting terminals of the second repeater is larger than that of the mounting terminals of the third repeater;
the first prompt message receiving module is used for receiving a fault prompt message sent by a first repeater before receiving data to be cached sent by the first repeater;
a first data request sending module, configured to send a data request message to the first relay according to the fault notification message received by the first notification message receiving module, where the data request message is used to request to acquire data to be cached in the first relay; the data to be cached in the first repeater further comprises an identity, and the identity is used for indicating that the data to be cached in the first repeater comes from the first repeater;
the terminal ratio comparing module comprises:
the first selection unit is used for selecting the second repeater and the third repeater through the gateway;
a first number obtaining unit, configured to obtain the number of mounted terminals of the second repeater and the number of mounted terminals of the third repeater;
and the first comparison unit is used for comparing the mounting terminal number of the second repeater with the mounting terminal number of the third repeater.
6. The apparatus of claim 5, further comprising:
and the mounting transfer module is used for migrating the terminal mounted on the first repeater to the third repeater for mounting after the data to be cached is hot backed up to the second repeater.
7. The apparatus of claim 5, wherein after the hot backup transfer module hot backs up the data to be cached to the second relay, the data to be cached backed up in the first relay in the second relay is not updated any more.
8. The apparatus of any of claims 5-7, wherein the currently buffered data of the first relay further comprises an identity indicating that the currently buffered data is from the first relay;
the device further comprises:
and a random selection module, configured to, when the first comparison unit detects that the number of terminals mounted on the second repeater is the same as the number of terminals mounted on the third repeater, randomly select one of the second repeater and the third repeater to perform hot backup on data currently cached by the first repeater, and migrate the terminal mounted on the first repeater to another repeater for mounting.
CN201710747419.7A 2017-08-26 2017-08-26 Data backup method and device based on Internet of things Active CN107733683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710747419.7A CN107733683B (en) 2017-08-26 2017-08-26 Data backup method and device based on Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710747419.7A CN107733683B (en) 2017-08-26 2017-08-26 Data backup method and device based on Internet of things

Publications (2)

Publication Number Publication Date
CN107733683A CN107733683A (en) 2018-02-23
CN107733683B true CN107733683B (en) 2021-01-26

Family

ID=61205314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710747419.7A Active CN107733683B (en) 2017-08-26 2017-08-26 Data backup method and device based on Internet of things

Country Status (1)

Country Link
CN (1) CN107733683B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108966287B (en) * 2018-07-27 2021-07-27 中国联合网络通信集团有限公司 Data transmission method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101019375A (en) * 2004-09-22 2007-08-15 国际商业机器公司 Method and systems for copying data components between nodes of a network
CN102387539A (en) * 2011-10-31 2012-03-21 福建三元达通讯股份有限公司 Implement method and system for cluster management and load balancing of WLAN system
CN102651867A (en) * 2012-05-25 2012-08-29 吉林大学 EPS-WLAN fusion system and switching method based on framework
WO2013189185A1 (en) * 2012-06-20 2013-12-27 华为技术有限公司 Disaster recovery switching method, device and system
CN106254441A (en) * 2016-07-28 2016-12-21 中国联合网络通信集团有限公司 distributed service management method and device
CN107018070A (en) * 2016-01-28 2017-08-04 南水北调中线干线工程建设管理局 A kind of isomery multimode gateway equipment and its transmission method and application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101019375A (en) * 2004-09-22 2007-08-15 国际商业机器公司 Method and systems for copying data components between nodes of a network
CN102387539A (en) * 2011-10-31 2012-03-21 福建三元达通讯股份有限公司 Implement method and system for cluster management and load balancing of WLAN system
CN102651867A (en) * 2012-05-25 2012-08-29 吉林大学 EPS-WLAN fusion system and switching method based on framework
WO2013189185A1 (en) * 2012-06-20 2013-12-27 华为技术有限公司 Disaster recovery switching method, device and system
CN107018070A (en) * 2016-01-28 2017-08-04 南水北调中线干线工程建设管理局 A kind of isomery multimode gateway equipment and its transmission method and application
CN106254441A (en) * 2016-07-28 2016-12-21 中国联合网络通信集团有限公司 distributed service management method and device

Also Published As

Publication number Publication date
CN107733683A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US9632884B2 (en) Maintaining computer system operability
US4745597A (en) Reconfigurable local area network
CN111158962B (en) Remote disaster recovery method, device and system, electronic equipment and storage medium
JP6431197B2 (en) Snapshot processing methods and associated devices
CN107948063B (en) Method for establishing aggregation link and access equipment
CN107733683B (en) Data backup method and device based on Internet of things
KR101028298B1 (en) Method and system for distributing data processing units in a communication network
CN110768844A (en) Authentication server switching method and device
JP5351448B2 (en) Server client system and server switching method
CN106027313B (en) Network link disaster tolerance system and method
CN104639356A (en) Failure recovery method and device
US9491132B2 (en) System and method for providing push service for reducing network loads
CN107493196B (en) Fault processing method and device based on Internet of things
CN108662722B (en) Signal transmission method, system, device, storage medium and electronic device
JP6533758B2 (en) Network access system and its control device, line backup control method and program
JP3917467B2 (en) Power system monitoring control system and program
JP4511455B2 (en) Fiber channel switch and computer system using the same
CN114095462A (en) Fault tolerance method and system for SRIO communication system of radar processor
CN211046951U (en) Signal transmission system
CN103023697B (en) A kind of management method, Apparatus and system of array multipath
JP7188895B2 (en) Communications system
JP2007266708A (en) Erroneous connection detector and detection method of cable
CN111988808A (en) Core network disaster tolerance backup method and device
CN110955210B (en) AGV scheduling method, device and system
JP3644008B2 (en) Redundant information relay device and switching control method

Legal Events

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