CN116366672A - Data synchronization method, device, electronic equipment and computer readable storage medium - Google Patents

Data synchronization method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116366672A
CN116366672A CN202310362484.3A CN202310362484A CN116366672A CN 116366672 A CN116366672 A CN 116366672A CN 202310362484 A CN202310362484 A CN 202310362484A CN 116366672 A CN116366672 A CN 116366672A
Authority
CN
China
Prior art keywords
intelligent
list
data synchronization
local area
area network
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.)
Pending
Application number
CN202310362484.3A
Other languages
Chinese (zh)
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.)
Guangdong Ruizhu Intelligent Technology Co ltd
Original Assignee
Guangdong Ruizhu Intelligent 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 Guangdong Ruizhu Intelligent Technology Co ltd filed Critical Guangdong Ruizhu Intelligent Technology Co ltd
Priority to CN202310362484.3A priority Critical patent/CN116366672A/en
Publication of CN116366672A publication Critical patent/CN116366672A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data synchronization method, a device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a first device list from a device management unit; acquiring a second equipment list through a target local area network; and according to a comparison result between the second equipment list and the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the first equipment list through the equipment management unit, or carrying out data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network. Therefore, under the connection scene of different intelligent devices, the data synchronization between the intelligent devices can be realized by automatically selecting a proper mode, and the data synchronization efficiency between the intelligent devices is effectively improved.

Description

Data synchronization method, device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data synchronization method, a data synchronization device, an electronic device, and a computer readable storage medium.
Background
With the development of intelligent technology, intelligent devices are widely popularized. In the application scenario of intelligent devices, it is required to realize functional linkage of multiple intelligent devices through data synchronization among the intelligent devices, so as to create a more intelligent scenario.
In the related art, data synchronization between intelligent devices is generally performed by using a method of forwarding data through a device management unit such as a cloud server. However, the efficiency of data synchronization is to be improved.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent. Therefore, a first object of the present invention is to provide a data synchronization method, which effectively improves the efficiency of data synchronization between intelligent devices.
A second object of the present invention is to provide a data synchronization device.
A third object of the present invention is to propose an electronic device.
A fourth object of the present invention is to propose a computer readable storage medium.
To achieve the above object, an embodiment of a first aspect of the present invention provides a data synchronization method applied to a data synchronization device, where the data synchronization device is connected to a device management unit, and the data synchronization device is located in a target lan; the method comprises the following steps: acquiring a first device list from the device management unit; the first device list comprises information of intelligent devices connected to the device management unit; acquiring a second equipment list through the target local area network; the second device list comprises information of intelligent devices located in the target local area network; and according to a comparison result between the second equipment list and the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the first equipment list through the equipment management unit, or carrying out data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network.
According to one embodiment of the present invention, the data synchronization of at least some intelligent devices in the first device list by the device management unit according to the comparison result between the second device list and the first device list includes: and if the comparison result shows that the second equipment list is different from the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the first equipment list through the equipment management unit.
According to one embodiment of the present invention, the comparison result is obtained by comparing the number of intelligent devices of the second device list with the number of intelligent devices of the first device list; and if the comparison result shows that the second device list is different from the first device list, performing data synchronization on at least part of intelligent devices in the first device list through the device management unit, including: and if the number of the intelligent devices in the second device list is smaller than that of the intelligent devices in the first device list, performing data synchronization with at least part of the intelligent devices in the first device list through the device management unit.
According to one embodiment of the present invention, according to a comparison result between the second device list and the first device list, performing data synchronization on at least part of the intelligent devices in the second device list through the target local area network includes: and if the comparison result shows that the second equipment list is the same as the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network.
According to one embodiment of the present invention, the comparison result is obtained by comparing the number of intelligent devices of the second device list with the number of intelligent devices of the first device list; and if the comparison result shows that the second equipment list is the same as the first equipment list, performing data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network, including: and if the number of the intelligent devices in the second device list is equal to the number of the intelligent devices in the first device list, performing data synchronization with at least part of the intelligent devices in the second device list through the target local area network.
According to one embodiment of the present invention, before the acquiring the first device list from the device management unit, the data synchronization method includes: sending a first acquisition request to the device management unit to instruct the device management unit to send the first device list to the data synchronization device; or sending a second acquisition request to the device management unit; the second acquisition request carries an appointed device type, and is used for indicating the device management unit to send the first device list to the data synchronization device; the type of the intelligent device in the first device list is the specified device type.
According to an embodiment of the present invention, the method for obtaining the second device list includes: broadcasting inquiry information through the target local area network; the query information is used for indicating intelligent equipment in the target local area network to send reply information to the data synchronization equipment; and if the reply information sent by any intelligent device according to the query information is received through the target local area network, generating the second device list according to the reply information.
According to one embodiment of the present invention, the obtaining, by the target lan, the second device list includes: and if the number of the intelligent devices of the first device list reaches a preset device number threshold, acquiring the second device list through the target local area network.
To achieve the above object, a second aspect of the present invention provides a data synchronization apparatus applied to a data synchronization device, the data synchronization device being connected to a device management unit, and the data synchronization device being located in a target lan; the device comprises: a first list acquisition module, configured to acquire a first device list from the device management unit; the first device list comprises information of intelligent devices connected to the device management unit; a second list acquisition module, configured to acquire a second device list through the target local area network; the second device list comprises information of intelligent devices located in the target local area network; and the device data synchronization module is used for carrying out data synchronization on at least part of intelligent devices in the first device list through the device management unit according to a comparison result between the second device list and the first device list, or carrying out data synchronization on at least part of intelligent devices in the second device list through the target local area network.
To achieve the above object, an embodiment of a third aspect of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the data synchronization method according to any one of the foregoing embodiments when executing the computer program.
To achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data synchronization method according to any one of the preceding embodiments.
According to the embodiments provided by the invention, by establishing a set of rule switching logic for selecting the data synchronization mechanism, if intelligent devices needing to perform data synchronization are all located in the same local area network, the data synchronization mechanism for performing data synchronization through the local area network can be automatically selected; if part of intelligent equipment needing to be synchronized is located in different local area networks, a data synchronization mechanism for forwarding the data needing to be synchronized through the equipment management unit is selected. Therefore, under the connection scene of different intelligent devices, the data synchronization between the intelligent devices can be realized by automatically selecting a proper mode, the efficiency of the data synchronization between the intelligent devices is effectively improved, and the dependence on the network topology structure between the intelligent devices is reduced.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1a is a schematic application scenario of a related art data synchronization method according to the present disclosure.
Fig. 1b is a schematic diagram of a network topology between intelligent devices according to the related art provided in the present specification.
Fig. 1c is a schematic application scenario of a data synchronization method in the related art according to the present disclosure.
Fig. 1d is a schematic application scenario of a data synchronization method in the related art according to the present disclosure.
Fig. 1e is a schematic diagram of an application scenario of a data synchronization method according to the present disclosure.
Fig. 1f is a schematic view of an application scenario of a data synchronization method according to the present disclosure.
Fig. 2a is a schematic application scenario diagram of a data synchronization method according to an embodiment of the present disclosure.
Fig. 2b is a schematic flow chart of a data synchronization method according to an embodiment of the present disclosure.
Fig. 2c is a schematic structural diagram of a first device list according to an embodiment of the present disclosure.
Fig. 2d is a schematic structural diagram of a second device list according to an embodiment of the present disclosure.
Fig. 3 is a flow chart of a data synchronization method according to an embodiment of the present disclosure.
Fig. 4 is a block diagram of a data synchronization device according to an embodiment of the present disclosure.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
With the development of intelligent technology, intelligent devices are widely popularized. In the application scene of the intelligent equipment, higher requirements are put forward on interconnection and intercommunication among the intelligent equipment and data synchronization so as to require that the functional linkage of multiple intelligent equipment is realized through the data synchronization among the intelligent equipment, thereby creating a more intelligent scene based on the intelligent equipment. For example, the function linkage of synchronous display of screen end data of the multi-screen terminal is realized by depending on data synchronization among the multi-screen terminals, the function linkage of nearby awakening of the intelligent sound is realized by depending on data synchronization among the plurality of intelligent sound.
In the related art, the following two ways are generally adopted to realize data synchronization between intelligent devices: (1) Data synchronization between intelligent devices is carried out through a local area network; (2) And forwarding the data to be synchronized through a device management unit (such as a cloud server, a terminal provided with a device management application program and the like) so as to realize data synchronization among intelligent devices.
Taking the smart home field as an example, referring to fig. 1a, in a network topology structure of a single local area network, an intelligent device a and an intelligent device B located at the same level are connected with a home router, and the intelligent device a and the intelligent device B are located in the local area network constructed by the home router. The intelligent device A can discover the intelligent device B through the local area network, and can synchronize data with the intelligent device B through the local area network by utilizing broadcasting or point-to-point communication and other modes.
The mode of carrying out data synchronization among intelligent devices through the local area network has the advantages of high response speed and no influence on the uplink network speed, but has strict requirements on the network connection topological structure among the intelligent devices, namely, the intelligent devices which need to carry out data synchronization are all installed in the same local area network. According to the interception mechanism of the router, the intelligent devices in one local area network can only perform data transmission with the devices in the same level in the same local area network, so that if the intelligent devices needing to perform data synchronization are respectively installed in different local area networks, the mechanism of performing device discovery and data synchronization by depending on the local area network among the intelligent devices fails. Taking the smart home field as an example, referring to fig. 1B, the smart device a is connected to a WIFI router, and the WIFI router and the smart device B are located at the same level and are both connected to a home router. The intelligent device A is located in a local area network 1 constructed by a WIFI router, and the WIFI router and the intelligent device B are located in a local area network 2 constructed by a home router. It can be understood that according to the interception mechanism of the router, the intelligent device a cannot perform data transmission with the intelligent device B across the local area network, so that the intelligent device a cannot discover the intelligent device B through the local area network 1 and perform data synchronization with the intelligent device B; likewise, the smart device B may perform data transmission with the router 1 located at the same level in the local area network 2, but cannot perform data transmission with the smart device a across the local area network, so that the smart device B may discover the WIFI router through the local area network 2 and perform data synchronization with the WIFI router, but cannot discover the smart device a through the local area network 2 and perform data synchronization with the smart device a.
Due to the widespread popularity of smart devices, more than one router is usually arranged in the application scenario of smart devices nowadays, and the scenario of deploying smart devices across a local area network is very common. Under a complex network topology structure, the technical scheme of device discovery and data synchronization by relying on a local area network cannot meet the data synchronization requirement of a cross-local area network, so that the data synchronization among intelligent devices is widely performed in a cloud synchronization mode in the related art, namely, the data synchronization among the intelligent devices is realized in a mode of performing data forwarding through device management units such as a cloud server.
Taking the field of smart home as an example, referring to fig. 1c, a smart home system of a family includes a smart device, a router, and a cloud server. The intelligent device A is located in a local area network constructed by the WIFI router 1, the intelligent device B is located in a local area network constructed by the WIFI router 2, and the WIFI router 1 and the WIFI router 2 are connected with a home router and used for accessing a network of a communication operator. The intelligent device A and the intelligent device B are connected to the same intelligent home or the same home account in the cloud server, so that the cloud server can serve as a device management unit to manage the intelligent device A and the intelligent device B. When the intelligent device A needs to synchronize data with the intelligent device B, the intelligent device A uploads the data to be synchronized to the cloud server through the WIFI router 1 and the home router, and the data to be synchronized is forwarded by depending on a data forwarding function of the cloud server so as to be forwarded to the intelligent device B through the home router and the WIFI router 2.
The method can be suitable for all network topological structures among intelligent devices, and even if the intelligent devices are positioned in the same local area network, the data forwarding among the intelligent devices can be carried out by adopting the method. Referring to fig. 1d, both the intelligent device a and the intelligent device B are located in a local area network constructed by a WIFI router 1, where the WIFI router 1 is connected to a home router for accessing a network of a communications carrier. When the intelligent device A needs to synchronize data with the intelligent device B, the intelligent device A uploads the data to be synchronized to the cloud server through the WIFI router 1 and the home router, and the data to be synchronized is forwarded by depending on a data forwarding function of the cloud server, so that the cloud server forwards the data to the intelligent device B through the home router and the WIFI router 1.
However, the forwarding link is longer, the data synchronization speed is slower, the burden of the cloud server is increased, and the load of the cloud server is required to be higher. Meanwhile, as the intelligent equipment can continuously upload data to the cloud server through the external network of the communication carrier accessed by the home router, the bandwidth of the uplink network of the intelligent home system can be occupied, the speed of the home network is influenced, and the delay of data synchronization is larger.
In order to effectively improve the efficiency of data synchronization between intelligent devices and reduce the dependence on the network topology structure between the intelligent devices, it is necessary to propose a data synchronization method, a data synchronization device, an electronic device and a computer readable storage medium. By establishing a set of rule switching logic for automatically selecting a data synchronization mechanism, if intelligent devices needing to perform data synchronization are all located in the same local area network, the data synchronization mechanism for performing data synchronization through the local area network can be automatically selected; if part of intelligent equipment needing to be synchronized is located in different local area networks, a data synchronization mechanism for forwarding the data needing to be synchronized through the equipment management unit is selected. Therefore, the data synchronization method has the capacity of realizing data synchronization among the intelligent devices through the local area network and the capacity of realizing data synchronization among the intelligent devices through the data forwarding of the device management unit, and can automatically select a proper mode to realize the data synchronization among the intelligent devices under the connection scenes of different intelligent devices.
An application scenario example of a data synchronization method is provided. Taking an intelligent home system comprising an intelligent device A, an intelligent device B, an intelligent device C, a router and a cloud server as an example, the intelligent device A, the intelligent device B and the intelligent device C are all connected to the cloud server. The data synchronization method is applied to the intelligent home system shown in fig. 1 e. Referring to fig. 1e, an intelligent device a and an intelligent device B are located in a local area network 1 constructed by a WIFI router 1; the intelligent device C is located in the local area network 2 constructed by the WIFI router 2; the WIFI router 1 and the WIFI router 2 are connected to the home router to access a network of a communication operator through the home router, and data transmission is carried out between the network and the cloud server.
In this scenario example, after the intelligent device a, the intelligent device B, and the intelligent device C are connected to the cloud server, the cloud server may generate a cloud device list including information of the intelligent device a, the intelligent device B, and the intelligent device C. The intelligent device A is used as a data synchronization device, the intelligent device A can send an acquisition request to a cloud server through the WIFI router 1 and the home router, and the cloud server sends a cloud device list to the intelligent device A after receiving the acquisition request sent by the intelligent device A. The intelligent device A can also broadcast inquiry information through the local area network 1, and after receiving the broadcast inquiry information, the intelligent device B in the local area network 1 can send reply information to the intelligent device A through the local area network 1. The intelligent device A receives the reply information sent by the intelligent device B and can generate a local area network device list according to the information of the intelligent device A and the intelligent device B. According to the comparison result between the cloud device list and the local area network device list, the intelligent device A can find that the cloud device list is different from the local area network device list, and the intelligent device A can select to synchronize data with the intelligent device B and/or the intelligent device C through the cloud server.
The present specification provides yet another application scenario example of the data synchronization method. The data synchronization method can also be applied to the intelligent home system shown in fig. 1 f. Referring to fig. 1f, an intelligent device a, an intelligent device B, and an intelligent device C are located in a local area network 1 constructed by a WIFI router 1; the WIFI router 1 is connected to the home router, so as to access a network of the communication operator through the home router, and perform data transmission with the cloud server through the network.
In this scenario example, with the intelligent device a as the data synchronization device, the intelligent device a may send an acquisition request to the cloud server through the WIFI router 1 and the home router, and after receiving the acquisition request sent by the intelligent device a, the cloud server sends a cloud device list including information of the intelligent device a, the intelligent device B, and the intelligent device C to the intelligent device a. The intelligent device A can also broadcast inquiry information through the local area network 1, and after the intelligent device B and the intelligent device C in the local area network 1 receive the broadcast inquiry information, reply information can be respectively sent to the intelligent device A through the local area network 1. The intelligent device A receives reply messages sent by the intelligent device B and the intelligent device C, and can generate a local area network device list according to the information of the intelligent device A, the intelligent device B and the intelligent device C. According to the comparison result between the cloud device list and the local area network device list, the intelligent device A can find that the cloud device list is the same as the local area network device list, and then the intelligent device A can select to perform data synchronization with the intelligent device B and/or the intelligent device C through the local area network 1.
In some embodiments, the cloud device list may be actively sent to the smart device by the cloud server. The comparison result between the cloud device list and the local area network device list may be obtained by comparing the device information in the cloud device list with the device information in the local area network device list.
In this scenario example, the intelligent device a, the intelligent device B, and the intelligent device C connected to the cloud server are devices that adopt the same private communication protocol (communication protocol defined by the producer), and the query information broadcast by the intelligent device a through the local area network 1 is information that satisfies the private communication protocol, which can only be acquired and resolved by the intelligent device B and the intelligent device C. Therefore, other intelligent devices possibly included in the local area network 1 cannot reply according to the query information broadcast by the intelligent device a, and the local area network device list acquired by the intelligent device a does not include information of other intelligent devices. Therefore, the comparison result between the cloud device list and the local area network device list may also be obtained by comparing the number of devices in the cloud device list with the number of devices in the local area network device list.
In the above scenario example, the data synchronization device may only focus on the smart device of the specified device type in the cloud device list and the local network device list. Illustratively, with continued reference to FIG. 1e, it is assumed that the device types of Smart device A and Smart device B are stereo and the device type of Smart device C is desk lamp. When the cloud device list is compared with the local area network device list, only the intelligent devices with the sound types can be focused on, so that the intelligent device A can compare information of the intelligent devices with the sound types in the cloud device list with information of the intelligent devices with the sound types in the local area network device list, or compare the number of the intelligent devices with the sound types in the cloud device list with the number of the intelligent devices with the sound types in the local area network device list, and accordingly data synchronization can be conducted between the intelligent device B and the intelligent device 1 through the local area network.
In some embodiments, the data synchronization device may send an acquisition request carrying a specified device type to the cloud server to request to acquire a cloud device list including information of intelligent devices only of the specified device type from the cloud server, and broadcast, through a local area network where the data synchronization device is located, query information carrying the specified device type to acquire a local area network device list including information of intelligent devices only of the specified device type in the local area network. For example, assuming that the device type of the smart device a is sound, the smart device a may send an acquisition request carrying the sound device type to the cloud server to request to acquire a cloud device list including information of smart devices only including the sound device type from the cloud server. Accordingly, the intelligent device a may broadcast query information carrying the type of the audio device through the local area network 1 to instruct the intelligent device of the type of the audio device in the local area network 1 to send reply information to the intelligent device a, so that the intelligent device a may generate a local area network device list only containing information of the intelligent device of the type of the audio device.
In the above scenario example, after the intelligent device a acquires the cloud device list, if the number of intelligent devices in the cloud device list reaches the preset device number threshold, the intelligent device a may determine that data synchronization with other intelligent devices is required, and acquire the local area network device list through the local area network 1. It can be understood that, when the number of intelligent devices of the specified device type in the cloud device list reaches the preset device number threshold, the intelligent device a may acquire the local network device list through the local network 1.
In some embodiments, the preset device number threshold may be 1 or 2.
It should be noted that, in the above scenario example, the intelligent device B or the intelligent device C obtains the cloud device list and the corresponding local area network device list, and determines a manner of performing data synchronization with other intelligent devices through the cloud server or the corresponding local area network, which is not described herein.
The present embodiment provides a data synchronization method applied to a data synchronization device, and referring to fig. 2a, the data synchronization device 200 is connected to a device management unit 202, and the data synchronization device 200 is located in a target local area network. Referring to fig. 2b, the data synchronization method may include the following steps.
S210, acquiring a first device list from a device management unit; the first device list includes information of intelligent devices connected to the device management unit.
Wherein the data synchronization device may be a source device that initiates data synchronization. The device management unit may be a cloud server, or may be a terminal or the like provided with a device management application, for managing the intelligent devices connected to the device management unit, forwarding data between the intelligent devices, and the like. The intelligent device may be a functional device with computing processing capability, or may be a router, gateway, or the like.
Specifically, the data synchronization device may request to the device management unit to acquire the first device list, and cause the device management unit to transmit the first device list to the data synchronization device. The data synchronization device may obtain information of the intelligent device connected to the device management unit according to the obtained first device list.
In some embodiments, the first device list may also be sent to the data synchronization device actively by the device management unit.
It is understood that the device management unit may generate a corresponding device list according to information of the intelligent devices connected to the device management unit, so as to facilitate device management, etc.
It should be noted that, interconnection and interworking can be performed between the intelligent devices connected to the same device management unit, so the intelligent devices obtained according to the first device list are intelligent devices capable of interconnection and interworking. If the device management unit is a cloud server, the information of the intelligent devices in the first device list is information of the intelligent devices under the same intelligent device management account (such as a smart home account, a smart office account, a smart mall account, a smart hospital account, etc.) connected to the cloud server in the same place (such as a home house, an office, a mall, a hospital, etc.); if the device management unit is a terminal installed with a device management application (for example, a smart home application, etc.), the information of the smart device in the first device list is the information of the smart device under the same device management application connected to the terminal in the same location.
S220, acquiring a second equipment list through the target local area network; the second device list comprises information of intelligent devices located in the target local area network.
Specifically, the data synchronization device may search for an intelligent device located in a target local area network through the target local area network where the data synchronization device is located by using a method of automatically discovering devices in the local area network, and obtain a corresponding second device list according to the searched information of the intelligent device and the information of the data synchronization device.
It should be noted that, the data synchronization device can perform interconnection and intercommunication between the intelligent device in the target local area network searched by the target local area network and the data synchronization device. Therefore, the intelligent devices obtained according to the second device list are intelligent devices capable of interconnection and interworking.
S230, according to a comparison result between the second device list and the first device list, performing data synchronization on at least part of the intelligent devices in the first device list through the device management unit, or performing data synchronization on at least part of the intelligent devices in the second device list through the target local area network.
In some cases, the location where the data synchronization device is located may have more than one local area network, and the target local area network has an interception function on data of other local area networks, so that all intelligent devices which can be interconnected and intercommunicated with the data synchronization device may not be searched for by the data synchronization device through the target local area network, and the second device list may not include information of the part of intelligent devices which are not searched for. It will be appreciated that the intelligent devices connected to the device management unit comprise intelligent devices located in the target local area network, and that the information of the intelligent devices in the first device list comprises information of the intelligent devices in the second device list. Thus, it is possible to determine whether or not the smart devices connected to the device management unit are all located in the target lan based on the comparison result between the second device list and the first device list. Thus, the data synchronization device may determine to perform data synchronization with the target smart device through the device management unit or the target local area network.
Specifically, after the data synchronization device acquires the first device list and the second device list, the second device list may be compared with the first device list. According to the comparison result between the second device list and the first device list, the data synchronization device can determine whether the intelligent device in the target local area network is consistent with the intelligent device connected to the device management unit. If the intelligent device in the target local area network is inconsistent with the intelligent device connected to the device management unit, the data synchronization device can judge that the intelligent device crossing the local area network exists. The data synchronization device may determine at least a portion of the intelligent devices that need to perform data synchronization according to the first device list, use the at least a portion of the intelligent devices as target intelligent devices, send data that need to be synchronized to the device management unit, and the device management unit forwards the data that need to be synchronized to the at least a portion of the intelligent devices to complete data synchronization between the data synchronization device and the target intelligent devices.
If the intelligent devices in the target local area network are judged to be consistent with the intelligent devices connected to the device management unit, the data synchronization device can judge that the intelligent devices are all located in the target local area network. The data synchronization device may determine at least a portion of the intelligent devices that need to perform data synchronization according to the second device list, use the at least a portion of the intelligent devices as target intelligent devices, and send data that needs to be synchronized to the at least a portion of the intelligent devices through the target local area network, so as to complete data synchronization between the data synchronization device and the target intelligent devices.
The data synchronization device may perform data synchronization with the target intelligent device, or may perform data sharing, data exchange, and the like with the target intelligent device.
In the above embodiment, the two data synchronization schemes are combined to provide a scheme capable of automatically selecting a data synchronization mechanism, aiming at the defect that the scheme for performing data synchronization only through the local area network in the related art is dependent on the network topology structure between intelligent devices and the defect that the scheme for performing data synchronization only through the device management unit in the related art has a large influence on the uplink network rate and the data synchronization efficiency. By establishing a set of rule switching logic, when the intelligent devices are all located in the same local area network, the data synchronization among the intelligent devices can be automatically selected through the local area network; when the intelligent devices are not located in the same local area network, the data forwarding is automatically selected through the device management unit so as to realize the data synchronization among the intelligent devices. Therefore, proper data synchronization modes can be selected under different scenes, dependence on network topology structures among intelligent devices is reduced to a certain extent, and influences on uplink network speed and data synchronization efficiency are reduced.
In some embodiments, according to the comparison result between the second device list and the first device list, performing, by the device management unit, data synchronization on at least a portion of the intelligent devices in the first device list may include: and if the comparison result shows that the second equipment list is different from the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the first equipment list through the equipment management unit.
In some cases, since the formats of the first device list and the second device list may be formats agreed in advance between the data communication device and the device management unit, the second device list may be compared with the first device list to determine whether the second device list is identical to the first device list.
Specifically, the information of the intelligent device in the second device list may be compared with the information of the intelligent device in the first device list, and if the comparison finds that the first device list includes the information of the intelligent device that is not in the second device list, the comparison indicates that the second device list is different from the first device list. The data synchronization device may determine at least a portion of the intelligent devices that need to perform data synchronization according to the first device list, and send the data that need to be synchronized to the device management unit, where the device management unit forwards the data that needs to be synchronized to the at least a portion of the intelligent devices to complete data synchronization.
Illustratively, the intelligent device a, the intelligent device B and the intelligent device C are connected to the device management unit, and the intelligent device a is used as a data synchronization unit. The intelligent device A and the intelligent device B are located in the local area network 1 built by the router 1, and the intelligent device C is located in the local area network 2 built by the router 2. The intelligent device A acquires a first device list from the device management unit, and the first device list comprises information of the intelligent device A, information of the intelligent device B and information of the intelligent device C. The intelligent device a obtains the second device list through the local area network 1, and the intelligent device a can discover the intelligent device B through the local area network 1, so that the second device list includes information of the intelligent device a and information of the intelligent device B. Comparing the information of the intelligent device in the second device list with the information of the intelligent device in the first device list, and finding that the first device list contains the information of the intelligent device C which is not in the second device list, wherein the information of the intelligent device C is different from the information of the intelligent device C in the first device list. The intelligent device A sends the data to be synchronized to the device management unit, and the device management unit forwards the data to be sent to the intelligent device B and/or the intelligent device C in the first device list, so that the data synchronization of the intelligent device A and at least part of the intelligent devices in the first device list is completed.
In some embodiments, the device list may include information such as a device identifier, a device name, and the like of the smart device, where the device identifier is used to uniquely identify the corresponding smart device, and may be an SM code or a MAC address of the smart device, and the like.
Illustratively, referring to fig. 2C, the first device list acquired by the smart device a from the device management unit includes information of the smart device a, information of the smart device B, and information of the smart device C, where deviceId is used to represent a device identifier, and deviceInfo is used to represent a device name. The device identifier corresponding to the intelligent device A is "D412", and the corresponding device name is "intelligent device A"; the device identifier corresponding to the intelligent device B is "D413", and the corresponding device name is "intelligent device B"; the device identifier corresponding to the intelligent device C is "D414", and the corresponding device name is "intelligent device C". Referring to fig. 2D, the second device list acquired by the smart device a through the lan 1 includes information of the smart device a, including a device identifier "D412", a device name "smart device a", and information of the smart device B, including a device identifier "D413", a device name "smart device B". By comparing the device identifier in the second device list with the device identifier in the first device list, it may be found that the first device list includes information of the intelligent device C that is not in the second device list, and this indicates that the second device list is different from the first device list.
In some embodiments, the comparison result is obtained by comparing the number of smart devices of the second device list with the number of smart devices of the first device list. If the comparison result shows that the second device list is different from the first device list, performing data synchronization on at least part of the intelligent devices in the first device list through the device management unit, including: and if the number of the intelligent devices in the second device list is smaller than that of the intelligent devices in the first device list, performing data synchronization with at least part of the intelligent devices in the second device list through the device management unit.
It will be appreciated that in the location where the data synchronization device is located, the smart device connected to the device management unit comprises a smart device located in the target local area network where the data synchronization device is located. Therefore, the information of the intelligent devices in the first device list contains the information of the intelligent devices in the second device list, so that the comparison result between the device lists can be obtained by comparing the number of the intelligent devices in the second device list with the number of the intelligent devices in the first device list.
Specifically, based on the first device list, the number of intelligent devices in the first device list can be obtained; based on the second device list, the number of intelligent devices of the second device list may be obtained. And comparing the number of the intelligent devices of the second device list with the number of the intelligent devices of the first device list, and obtaining a comparison result between the second device list and the first device list according to the difference condition between the number of the intelligent devices of the second device list and the number of the intelligent devices of the first device list. If the number of the intelligent devices of the second device list is smaller than the number of the intelligent devices of the first device list, which indicates that the second device list is different from the first device list, the data synchronization device may determine that the intelligent devices connected to the device management unit are respectively located in different local area networks. The data synchronization device may determine at least a portion of the intelligent devices that need to perform data synchronization according to the first device list, use the at least a portion of the intelligent devices as target intelligent devices, send data that need to be synchronized to the device management unit, and the device management unit forwards the data that need to be synchronized to the at least a portion of the intelligent devices to complete data synchronization between the data synchronization device and the target intelligent devices.
In some embodiments, according to a comparison result between the second device list and the first device list, performing data synchronization on at least part of the intelligent devices in the second device list through the target local area network, including: and if the comparison result shows that the second equipment list is the same as the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network.
Specifically, the information of the intelligent device in the second device list may be compared with the information of the intelligent device in the first device list, and if the comparison finds that the information of the intelligent device in the second device list is the same as the information of the intelligent device in the first device list, the comparison indicates that the second device list is the same as the first device list. The data synchronization device may determine at least a portion of the intelligent devices that need to perform data synchronization according to the second device list, and send the data that need to be synchronized to the at least a portion of the intelligent devices through a target local area network where the data synchronization device is located, so as to complete data synchronization.
Illustratively, the device a, the smart device B, and the smart device C are connected to the device management unit, and the smart device a is used as a data synchronization unit. The intelligent device A, the intelligent device B and the intelligent device C are all located in the local area network 1 constructed by the router 1. The intelligent device A acquires a first device list from the device management unit, and the first device list comprises information of the intelligent device A, information of the intelligent device B and information of the intelligent device C. The intelligent device a obtains a second device list through the local area network 1, and then the intelligent device a can discover the intelligent device B and the intelligent device C through the local area network 1, so that the second device list includes information of the intelligent device a, information of the intelligent device B and information of the intelligent device C. Comparing the information of the intelligent devices in the second device list with the information of the intelligent devices in the first device list, and finding that the information of the intelligent devices in the second device list is the same as the information of the intelligent devices in the first device list, wherein the information of the intelligent devices in the second device list is the same as the information of the intelligent devices in the first device list. And the intelligent device A sends the data to be synchronized to the intelligent device B and/or the intelligent device C in the second device list through the target local area network, so that the data synchronization of the intelligent device A and at least part of the intelligent devices in the second device list is completed.
In some embodiments, the data synchronization device may perform data synchronization on at least some intelligent devices in the second device list through the target lan by using UDP/TCP peer-to-peer communication, UDP broadcast communication, or the like.
It will be appreciated that in the case where the second device list is the same as the first device list, data synchronization may also be performed on at least some of the smart devices in the first device list via the target local area network.
In some embodiments, the comparison result is obtained by comparing the number of smart devices of the second device list with the number of smart devices of the first device list. If the comparison result shows that the second equipment list is the same as the first equipment list, performing data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network, including: and if the number of the intelligent devices in the second device list is equal to that of the intelligent devices in the first device list, performing data synchronization with at least part of the intelligent devices in the second device list through the target local area network.
Specifically, based on the first device list, the number of intelligent devices in the first device list can be obtained; based on the second device list, the number of intelligent devices of the second device list may be obtained. And comparing the number of the intelligent devices of the second device list with the number of the intelligent devices of the first device list, and obtaining a comparison result between the second device list and the first device list according to the difference condition between the number of the intelligent devices of the second device list and the number of the intelligent devices of the first device list. If the number of the intelligent devices in the second device list is equal to the number of the intelligent devices in the first device list, which indicates that the second device list is the same as the first device list, the data synchronization device may determine that the intelligent devices connected to the device management unit are all located in the same local area network. The data synchronization device may determine at least part of the intelligent devices to be subjected to data synchronization according to the second device list, use the at least part of the intelligent devices as target intelligent devices, and send data to be synchronized to the at least part of the intelligent devices through a target local area network where the data synchronization device is located, so as to complete data synchronization between the data synchronization device and the target intelligent devices.
In some embodiments, before the first device list is acquired from the device management unit, the data synchronization method may include: a first acquisition request is sent to the device management unit to instruct the device management unit to send a first device list to the data synchronization device. Or sending a second acquisition request to the device management unit; the second acquisition request carries an appointed device type and is used for indicating the device management unit to send a first device list to the data synchronization device; the type of the intelligent device in the first device list is a specified device type.
Specifically, the data synchronization device may send a first device list acquisition request to the device management unit to request that the first device list including information of all intelligent devices connected to the device management unit in the current location be acquired from the device management unit. After receiving the first device list acquisition request sent by the data synchronization device, the device management unit responds to the request and sends a corresponding first device list to the data synchronization device.
Further, since the data synchronization device may only need to perform data synchronization with the intelligent device of the specified device type, the device list may include information such as the device type of the intelligent device. When the data synchronization device obtains a first device list containing information of all intelligent devices connected to the device management unit, the data synchronization device can screen the first device list according to the type of the designated device, and determine that the type of the device is the information of the intelligent device of the designated device type.
In some embodiments, the specified device type may be a device type of the data synchronization device, or may be another device type specified in advance.
Taking an intelligent home system as an example, the device management unit is an operation terminal provided with an intelligent home application program 1, and the intelligent home system comprises an intelligent device a, an intelligent device B, an intelligent device C, an intelligent device D and an intelligent device E, which are all connected to the device management unit and managed by the intelligent home application program 1. Wherein, intelligent device A is sound equipment, intelligent device B is air conditioning equipment, intelligent device C is sound equipment, intelligent device D is desk lamp equipment, and intelligent device E is area screen display equipment. And the intelligent device A is used as a data synchronization device, and can send a first device list acquisition request to the device management unit, so that the device management unit can send a first device list containing information of the intelligent device A, the intelligent device B, the intelligent device C, the intelligent device D and the intelligent device E to the intelligent device A. If the intelligent device a only needs to perform data synchronization with the intelligent device with the device type being the audio device, the intelligent device a may screen in the first device list according to the designated device type being the audio device, and determine information of the intelligent device with the device type being the audio device, that is, determine information of the intelligent device a and the intelligent device C.
For example, if the intelligent device a only needs to perform data synchronization with the intelligent device with the device type being the on-screen display device, the intelligent device a may screen in the first device list according to the specified device type being the on-screen display device, and determine information of the intelligent device with the device type being the on-screen display device, that is, determine information of the intelligent device E. The case where the intelligent device B, the intelligent device C, the intelligent device D, and the intelligent device E are respectively data synchronization devices will not be described in detail here.
In other embodiments, the data synchronization device may send a first device list acquisition request to the device management unit according to the specified device type to request that the first device list including only information of the intelligent devices of the specified device type be acquired from the device management unit. After receiving the first device list acquisition request sent by the data synchronization device, the device management unit responds to the request and sends a corresponding first device list to the data synchronization device.
Taking the smart home system as an example, taking the smart device a as the data synchronization device, if the smart device a only needs to perform data synchronization with the smart device with the device type being the audio device, the smart device a may send a first device list obtaining request to the device management unit according to the designated device type being the audio device, so that the device management unit sends a first device list including only the information of the smart device with the device type being the audio device to the smart device a, that is, sends a first device list including the information of the smart device a and the information of the smart device C to the smart device a.
For example, if the intelligent device a only needs to perform data synchronization with the intelligent device with the device type being the on-screen display device, the intelligent device a may send a first device list obtaining request to the device management unit according to the specified device type being the on-screen display device, so that the device management unit sends a first device list including information of the intelligent device with the device type being the on-screen display device to the intelligent device a, that is, sends a first device list including information of the intelligent device E to the intelligent device a. The case where the intelligent device B, the intelligent device C, the intelligent device D, and the intelligent device E are respectively data synchronization devices will not be described in detail here.
It should be noted that the smart device connected to the device management unit may be a smart device employing a specified private communication protocol. The designated private communication protocol is a predefined private protocol for interconnection and interworking between intelligent devices, and may be a private protocol defined by a producer of the intelligent devices or other private protocols.
Illustratively, taking an intelligent home system as an example, the intelligent home system includes an intelligent device a, an intelligent device B, an intelligent device C, an intelligent device D and an intelligent device E. The intelligent device A, the intelligent device B and the intelligent device C are intelligent devices adopting the private communication protocol 1, and the intelligent device D and the intelligent device E are intelligent devices adopting the private communication protocol 2. Thus, the smart device a, the smart device B, and the smart device C may be connected to the same device management unit (for example, to the same cloud server or the same account of the cloud server, or to the same smart home application of the operation terminal on which the smart home application is installed), and the smart device D and the smart device E may be connected to another device management unit. For example, the device management unit is an operation terminal installed with the smart home application 1 and the smart home application 2, and the smart device a, the smart device B, and the smart device C may be connected to the smart home application 1 of the device management unit, and managed by the smart home application 1; the smart devices D, E may be connected to the smart home application 2 of the device management unit, and managed by the smart home application 2.
In some embodiments, referring to fig. 3, the method for obtaining the second device list may include the following steps.
S310, broadcasting inquiry information through a target local area network; the query information is used for indicating the intelligent equipment in the target local area network to send reply information to the data synchronization equipment.
S320, if the reply information sent by any intelligent device according to the query information is received through the target local area network, a second device list is generated according to the reply information.
Specifically, the data synchronization device may send query information through the target lan in a broadcast manner, so as to be used for searching for the intelligent device located in the target lan. And under the condition that the intelligent equipment in the target local area network receives the query information sent by the data synchronization equipment, the reply information containing the information of the intelligent equipment can be sent to the data synchronization equipment through the target local area network. And the data synchronization equipment receives the reply information sent by the intelligent equipment, and can obtain the information of the intelligent equipment according to the reply information. The data synchronization device may generate a second device list based on the information of the intelligent device and the information of the data synchronization device.
In some embodiments, the data synchronization device may broadcast query information over the target local area network based on the specified private communication protocol for searching for intelligent devices located in the target local area network that employ the specified private communication protocol. Accordingly, the intelligent device adopting the specified private communication protocol in the target local area network can receive the query information sent by the data synchronization device and send corresponding reply information to the data synchronization device through the target local area network.
For example, taking an intelligent home system as an example, the intelligent home system comprises an intelligent device A, an intelligent device B, an intelligent device C, an intelligent device D and an intelligent device E, which are all located in the same local area network. The intelligent device A, the intelligent device B and the intelligent device C are intelligent devices adopting the private communication protocol 1, and the intelligent device D and the intelligent device E are intelligent devices adopting the private communication protocol 2. And the intelligent device A is used as the data synchronization device, the intelligent device A broadcasts query information through the local area network, the intelligent device B and the intelligent device C can receive the query information and respectively send corresponding reply information to the intelligent device A through the local area network, and the intelligent device D and the intelligent device E can not receive the query information, so that the corresponding reply information can not be sent to the intelligent device A. Therefore, the intelligent device a can obtain the information of the intelligent device B and the intelligent device C according to the received reply information sent by the intelligent device B and the intelligent device C, and generate a corresponding second device list according to the information of the intelligent device a, the intelligent device B and the intelligent device C. The case where the intelligent device B, the intelligent device C, the intelligent device D, and the intelligent device E are respectively data synchronization devices will not be described in detail here.
It will be appreciated that the smart device connected to the device management unit is a smart device employing the specified private communication protocol. Further, the data synchronization device may filter in the second device list according to the specified device type under the condition that the second device list is obtained, and determine that the device type is information of the intelligent device of the specified device type. The data synchronization device may determine, according to a comparison result between information of the intelligent device of the specified device type in the second device list and information of the intelligent device of the specified device type in the first device list, to perform data synchronization on at least part of the intelligent devices in the first device list through the device management unit, or perform data synchronization on at least part of the intelligent devices in the second device list through the target local area network.
Taking an intelligent home system as an example, the device management unit is an operation terminal provided with an intelligent home application program, the intelligent home system comprises an intelligent device A, an intelligent device B, an intelligent device C, an intelligent device D and an intelligent device E which adopt the same private communication protocol, the intelligent device A, the intelligent device B and the intelligent device C are all connected to the device management unit, the intelligent device A, the intelligent device B and the intelligent device C are located in the local area network 1, and the intelligent device D and the intelligent device E are located in the local area network 2. Wherein, intelligent device A is sound equipment, intelligent device B is air conditioning equipment, intelligent device C is sound equipment, intelligent device D is desk lamp equipment, and intelligent device E is area screen display equipment. And the intelligent device A is used as a data synchronization device, and can send a first device list acquisition request to the device management unit, so that the device management unit can send a first device list containing information of the intelligent device A, the intelligent device B, the intelligent device C, the intelligent device D and the intelligent device E to the intelligent device A. The intelligent device a can also broadcast query information through the local area network 1, and the intelligent device B and the intelligent device C in the local area network 1 send corresponding reply information to the intelligent device a according to the query information, so that the intelligent device a can generate a second device list according to the information of the intelligent device a, the intelligent device B and the intelligent device C. If the intelligent device a only needs to perform data synchronization with the intelligent device with the device type being the audio device, the intelligent device a may screen in the first device list and the second device list according to the designated device type being the audio device, determine information of the intelligent device with the device type being the audio device, that is, determine information of the intelligent device a and the intelligent device C in the first device list, and determine information of the intelligent device a and the intelligent device C in the second device list. The intelligent device a can determine that the intelligent devices needing to be synchronized are all located in the same local area network according to the comparison result between the screened second device list and the first device list, so that the intelligent device a can send the data needing to be synchronized to the intelligent device C through the local area network 1.
For example, if the intelligent device a only needs to perform data synchronization with the intelligent device with the device type being the on-screen display device, the intelligent device a may screen in the first device list according to the specified device type being the on-screen display device, and determine information of the intelligent device with the device type being the on-screen display device, that is, determine information of the intelligent device E in the first device list. The intelligent device A screens in the second device list according to the appointed device type as the on-screen display device, and as the second device list has no information of the intelligent device with the device type as the on-screen display device, an empty list can be obtained after the second device list is screened. The intelligent device a can determine that the intelligent devices needing to be synchronized are respectively located in different local area networks according to the comparison result between the screened second device list and the first device list, so that the intelligent device a can forward the data needing to be synchronized to the intelligent device E through the device management unit. The case where the intelligent device B, the intelligent device C, the intelligent device D, and the intelligent device E are respectively data synchronization devices will not be described in detail here.
In other embodiments, the data synchronization device may send a first device list acquisition request to the device management unit according to the specified device type to request that the first device list including information of the smart device of the specified device type be acquired from the device management unit. The data synchronization device may also broadcast query information through the target local area network according to the specified device type, so as to instruct the intelligent device of the specified device type in the target local area network to send reply information to the data synchronization device, so that the data synchronization device generates a second device list including information of the intelligent device of the specified device type.
Taking the smart home system as an example, taking the smart device a as the data synchronization device, if the smart device a only needs to perform data synchronization with the smart device with the device type being the audio device, the smart device a may send a first device list obtaining request to the device management unit according to the designated device type being the audio device, so that the device management unit sends a first device list including information of the smart device with the device type being the audio device to the smart device a, that is, sends a first device list including information of the smart device a and information of the smart device C to the smart device a. The intelligent device a may also broadcast query information through the local area network 1 to instruct the intelligent device with the device type being the acoustic device to send reply information to the intelligent device a, that is, instruct the intelligent device C to send reply information to the intelligent device a, so that the intelligent device a generates a second device list according to the information of the intelligent device a and the intelligent device C. According to the comparison result between the second device list and the first device list, the intelligent device A determines that the intelligent devices needing to be subjected to data synchronization are all located in the same local area network, so that the intelligent device A can send the data needing to be synchronized to the intelligent device C through the local area network 1.
For example, if the intelligent device a only needs to perform data synchronization with the intelligent device with the device type being the on-screen display device, the intelligent device a may send a first device list obtaining request to the device management unit according to the specified device type being the on-screen display device, so that the device management unit sends a first device list including information of the intelligent device with the device type being the on-screen display device to the intelligent device a, that is, sends a first device list including information of the intelligent device E to the intelligent device a. The intelligent device a may also broadcast query information over the local area network 1 to instruct the intelligent device, which is a display device with a screen, to send reply information to the intelligent device a. Since no device type in the local area network 1 is a smart device with a screen display device, the smart device a may generate an empty second device list. According to the comparison result between the second device list and the first device list, the intelligent device A determines that the intelligent devices needing to be subjected to data synchronization are located in different local area networks, so that the intelligent device A can forward the data needing to be synchronized to the intelligent device E through the device management unit. The case where the intelligent device B, the intelligent device C, the intelligent device D, and the intelligent device E are respectively data synchronization devices will not be described in detail here.
It should be noted that, the data synchronization device may broadcast the query information through the target lan in a manner of UDP broadcast or the like. The private communication protocol is a predefined private protocol for interconnection and interworking between intelligent devices, and can be a private protocol defined by a producer of the intelligent devices or other private protocols. Through the device management unit, the MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol) protocol based on the publish/subscribe mode or the specified private communication protocol may be employed for data synchronization with at least part of the smart devices in the first list of devices.
In some embodiments, obtaining, by the target local area network, the second device list may include: and if the number of the intelligent devices of the first device list reaches a preset device number threshold, acquiring a second device list through the target local area network.
In some cases, if the data synchronization device finds that there is no intelligent device that needs to perform data synchronization according to the first device list acquired from the device management unit, the data synchronization device may not need to acquire the second device list through the target local area network. Therefore, before the data synchronization device acquires the second device list through the target local area network, the number of intelligent devices in the first device list can be judged.
Specifically, the data synchronization device may determine the number of intelligent devices of the first device list according to the first device list acquired from the device management unit. If the number of the intelligent devices of the first device list reaches a preset device number threshold value, indicating that intelligent devices needing to perform data synchronization exist in a place where the data synchronization device is located, the data synchronization device acquires a second device list through a target local area network; if the number of the intelligent devices of the first device list does not reach the preset device number threshold, the data synchronization device does not need to acquire a second device list through the target local area network if the intelligent devices needing to perform data synchronization do not exist in the place where the data synchronization device is located.
In some embodiments, the first device list includes information of all intelligent devices connected to the device management unit, the number of intelligent devices in the first device list is the number of all intelligent devices, and the preset device number threshold may be 2.
In other embodiments, the first device list includes information of all the smart devices connected to the device management unit, or includes information of smart devices of a specified device type, the number of smart devices of the first device list is information of smart devices of the specified device type, and the preset device number threshold may be 1 or 2.
The embodiment of the specification provides a data synchronization device which is applied to data synchronization equipment, wherein the data synchronization equipment is connected to an equipment management unit, and the data synchronization equipment is located in a target local area network. Referring to fig. 4, the data synchronization apparatus 400 may include: a first list acquisition module 410, a second list acquisition module 420, and a device data synchronization module 430.
A first list obtaining module 410, configured to obtain a first device list from the device management unit; the first device list includes information of intelligent devices connected to the device management unit.
A second list obtaining module 420, configured to obtain a second device list through the target lan; the second device list comprises information of intelligent devices located in the target local area network.
And the device data synchronization module 430 performs data synchronization on at least part of the intelligent devices in the first device list through the device management unit according to the comparison result between the second device list and the first device list, or performs data synchronization on at least part of the intelligent devices in the second device list through the target local area network.
For specific limitations of the data synchronization device, reference may be made to the above limitation of the data synchronization method, and no further description is given here. The modules in the data synchronization device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or independent of a processor in the electronic device, or may be stored in software in a memory in the electronic device, so that the processor may call and execute operations corresponding to the above modules.
The present embodiment also provides an electronic device, referring to fig. 5, where the electronic device 500 includes a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and capable of running on the processor 520, and the processor 520 implements the aforementioned data synchronization method when executing the computer program 530.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the aforementioned data synchronization method.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (11)

1. A data synchronization method, characterized by being applied to a data synchronization device, the data synchronization device being connected to a device management unit and the data synchronization device being located in a target local area network; the method comprises the following steps:
acquiring a first device list from the device management unit; the first device list comprises information of intelligent devices connected to the device management unit;
acquiring a second equipment list through the target local area network; the second device list comprises information of intelligent devices located in the target local area network;
and according to a comparison result between the second equipment list and the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the first equipment list through the equipment management unit, or carrying out data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network.
2. The method according to claim 1, wherein the performing, by the device management unit, data synchronization on at least part of the smart devices in the first device list according to the comparison result between the second device list and the first device list includes:
And if the comparison result shows that the second equipment list is different from the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the first equipment list through the equipment management unit.
3. The method of claim 2, wherein the comparison result is obtained by comparing the number of smart devices of the second device list with the number of smart devices of the first device list; and if the comparison result shows that the second device list is different from the first device list, performing data synchronization on at least part of intelligent devices in the first device list through the device management unit, including:
and if the number of the intelligent devices in the second device list is smaller than that of the intelligent devices in the first device list, performing data synchronization with at least part of the intelligent devices in the first device list through the device management unit.
4. The method of claim 1, wherein synchronizing data of at least some intelligent devices in the second device list via the target local area network based on a comparison between the second device list and the first device list comprises:
And if the comparison result shows that the second equipment list is the same as the first equipment list, carrying out data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network.
5. The method of claim 4, wherein the comparison result is obtained by comparing the number of smart devices of the second device list with the number of smart devices of the first device list; and if the comparison result shows that the second equipment list is the same as the first equipment list, performing data synchronization on at least part of intelligent equipment in the second equipment list through the target local area network, including:
and if the number of the intelligent devices in the second device list is equal to the number of the intelligent devices in the first device list, performing data synchronization with at least part of the intelligent devices in the second device list through the target local area network.
6. The method according to claim 1, wherein prior to said obtaining a first device list from said device management unit, said method comprises:
sending a first acquisition request to the device management unit to instruct the device management unit to send the first device list to the data synchronization device; or alternatively
Sending a second acquisition request to the equipment management unit; the second acquisition request carries an appointed device type, and is used for indicating the device management unit to send the first device list to the data synchronization device; the type of the intelligent device in the first device list is the specified device type.
7. The method according to claim 1, wherein the obtaining manner of the second device list includes:
broadcasting inquiry information through the target local area network; the query information is used for indicating intelligent equipment in the target local area network to send reply information to the data synchronization equipment;
and if the reply information sent by any intelligent device according to the query information is received through the target local area network, generating the second device list according to the reply information.
8. The method according to any one of claims 1 to 7, wherein said obtaining, by the target local area network, a second list of devices comprises:
and if the number of the intelligent devices of the first device list reaches a preset device number threshold, acquiring the second device list through the target local area network.
9. A data synchronizing apparatus, characterized by being applied to a data synchronizing device, the data synchronizing device being connected to a device management unit, and the data synchronizing device being located in a target local area network; the device comprises:
a first list acquisition module, configured to acquire a first device list from the device management unit; the first device list comprises information of intelligent devices connected to the device management unit;
a second list acquisition module, configured to acquire a second device list through the target local area network; the second device list comprises information of intelligent devices located in the target local area network;
and the device data synchronization module is used for carrying out data synchronization on at least part of intelligent devices in the first device list through the device management unit according to a comparison result between the second device list and the first device list, or carrying out data synchronization on at least part of intelligent devices in the second device list through the target local area network.
10. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
CN202310362484.3A 2023-04-04 2023-04-04 Data synchronization method, device, electronic equipment and computer readable storage medium Pending CN116366672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310362484.3A CN116366672A (en) 2023-04-04 2023-04-04 Data synchronization method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310362484.3A CN116366672A (en) 2023-04-04 2023-04-04 Data synchronization method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116366672A true CN116366672A (en) 2023-06-30

Family

ID=86938295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310362484.3A Pending CN116366672A (en) 2023-04-04 2023-04-04 Data synchronization method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116366672A (en)

Similar Documents

Publication Publication Date Title
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
CN109474936B (en) Internet of things communication method and system applied among multiple lora gateways
CN115152194B (en) Method, device and system for discovering application
CN110831092B (en) Method and equipment for PDU session management, node association and UPF discovery
CN112654049B (en) Method, system, node and medium for configuring a wireless communication coverage extension system
US10999243B2 (en) Sharing media among remote access clients in a universal plug and play environment
EP2206321B1 (en) Method, system and apparatus for protocol negotiation in a telecommunications network
CN114025408B (en) Network establishing and accessing method and device for self-adaptive networking and computer equipment
KR100785482B1 (en) Method and apparatus for discoverying component in at least one of sub-network
CN108900579A (en) Communication system and communication means, device and equipment, medium
CN116366672A (en) Data synchronization method, device, electronic equipment and computer readable storage medium
CN114430390B (en) Method and device for acquiring cross-domain link
CN110830594B (en) Method, system, device and storage medium for expanding IP address of cloud mobile phone
CN109922442B (en) Address resolution method for heterogeneous network of wireless multi-hop network and full-connection network
JP2023535893A (en) Service request processing
JP2010113710A (en) Method of transmitting data between peers with network selection according to at least one criterion, and associated management device and communication equipment
CN114221895A (en) Data transmission method, device and network equipment
JPWO2007114035A1 (en) Connection support server and communication device
CN110505149B (en) Network topology collection method and device
CN112994996B (en) Home network sharing method, MEC server, computer device, and medium
US20230179444A1 (en) Network configuration method, terminal, system, and storage medium
WO2024001563A1 (en) Message routing method and apparatus, and system
CN115550887A (en) Address service entity selection method and device, electronic equipment and readable storage medium
CN116939550A (en) Network information opening method, device, related equipment and storage medium
CN113838463A (en) Information transmission method and device, electronic equipment and storage medium

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