CN111917886B - Intelligent device data migration method and device and intelligent device - Google Patents
Intelligent device data migration method and device and intelligent device Download PDFInfo
- Publication number
- CN111917886B CN111917886B CN202010818647.0A CN202010818647A CN111917886B CN 111917886 B CN111917886 B CN 111917886B CN 202010818647 A CN202010818647 A CN 202010818647A CN 111917886 B CN111917886 B CN 111917886B
- Authority
- CN
- China
- Prior art keywords
- intelligent device
- intelligent
- data
- sub
- list
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/26—Pc applications
- G05B2219/2642—Domotique, domestic, home control, automation, smart house
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Hardware Redundancy (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses an intelligent device adding method, an intelligent device adding device, intelligent devices and a storage medium. The method comprises the following steps: determining a first intelligent device, wherein the first intelligent device is a sub intelligent device for which corresponding data needs to be migrated; and when the second intelligent device is detected to be added, migrating the data of the first intelligent device to the second intelligent device, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device. By the method, after the intelligent equipment needing data migration is determined, the data of the intelligent equipment can be migrated to the newly added corresponding intelligent equipment corresponding to the intelligent equipment, so that the loss of the data can be prevented.
Description
Technical Field
The application belongs to the field of intelligent home, and particularly relates to a data migration method and device for intelligent equipment, intelligent equipment and a storage medium.
Background
Along with the continuous development of intelligent home and internet of things, intelligent devices are increasingly applied. In some areas, there may be multiple smart devices at the same time, and when one of the smart devices is detected to need maintenance replacement, the data in that smart device is easily lost.
Disclosure of Invention
In view of the above problems, the present application proposes a method and apparatus for data migration of an intelligent device, and a storage medium, so as to improve the above problems.
In a first aspect, an embodiment of the present application provides a data migration method of an intelligent device, which is applied to the intelligent device, and the method includes: determining a first intelligent device, wherein the first intelligent device is a sub intelligent device for which corresponding data needs to be migrated; and when the second intelligent device is detected to be added, migrating the data of the first intelligent device to the second intelligent device, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device.
Further, the determining the first smart device includes:
acquiring a characteristic identification list of all sub intelligent devices in the local area network; and determining the first intelligent device based on the characteristic identification list.
Further, the determining, based on the feature identification list, the first smart device includes:
when the fact that the feature identifiers are lost in the feature identifier list is detected, the sub intelligent device corresponding to the lost feature identifiers is used as a first intelligent device.
Further, before the step of obtaining the feature identifier list of all the sub intelligent devices in the local area network, the method further includes:
when detecting that a new sub intelligent device joins the local area network, acquiring a characteristic identifier of the sub intelligent device, and adding the characteristic identifier into the characteristic identifier list; and storing the characteristic identification list into a cloud server, and executing the characteristic identification list of all intelligent devices in the local area network when detecting that the sub intelligent devices in the local area network need to be replaced.
Further, the obtaining the feature identifier list of all the intelligent devices in the local area network includes:
and acquiring a characteristic identification list of all the sub intelligent devices in the local area network from the cloud server.
Further, when the second intelligent device is detected to be added, migrating the data of the first intelligent device to the second intelligent device, including:
and acquiring the data of the first intelligent device from the cloud storage server, and migrating the data of the first intelligent device to the second intelligent device.
Further, the method further comprises:
acquiring a data migration list, wherein the data migration list is used for indicating storage partitions of data needing to be migrated; and based on the data migration list, migrating the data of the first intelligent device to a corresponding storage partition in the second intelligent device.
In a second aspect, an embodiment of the present application provides an intelligent device data migration apparatus, where the apparatus includes: the device determining unit is used for determining a first intelligent device, wherein the first intelligent device is a sub intelligent device which corresponds to data and needs to be migrated; and the data migration unit is used for migrating the data of the first intelligent device to the second intelligent device when the second intelligent device is detected to be added, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device.
In a third aspect, embodiments of the present application provide a smart device including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having program code stored therein, wherein the above-described method is performed when the program code is run.
The embodiment of the application provides an intelligent device data migration method and device, intelligent device and storage medium. First, determining a first intelligent device, wherein the first intelligent device is a sub intelligent device which is required to be migrated for corresponding data, and migrating the data of the first intelligent device to a second intelligent device when the second intelligent device is detected to be added, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device. By the method, after the intelligent equipment needing data migration is determined, the data of the intelligent equipment can be migrated to the newly added corresponding intelligent equipment corresponding to the intelligent equipment, so that the loss of the data can be prevented.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application environment according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for data migration of an intelligent device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an installation position of an intelligent device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an identifier setting interface of an intelligent device according to an embodiment of the present application;
fig. 5 shows a schematic diagram of a prompt interface of an intelligent device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a prompt interface of another smart device according to an embodiment of the present application;
FIG. 7 is a flowchart of a method for migrating data of an intelligent device according to another embodiment of the present application;
FIG. 8 is a flowchart of a method for data migration of a smart device according to still another embodiment of the present application;
FIG. 9 is a flowchart of a method for migrating data of a smart device according to another embodiment of the present application;
fig. 10 shows a block diagram of a data migration apparatus of an intelligent device according to an embodiment of the present application;
FIG. 11 shows a block diagram of a smart device for performing a smart device data migration method according to an embodiment of the present application in real time;
fig. 12 shows a storage unit in real time of the present application for storing or carrying program codes for implementing the smart device data migration method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Along with the continuous progress of the intelligent home technology and the continuous pursuit of life quality by people, the intelligent home serving as one of the applications of the Internet of things is a basic form of future home, and has a wide market application prospect. Based on the thought of the internet of things, the intelligent home equipment technology strives to activate various equipment (such as video and audio systems, lighting systems, air conditioning systems, security systems, computer equipment, security systems, heating and cooling systems and the like) of home life, and the equipment is also called intelligent home equipment, and the intelligent home equipment is connected by being matched with an intelligent home control panel, a sensor and a communication network, so that the intelligent home equipment and a home environment are combined into an intelligent home system for people, and the intelligent home equipment can be controlled through the intelligent home control panel.
In the research of the related intelligent device data migration method, the inventor finds that when the main control intelligent device detects that the sub intelligent device needs to be maintained and replaced, the data in the sub intelligent device is easy to lose due to various maintenance operations.
The intelligent equipment comprises, but is not limited to, an intelligent home control panel, an intelligent gateway, intelligent remote control equipment, an intelligent controller, intelligent power management equipment and the like.
Therefore, the inventor proposes to first determine a first intelligent device in the application, wherein the first intelligent device is a sub intelligent device to which corresponding data needs to be migrated, and when a second intelligent device is detected to be added, migrate the data of the first intelligent device to the second intelligent device, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device, and after determining the intelligent device to which the data needs to be migrated, migrate the data of the intelligent device to the newly added corresponding intelligent device corresponding to the intelligent device, thereby preventing the loss of the data.
An application environment according to an embodiment of the present application will be described below.
As shown in fig. 1, in the application environment shown in fig. 1, the terminal device 110 and the smart device 120 (in this embodiment, the smart device 120 is preferably a smart home control panel), the cloud server 130, and the gateway 140 are included, where the number of the smart device 120 and the gateway 140 may be one or more in a specific area (for example, an office area). Terminal device 110 may interact with smart device 120 via a network (e.g., a local area network or wide area network, etc.).
The cloud server 130 may serve as a transfer station to forward data sent by the gateway 140 or the terminal device 110, and may further store data of each of the terminal device 110, the intelligent device 120, and the gateway 140, for example, the data may include a network address of the gateway 140 or user data of the terminal device 110, and the like.
Terminal device 110 and intelligent device 120 may construct a local area network with gateway 140, and in this local area network, terminal device 110 may send data or instructions to intelligent device 120 through the local area network.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, an embodiment of the present application provides a data migration method for an intelligent device, which is applied to the intelligent device, and the method includes:
step 110: and determining a first intelligent device, wherein the first intelligent device is a sub intelligent device for which the corresponding data needs to be migrated.
It should be noted that, a plurality of intelligent devices may be connected to the same local area network through a gateway or a router, so as to obtain communication distances between all intelligent devices in the same local area network and the gateway or the router, and then determine the main intelligent device and the sub intelligent device according to the distance between the intelligent devices and the gateway or the router. Specifically, after the intelligent device joins the local area network, the communication distance between the intelligent device and the gateway or the router can be acquired first, then the acquired communication distance is sent to other intelligent devices in the local area network, each intelligent device can compare the received communication distances and then send a prompt instruction to the intelligent device with the nearest communication distance, when the intelligent device receives the prompt instruction, the intelligent device can set the zone bit to be 1, and send the zone bit information to other intelligent devices in the local area network, and after the other intelligent devices receive the zone bit information, the zone bit is set to be 0. The intelligent device with the flag bit of 1 is a main intelligent device, the intelligent device with the flag bit of 0 is a sub intelligent device, and further, the sub intelligent device can be set to be controlled by the main intelligent device.
As a way, the first smart device is a sub-smart device that needs to be migrated for the corresponding data, which may be understood as that the sub-smart device has been detached, or that the sub-smart device has not been detached but has determined that the data needs to be migrated. The main intelligent device can determine which sub intelligent device in the local area network needs to perform data migration in a preset mode.
The preset mode can be to detect whether the main intelligent device can communicate with the sub intelligent devices, and when the main intelligent device detects that the main intelligent device cannot communicate with one sub intelligent device, the sub intelligent device can be used as the first intelligent device. Or, the preset mode may be that whether the feature identifiers of all the sub-intelligent devices in the local area network are stored in the cloud server is searched, and when the main intelligent device detects that the feature identifiers of some sub-intelligent devices are less, the sub-intelligent device corresponding to the feature identifiers is used as the first intelligent device, where the feature identifiers include, but are not limited to, a physical address, a manufacturer production identifier, a manufacturer preset rule identifier, a location feature identifier, a digital feature code, and the like.
Step 120: and when the second intelligent device is detected to be added, migrating the data of the first intelligent device to the second intelligent device, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device.
The data may be operation data stored in the storage area of the first intelligent device, a control instruction corresponding to the first intelligent device, and the like, for example, an instruction for controlling a switch of the intelligent device, and the like.
The second intelligent device may be a newly added sub intelligent device corresponding to the first intelligent device, and may be understood as a sub intelligent device which is installed at the same position as the first intelligent device and has not added to the local area network. Further, whether the sub-intelligent device is a newly added sub-intelligent device can be determined by querying whether a history connection record of the sub-intelligent device exists in the cloud server or whether a serial number of the sub-intelligent device is stored in the cloud server.
Specifically, when the intelligent device is joining the local area network, the connection record of the intelligent device and the serial number of the intelligent device can be stored in the cloud server, wherein the serial number of the intelligent device can be the unique identifier of the intelligent device. When the main intelligent device detects that the sub intelligent device is connected to the local area network, whether the history connection record of the sub intelligent device or the serial number of the sub intelligent device is stored or not can be firstly inquired in the cloud server, if the history connection record of the intelligent device or the serial number of the sub intelligent device is stored, the sub intelligent device is determined not to be the newly-added sub intelligent device, and if the history connection record of the sub intelligent device or the serial number of the sub intelligent device is not stored, the sub intelligent device is determined to be the newly-added sub intelligent device.
As one approach, it may be determined in a number of ways whether to migrate data of a first smart device to a newly joined child smart device corresponding to the first smart device.
As one of the modes, when the intelligent equipment leaves the factory, the manufacturer can mark the installation position information of the intelligent equipment on the package of the intelligent equipment, and when the intelligent equipment is installed, a user can directly install the intelligent equipment on a corresponding position according to the installation position information on the package of the intelligent equipment. When the main intelligent device determines a certain first intelligent device in the local area network through the method, prompt information can be sent out to prompt a user to install a second intelligent device at the position according to the installation information. And when the second intelligent device installed at the position joins the local area network, the main intelligent device migrates the data of the first intelligent device to the corresponding second intelligent device.
As another way, an identifier may be allocated to the sub-intelligent device in each area, and further, whether to migrate the data of the first intelligent device to the newly added sub-intelligent device corresponding to the first intelligent device may be determined according to the identifier.
Specifically, when the sub-intelligent device joins the local area network, a setting interface automatically appears in the sub-intelligent device, and the user can set an identifier for the sub-intelligent device in each area. When the main intelligent device detects that the second intelligent device is added, the user sets the identification of the second intelligent device to be the same as the identification of the first intelligent device, and then the main intelligent device can transfer the data of the first intelligent device to the second intelligent device according to the identification. As illustrated in fig. 3, there are 3 areas, namely, a home, a living room, and a study room, in fig. 3, for example. When three sub-intelligent devices join the local area network, a setting interface as shown in fig. 4 appears in each sub-intelligent device, a user can set the identification of the sub-intelligent device on which the user lies to 1, the identification of the sub-intelligent device on which the user lies to 2, the identification of the sub-intelligent device on which the user lies to 3, and when the main intelligent device detects that the first intelligent device with the identification of 2 needs to perform data migration, prompt information can be sent to prompt the user to install the second intelligent device. When the second intelligent device is connected to the local area network, the identifier of the second intelligent device can be set to be 2, and then the main intelligent device can transfer the data of the first intelligent device to the corresponding second intelligent device according to the identifier 2.
Optionally, an identifier may be further set for data in each intelligent device, and further, data in the first intelligent device may be migrated to the second intelligent device according to the data identifier. Specifically, the data of each intelligent device are stored in the cloud server, a unique identifier is set for the data of each intelligent device, and when the main intelligent device detects that a second intelligent device is added, whether the data of a first intelligent device corresponding to a certain identifier is migrated to the second intelligent device is prompted. For example, as shown in fig. 3 above, the identification of the data of the primary-lying sub-intelligent device may be set to a, the identification of the data of the secondary-intelligent device of the living room may be set to B, and the identification of the data of the secondary-intelligent device of the study room may be set to C. When the main intelligent device detects that the second intelligent device is added, a prompt interface as shown in fig. 5 appears to prompt a user whether to perform data migration, when the user selects yes, the identification of the data of the first intelligent device, such as C, is obtained, a prompt interface as shown in fig. 6 appears again to prompt the user whether to perform data migration of the sub-intelligent home control of the study to the second intelligent device, and when the user selects yes, the data of the sub-intelligent device of the study is migrated to the corresponding second intelligent device.
According to the intelligent equipment data migration method, first intelligent equipment is determined, wherein the first intelligent equipment is sub-intelligent equipment which corresponds to data and needs to be migrated, when second intelligent equipment is detected to be added, the data of the first intelligent equipment are migrated to the second intelligent equipment, and the second intelligent equipment is newly added sub-intelligent equipment corresponding to the first intelligent equipment. By the method, after the intelligent equipment needing data migration is determined, the data of the intelligent equipment can be migrated to the newly added corresponding intelligent equipment corresponding to the intelligent equipment, so that the loss of the data can be prevented.
Referring to fig. 7, an intelligent device data migration method provided in an embodiment of the present application is applied to an intelligent device, and the method includes:
step 210: and acquiring a characteristic identification list of all the sub intelligent devices in the local area network.
As one way, when the intelligent device joins the local area network, the cloud server may read the feature identifiers of all the intelligent devices joining the local area network, and establish a feature identifier list. Or after the main intelligent device detects that the intelligent device joins the local area network, the main intelligent device can actively acquire the feature identification of the joined intelligent device, and then a feature identification list is established according to the acquired feature identification.
Alternatively, the master smart device may periodically obtain the feature identification list, e.g., once every two days. By the method, whether the intelligent equipment in the local area network is in a normal working state can be detected.
Optionally, when the main intelligent device receives a control instruction sent by a certain terminal device, the main intelligent device triggers to acquire feature identification lists of all sub intelligent devices in the local area network.
Step 220: and determining the first intelligent device based on the characteristic identification list.
As one approach, when the feature is identified as a physical address, the primary smart device may determine the first smart device by querying a physical address list.
Specifically, when the main intelligent device detects that a physical address is lost in the physical address list, the sub intelligent device corresponding to the lost physical address is used as the first intelligent device. The original physical address list includes physical addresses of 00-25-14-89-54-23, 44-45-53-54-00-00, 44-25-58-54-00-12, 31-42-53-54-56-00 and the like, and the sub intelligent devices corresponding to the physical addresses are panel A, panel B, panel C and panel D respectively. When the main intelligent device detects that the physical address 44-25-58-54-00-12 in the physical address list is lost by querying the physical address list, the panel C corresponding to the physical address 44-25-58-54-00-12 is used as the first intelligent device.
Step 230: and when the second intelligent device is detected to be added, migrating the data of the first intelligent device to the second intelligent device, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device.
The data of the first intelligent device can be uploaded to the cloud server in real time; or the cloud server is stored in the main control intelligent equipment firstly, and then the main control intelligent equipment backs up the cloud server in real time; the cloud server can be stored in the main control intelligent device first, and then the main control intelligent device periodically backs up the cloud server.
As one way, before migrating the data of the first smart device to the second smart device, it may be detected whether the data of the first smart device is already stored in the second smart device.
Specifically, the master intelligent device may send a control instruction to the second intelligent device, and when the second intelligent device receives the control instruction, may return a response message, where the response message may include a used storage capacity of the second intelligent device, and so on. After receiving the response information returned by the second intelligent device, the main intelligent device can determine that the second intelligent device does not store the data of the first intelligent device if the used storage capacity included in the response information is 0; if the used storage capacity included in the response information is not 0, the main intelligent home control panel can acquire data in the second intelligent device and data in the first intelligent device, then compare the data in the second intelligent device with the data in the first intelligent device, if the comparison result representation data is not the same, it can be determined that the second intelligent device does not store the data of the first intelligent device, and if the comparison result representation data is the same, it can be determined that the second intelligent device stores the data of the first intelligent device.
Optionally, if the second smart device already stores the data of the first smart device, the cloud server automatically sends the data of the first smart device to the second smart device for storing when the second smart device joins the local area network.
According to the intelligent device data migration method, firstly, the feature identification list of all sub intelligent devices in a local area network is obtained, then, a first intelligent device is determined according to the feature identification list, when a second intelligent device is detected to be added, data in the first intelligent device is migrated to the second intelligent device, and the second intelligent device is the newly added sub intelligent device corresponding to the first intelligent device. By the method, when the intelligent equipment is detected to need data migration, the data in the intelligent equipment is migrated to the newly added second intelligent equipment, so that the data in the intelligent equipment can be prevented from being lost.
Referring to fig. 8, an intelligent device data migration method provided in an embodiment of the present application is applied to an intelligent device, and the method includes:
step 310: and when detecting that a new sub intelligent device joins the local area network, acquiring the characteristic identifier of the sub intelligent device, and adding the characteristic identifier into the characteristic identifier list.
In one mode, when the main intelligent device detects that the sub intelligent device joins the local area network, the main intelligent device acquires the characteristic identifier of the sub intelligent device, and further can check whether the characteristic identifier of the sub intelligent device is stored in the characteristic identifier list in advance, if the characteristic identifier of the sub intelligent device is stored, the characteristic identifier of the sub intelligent device is not required to be added into the characteristic identifier list, and if the characteristic identifier of the sub intelligent device is not stored, the sub intelligent device is determined to be the newly joined sub intelligent device, and the characteristic identifier is added into the characteristic identifier list.
Step 320: and storing the characteristic identification list into a cloud server, and executing the characteristic identification list of all the sub-intelligent devices in the local area network when detecting that the sub-intelligent devices in the local area network need to perform data migration.
As a way, the main intelligent device may send the feature identifier list to the cloud server for storage, and when the intelligent device needs to view the feature identifier list, the feature identifier list may be obtained from the cloud server.
Optionally, the master smart device may detect whether the sub-smart device is in a normal operating state to determine whether the sub-smart device needs to perform data transfer. Specifically, if the main intelligent device can receive the data information sent by the sub intelligent device, determining that the sub intelligent device is in a normal working state, and determining that the sub intelligent device does not need to perform data migration; if the main intelligent device cannot receive the data information sent by the sub intelligent device, the sub intelligent device is determined to be in a fault state, and the sub intelligent device is determined to need data migration.
Step 330: and determining the first intelligent device based on the characteristic identification list.
The detailed explanation of the steps included in step 330 may refer to the corresponding steps in the foregoing embodiments, and will not be repeated here.
Step 340: and when the second intelligent device is detected to be added, acquiring the data of the first intelligent device from the cloud storage server, and migrating the data of the first intelligent device to the second intelligent device.
As a mode, the intelligent device can upload data to the cloud server in real time, when the main intelligent device detects that the second intelligent device is added, the data of the first intelligent device can be directly obtained from the cloud server, and then the data is migrated to the corresponding second intelligent device.
According to the intelligent equipment data migration method, when a new sub intelligent equipment is detected to be added into a local area network, the characteristic identification of the sub intelligent equipment is obtained, the characteristic identification is added into a characteristic identification list, then the characteristic identification list is stored into a cloud server, when the fact that the sub intelligent equipment in the local area network needs to conduct data migration is detected, the characteristic identification list of all the sub intelligent equipment in the local area network is obtained, then a first intelligent equipment is determined according to the obtained characteristic identification list, when the fact that a second intelligent equipment is detected to be added is detected, the data of the first intelligent equipment are obtained from the cloud storage server, and the data of the first intelligent equipment are migrated to the second intelligent equipment. Through the method, the data in the intelligent device are stored in the cloud server, after the intelligent device needing data migration is determined, the data of the intelligent device can be read from the cloud server, and then the data of the intelligent device is migrated to the newly added corresponding intelligent device corresponding to the intelligent device, so that the loss of the data of the intelligent device can be further prevented.
Referring to fig. 9, an intelligent device data migration method provided in an embodiment of the present application is applied to an intelligent device, and the method includes:
step 410: and acquiring a characteristic identification list of all the sub intelligent devices in the local area network from a cloud server.
Step 420: and determining the first intelligent device based on the characteristic identification list.
The detailed explanation of the steps included in step 410 and step 420 may refer to the corresponding steps in the foregoing embodiments, and will not be repeated here.
Step 430: and when the second intelligent device is detected to be added, acquiring a data migration list, wherein the data migration list is used for indicating storage partitions of data needing to be migrated.
As one way, the storage area of the smart device may be divided into a plurality of storage partitions in advance, and each storage partition may be allocated with a storage capacity of a different size, and when the smart device stores data, the smart device may store different data in different storage partitions according to the data size of the data.
Optionally, the data migration list may include information such as an intelligent device identifier, an original data storage partition, and a data size, and the specific form may be as follows:
further, the main intelligent device can acquire the first intelligent device needing data migration by checking the data migration list; which region of the data storage area the first intelligent device needs to migrate; and the data size of the data to be migrated by the first intelligent device can be checked. By way of example, from the above table, it can be determined that there are 3 first intelligent devices, panel 1, panel 2, and panel 3, respectively, that need to perform data migration. The panel 1 stores data to be migrated in the partition 1, wherein the data size is 10Gb; the data to be migrated of the panel 2 is stored in the partition 5, and the data size is 500Mb; data to be migrated by the panel 3 is stored in the partition 2 with a data size of 105Gb.
Step S440: and based on the data migration list, migrating the data of the first intelligent device to a corresponding storage partition in the second intelligent device.
In one mode, when the main intelligent device acquires the data migration list, the first intelligent device needing to perform data migration can be determined according to the data migration list, and then the main intelligent device can select a proper storage area from the storage areas of the second intelligent device according to the data size of the data needing to be migrated by the first intelligent device.
According to the intelligent device data migration method, firstly, the characteristic identification list of all sub intelligent devices in the local area network is obtained from the cloud server, then the first intelligent device is determined according to the characteristic identification list, when the fact that the second intelligent device is added is detected, the data migration list is obtained, the data migration list is used for indicating storage partitions of data needing to be migrated, and the data in the first intelligent device are migrated to the corresponding storage partitions in the second intelligent device according to the data migration list. By the method, the loss of the data of the intelligent equipment can be prevented.
Referring to fig. 10, an apparatus 500 for data migration of an intelligent device according to an embodiment of the present application is provided, where the apparatus 500 includes:
the device determining unit 510 is configured to determine a first intelligent device, where the first intelligent device is a sub-intelligent device that needs to be migrated according to the corresponding data.
Further, the device determining unit 510 is further configured to obtain a feature identifier list of all the sub-intelligent devices in the local area network; and determining the first intelligent device based on the characteristic identification list.
Further, the device determining unit 510 is further configured to, when detecting that the feature identifier is lost in the feature identifier list, use a sub-intelligent device corresponding to the lost feature identifier as the first intelligent device.
The device determining unit 510 is further configured to, when detecting that a new sub-intelligent device joins the local area network, obtain a feature identifier of the sub-intelligent device, and add the feature identifier to the feature identifier list; and storing the characteristic identification list into a cloud server, and executing the characteristic identification list of all the sub-intelligent devices in the local area network when the fact that the sub-intelligent devices in the local area network need to be replaced is detected. Optionally, a feature identifier list of all the sub-intelligent devices in the local area network is obtained from the cloud server.
And the data migration unit 520 is configured to migrate, when it is detected that a second intelligent device is added, data of the first intelligent device to the second intelligent device, where the second intelligent device is a newly added sub-intelligent device corresponding to the first intelligent device.
Further, the data migration unit 520 is further configured to obtain the data of the first intelligent device from the cloud storage server, and migrate the data of the first intelligent device to the second intelligent device.
Further, the data migration unit 520 is further configured to obtain a data migration list, where the data migration list is used to indicate a storage partition of data that needs to be migrated; and based on the data migration list, migrating the data of the first intelligent device to a corresponding storage partition in the second intelligent device.
It should be noted that, in the present application, the device embodiment and the foregoing method embodiment correspond to each other, and specific principles in the device embodiment may refer to the content in the foregoing method embodiment, which is not described herein again.
A smart device provided in the present application will be described with reference to fig. 11.
Referring to fig. 11, based on the foregoing method and apparatus for data migration of an intelligent device, another intelligent device 800 capable of executing the foregoing method for data migration of an intelligent device is further provided in this embodiment of the present application. The smart device 800 includes one or more (only one shown in the figure) processors 802, a memory 804, an image processor 806, a camera 807, and a network module 808 coupled to each other. The memory 804 stores therein a program capable of executing the contents of the foregoing embodiments, and the processor 802 can execute the program stored in the memory 804.
Wherein the processor 802 may include one or more processing cores. The processor 802 utilizes various interfaces and lines to connect various portions of the overall smart device 800, perform various functions of the smart device 800, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 804, and invoking data stored in the memory 804. Alternatively, the processor 802 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 802 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 802 and may be implemented solely by a single communication chip.
The Memory 804 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (rom). Memory 804 may be used to store instructions, programs, code, sets of codes, or instruction sets. The memory 804 may include a stored program area that may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc., and a stored data area. The storage data area may also store data created by the terminal 800 in use (e.g., phonebook, audio-video data, chat-record data), etc.
The camera 807 is used for image acquisition and transmitting the acquired images to the image processor 806 for processing.
The image processor 806 is configured to improve the quality of the picture by image enhancement or restoration, etc. The processing mode comprises removing noise, correcting wide-angle distortion of the digital photo, improving the contrast of the picture, eliminating red eye and the like. The image processor 806 may also be used for image composition, that is, combining multiple images to implement a process of changing content of the images, where image composition is usually implemented by matting, and the main meaning of image composition is that the background is replaced by matting, or multiple images are directly combined, such as various fusion modes, which are all manners of image composition.
The network module 808 is configured to receive and transmit electromagnetic waves, and to implement mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as an audio playback device. The network module 808 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The network module 808 may communicate with various networks such as the Internet, intranets, wireless networks, or with other devices via wireless networks. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 808 may interact with base stations.
Referring to fig. 12, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 900 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 900 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer readable storage medium 900 includes non-volatile computer readable media (non-transitory computer-readable storage medium). The computer readable storage medium 900 has storage space for program code 910 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 910 may be compressed, for example, in a suitable form.
According to the intelligent device data migration method, the device, the intelligent device and the storage medium, first, the first intelligent device is determined, wherein the first intelligent device is the sub intelligent device with corresponding data to be migrated, when the second intelligent device is detected to be added, the data of the first intelligent device is migrated to the second intelligent device, and the second intelligent device is the newly added sub intelligent device corresponding to the first intelligent device. By the method, after the intelligent equipment needing data migration is determined, the data of the intelligent equipment can be migrated to the newly added corresponding intelligent equipment corresponding to the intelligent equipment, so that the loss of the data can be prevented.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Claims (10)
1. A method for data migration of a smart device, applied to a master smart device, the method comprising:
determining a first intelligent device, wherein the first intelligent device is a sub intelligent device which corresponds to data and needs to be migrated, the first intelligent device is a sub intelligent device which cannot communicate with a main intelligent device, and the main intelligent device is determined based on the distance between all intelligent devices in the same local area network and a gateway or a router respectively;
when the second intelligent device is detected to be added, the identifier of the second intelligent device is set to be the same as the identifier of the first intelligent device, and the data of the first intelligent device is migrated to the second intelligent device according to the identifier, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device.
2. The method of claim 1, wherein the determining the first smart device comprises:
acquiring a characteristic identification list of all sub intelligent devices in the local area network;
and determining the first intelligent device based on the characteristic identification list.
3. The method of claim 2, wherein the determining the first smart device based on the list of feature identifiers comprises:
when the fact that the feature identifiers are lost in the feature identifier list is detected, the sub intelligent device corresponding to the lost feature identifiers is used as a first intelligent device.
4. The method of claim 2, wherein the step of obtaining the feature identifier list of all the sub-intelligent devices in the local area network further comprises:
when detecting that a new sub intelligent device joins the local area network, acquiring a characteristic identifier of the sub intelligent device, and adding the characteristic identifier into the characteristic identifier list;
and storing the characteristic identification list into a cloud server, and executing the characteristic identification list of all the sub-intelligent devices in the local area network when detecting that the sub-intelligent devices in the local area network need to perform data migration.
5. The method of claim 4, wherein the obtaining the feature identifier list of all intelligent devices in the local area network comprises:
and acquiring a characteristic identification list of all the sub intelligent devices in the local area network from the cloud server.
6. The method of claim 1, wherein the migrating data of the first smart device to a second smart device when a second smart device addition is detected comprises:
and acquiring the data of the first intelligent device from a cloud storage server, and migrating the data of the first intelligent device to the second intelligent device.
7. The method of claim 6, wherein the method further comprises:
acquiring a data migration list, wherein the data migration list is used for indicating storage partitions of data needing to be migrated;
and based on the data migration list, migrating the data of the first intelligent device to a corresponding storage partition in the second intelligent device.
8. An intelligent device data migration apparatus, characterized by being applied to a main intelligent device, the apparatus comprising:
the device determining unit is used for determining a first intelligent device, wherein the first intelligent device is a sub intelligent device which corresponds to data and needs to be migrated, the first intelligent device is a sub intelligent device which cannot communicate with a main intelligent device, and the main intelligent device is used for determining the distance between the gateway or the router based on the communication distance between all intelligent devices in the same local area network;
and the data migration unit is used for setting the identifier of the second intelligent device to be the same as the identifier of the first intelligent device when the second intelligent device is detected to be added, and migrating the data of the first intelligent device to the second intelligent device according to the identifier, wherein the second intelligent device is a newly added sub intelligent device corresponding to the first intelligent device.
9. An intelligent device, comprising one or more processors and a memory; one or more programs are stored in the memory and configured to perform the method of any of claims 1-7 by the one or more processors.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, wherein the program code, when being executed by a processor, performs the method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010818647.0A CN111917886B (en) | 2020-08-14 | 2020-08-14 | Intelligent device data migration method and device and intelligent device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010818647.0A CN111917886B (en) | 2020-08-14 | 2020-08-14 | Intelligent device data migration method and device and intelligent device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111917886A CN111917886A (en) | 2020-11-10 |
CN111917886B true CN111917886B (en) | 2023-05-30 |
Family
ID=73283191
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010818647.0A Active CN111917886B (en) | 2020-08-14 | 2020-08-14 | Intelligent device data migration method and device and intelligent device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111917886B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114024833B (en) * | 2022-01-06 | 2022-04-01 | 深圳市聚能优电科技有限公司 | EMS back-end server switching method, system, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007118395A1 (en) * | 2006-04-18 | 2007-10-25 | Huawei Technologies Co., Ltd. | A service takeover method based on device disaster-tolerance, service switching apparatus and spare machine |
CN106992882A (en) * | 2017-03-24 | 2017-07-28 | 北京小米移动软件有限公司 | Router file migration method and apparatus |
CN107038094A (en) * | 2017-04-27 | 2017-08-11 | 紫光华山信息技术有限公司 | A kind of data back up method and device |
CN108345598A (en) * | 2017-01-22 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Measure record moving method, device and electronic equipment |
CN110740055A (en) * | 2018-07-20 | 2020-01-31 | Ovh公司 | System and method for device migration |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10824466B2 (en) * | 2018-09-26 | 2020-11-03 | International Business Machines Corporation | Container migration |
-
2020
- 2020-08-14 CN CN202010818647.0A patent/CN111917886B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007118395A1 (en) * | 2006-04-18 | 2007-10-25 | Huawei Technologies Co., Ltd. | A service takeover method based on device disaster-tolerance, service switching apparatus and spare machine |
CN108345598A (en) * | 2017-01-22 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Measure record moving method, device and electronic equipment |
CN106992882A (en) * | 2017-03-24 | 2017-07-28 | 北京小米移动软件有限公司 | Router file migration method and apparatus |
CN107038094A (en) * | 2017-04-27 | 2017-08-11 | 紫光华山信息技术有限公司 | A kind of data back up method and device |
CN110740055A (en) * | 2018-07-20 | 2020-01-31 | Ovh公司 | System and method for device migration |
Also Published As
Publication number | Publication date |
---|---|
CN111917886A (en) | 2020-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107113892B (en) | Method and device for automatically networking gateway equipment | |
WO2016101729A1 (en) | Wireless network access method, device and system | |
US9774642B2 (en) | Method and device for pushing multimedia resource and display terminal | |
CN108781473B (en) | Method and equipment for sharing files among different terminals | |
CN109617963B (en) | Equipment control method and device and Internet of things system | |
EP3007385B1 (en) | Terminal peripheral control method, m2m gateway, and communications system | |
CN113301568B (en) | Network distribution method and device and intelligent household equipment | |
EP3579644B1 (en) | Data transmission method and apparatus | |
CN110690996A (en) | Configuration method, system and device of intelligent household terminal equipment and terminal equipment | |
CN110381160B (en) | Communication information interaction method and device, storage medium and computer equipment | |
CN109725543B (en) | Equipment control code configuration method and device, cloud server and network system | |
CN107820246B (en) | User authentication method, device and system | |
CN111865731A (en) | Intelligent equipment adding method and device, intelligent household control panel and storage medium | |
CN113572669A (en) | Scene processing method and device, intelligent gateway and processor | |
CN111917886B (en) | Intelligent device data migration method and device and intelligent device | |
CN104468947B (en) | A kind of information processing method and electronic equipment | |
CN111901208A (en) | Intelligent equipment control method and device, intelligent control panel and storage medium | |
CN105281957A (en) | Method for connecting device to Internet of things and server | |
CN109714195B (en) | Equipment control method and device, electronic equipment and Internet of things system | |
CN104954449A (en) | IoT (internet of things) control method and apparatus | |
CN104426816A (en) | Virtual machine communication method and device | |
CN113242550A (en) | Network distribution method, device, equipment and storage medium | |
CN106028303B (en) | Intelligent device discovery method and device | |
US10980078B2 (en) | Method and device for controlling network connection of application terminal | |
CN114143855A (en) | Network automatic connection method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |