CN105245619A - Data synchronization method and apparatus of intelligent device - Google Patents

Data synchronization method and apparatus of intelligent device Download PDF

Info

Publication number
CN105245619A
CN105245619A CN201510713304.7A CN201510713304A CN105245619A CN 105245619 A CN105245619 A CN 105245619A CN 201510713304 A CN201510713304 A CN 201510713304A CN 105245619 A CN105245619 A CN 105245619A
Authority
CN
China
Prior art keywords
control terminal
transmission data
smart machine
list
data
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
CN201510713304.7A
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 Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510713304.7A priority Critical patent/CN105245619A/en
Publication of CN105245619A publication Critical patent/CN105245619A/en
Pending legal-status Critical Current

Links

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

Abstract

The invention discloses a data synchronization method and apparatus of an intelligent device. The method is applied to control terminals connected with the intelligent device and comprises the following steps: obtaining transmission data and a control terminal list not synchronizing the transmission data; judging whether the number of control terminals not synchronizing the transmission data at present is larger than 1, and if so, grouping the control terminals not synchronizing the transmission data at present in the control terminal list; and for each control terminal group, using the control terminal list of the current group as the control terminal list not synchronizing the transmission data of the current group, and sending the control terminal list not synchronizing the transmission data of the current group and the transmission data to a control terminal in the control terminal list of the current group, until the transmission data are synchronized to all control terminals connected with the intelligent device. The data synchronization method is used for solving the problem that the intelligent device is susceptible to network congestion in a data transmission process of the intelligent device.

Description

A kind of method of data synchronization of smart machine and device
Technical field
The present invention relates to technical field of information processing, be specifically related to a kind of method of data synchronization and device of smart machine.
Background technology
Along with the development of science and technology, the various smart machines being similar to intelligent network audio amplifier are just more and more universal.Smart machine is integrated with processor and network interface, and user can connect with it by using the upper preassembled application program of control terminal (such as mobile phone, panel computer etc.).Such as control terminal by the Streaming Media music on the Internet, can be pushed to intelligent sound box and plays.
After multiple control terminal and same smart machine connect, conveniently user operation, the data received can be sent in all control terminals connected with this smart machine by smart machine.But, time data volume is very large, when smart machine sends these data to control terminal, be easy to cause the network of smart machine to block.
Summary of the invention
The embodiment of the present invention provides a kind of method of data synchronization and device of smart machine, with the problem avoiding smart machine that network congestion occurs in data transmission procedure.
First aspect, embodiments provides a kind of method of data synchronization of smart machine, is applied to the control terminal be connected with smart machine, comprises:
Obtain the control terminal list of transmission data and non-synchronous transmitting data;
Judge whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups; The control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data;
Each control terminal is divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.
Second aspect, embodiments provides a kind of method of data synchronization of smart machine, is applied to smart machine, comprising:
Obtain transmission data;
Transmission data are sent to and to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.
The third aspect, embodiments provides a kind of data synchronization unit of smart machine, and this device is configured at the control terminal be connected with smart machine, comprising:
Data acquisition module, for obtaining the control terminal list of transmission data and non-synchronous transmitting data;
Judge module, for judging whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then divides into groups the control terminal of non-synchronous transmitting data current in control terminal list; The control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data;
Data simultaneous module, for dividing into groups to each control terminal, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.
Fourth aspect, embodiments provides a kind of data synchronization unit of smart machine, and this device is configured at smart machine, comprising:
Data acquisition module, for obtaining transmission data;
Data transmission module, to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data for transmission data are sent to, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.
The data syn-chronization scheme of the smart machine that the embodiment of the present invention provides, when the control terminal quantity of non-synchronous transmitting data current in control terminal list is greater than 1, by the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups, and the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization, solve the problem that smart machine easily causes network congestion in data transmission procedure.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention one provides;
Fig. 2 is the data synchronization process schematic diagram of a kind of smart machine that the embodiment of the present invention one provides;
Fig. 3 is the data synchronization process schematic diagram of the another kind of smart machine that the embodiment of the present invention one provides;
Fig. 4 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention two provides;
Fig. 5 is the data synchronization process schematic diagram of a kind of smart machine that the embodiment of the present invention two provides;
Fig. 6 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention three provides;
Fig. 7 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention four provides;
Fig. 8 is the structured flowchart of the data synchronization unit of a kind of smart machine that the embodiment of the present invention five provides;
Fig. 9 is the structured flowchart of the data synchronization unit of a kind of smart machine that the embodiment of the present invention six provides.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not full content.
Before in further detail exemplary embodiment being discussed, it should be mentioned that some exemplary embodiments are described as the process or method described as flow chart.Although every step is described as the process of order by flow chart, many steps wherein can be implemented concurrently, concomitantly or simultaneously.In addition, the order of every step can be rearranged.When its step completes, described process can be terminated, but can also have the additional step do not comprised in the accompanying drawings.Described process can correspond to method, function, code, subroutine, subprogram etc.
Embodiment one
Fig. 1 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention one provides, the method of data synchronization of a kind of smart machine that the present embodiment provides, be applied to the control terminal be connected with smart machine, can be used for the situation of a large amount of transmission data syn-chronization to all control terminals be connected with smart machine.The method can be performed by the data synchronization unit of smart machine, and this device can adopt the form of hardware and/or software to realize.As shown in Figure 1, described method comprises:
The control terminal list of step 110, acquisition transmission data and non-synchronous transmitting data;
A smart machine can connect with multiple terminal, and each terminal can control described smart machine, connects and be called control terminal to the terminal that it controls with smart machine.The executive agent of aforesaid operations can be the control terminal of arbitrary non-synchronous transmitting data be connected with smart machine.As shown in Figure 2, control terminal A, B, C, D, E are all connected with smart machine X, and control terminal A will transmit data-pushing to after smart machine X, non-synchronous transmitting data in control terminal B, C, D, E.Therefore, smart machine X is by control terminal list B, C, D, E of described transmission data and non-synchronous transmitting data, send to any one control terminal (such as control terminal C) in control terminal list B, C, D, E of non-synchronous transmitting data, now control terminal C obtains the transmission data of smart machine X transmission and control terminal list B, C, D, E of non-synchronous transmitting data.Again such as, if smart machine X and control terminal A, B, C all synchronously have transmission data, the now control terminal list of non-synchronous transmitting data is control terminal D and E, and control terminal D receives the transmission data of control terminal C transmission and control terminal list D and E of non-synchronous transmitting data.
It should be noted that, aforesaid operations can be, the control terminal of non-synchronous transmitting data synchronously has the control terminal of transmission data to send request of data to described smart machine or, the control terminal list of transmission data and non-synchronous transmitting data is sent on the control terminal of the non-synchronous transmitting data sending request of data after synchronously having the control terminal of transmission data to receive described request of data by described smart machine or, can also be that smart machine or synchronously has the control terminal of transmission data initiatively the control terminal list of transmission data and non-synchronous transmitting data to be sent on the control terminal of the some non-synchronous transmitting data connected with smart machine.
Wherein, described control terminal can be smart mobile phone or panel computer, and described smart machine can be intelligent sound box etc.
Step 120, judge whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups; The control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data;
After obtaining the control terminal list of transmission data and non-synchronous transmitting data, this control terminal synchronously has transmission data, therefore need the control terminal list upgrading the non-synchronous transmitting data got, self is deleted from the control terminal list of described non-synchronous transmitting data.Then judge whether the control terminal quantity of current non-synchronous transmitting data is greater than 1, if be greater than 1, then the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups.If the control terminal quantity of current non-synchronous transmitting data equals 1 in control terminal list, then described transmission data are sent to the control terminal of current non-synchronous transmitting data in control terminal list, if the current control terminal that there is not non-synchronous transmitting data in control terminal list, then terminate to transmit the synchronous of data.
Step 130, each control terminal to be divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.
The control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, can be in the control terminal list of the non-synchronous transmitting data of current group, select a control terminal at random, and the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to a control terminal of Stochastic choice.Preferably, according to the control terminal tab sequential of non-synchronous transmitting data, give all control terminals be connected with smart machine by transmission data syn-chronization.The time sequencing that the control terminal tab sequential of non-synchronous transmitting data such as can be connected with smart machine according to control terminal is arranged.
The control terminal of the non-synchronous transmitting data be connected with smart machine performs aforesaid operations successively, until give all control terminals be connected with smart machine by transmission data syn-chronization, namely all control terminals be connected with smart machine all obtain transmission data.
More easily be understood to make the operating process of step 110, step 120 and step 130, now illustrate, exemplary, each control terminal that setting is connected with smart machine is provided with the application A PP that can control described smart machine, and each control terminal realizes the synchronous of transmission data by APP.As shown in Figure 3,9 control terminals are all connected with smart machine.The APP of the control smart machine of 9 control terminals is designated as APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8 and APP9 respectively.See Fig. 3, concrete data synchronization process is:
Corresponding step 110: the control terminal list (APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9) transmitting data and non-synchronous transmitting data initiatively can be sent to any one in APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8 and APP9 by smart machine also can be that any one active in APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8 and APP9 sends request of data to smart machine.Such as APP2 obtains the control terminal list (APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9) of transmission data in smart machine and non-synchronous transmitting data;
Then perform step 120:APP2 and judge control terminal list (APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9) in, whether the quantity of the control terminal of current non-synchronous transmitting data is greater than 1, now the control terminal of non-synchronous transmitting data is APP1, APP3, APP4, APP5, APP6, APP7, APP8, APP9, quantity is 8, meet the condition being greater than 1, then APP2 is by the control terminal APP1 of non-synchronous transmitting data current in control terminal list, APP3, APP4, APP5, APP6, APP7, APP8, APP9 divides into groups, two groups of APP1, APP3, APP4, APP5 are such as divided into, APP6, APP7, APP8, APP9.
Further execution step 130, for the grouping of each control terminal APP1, APP3, APP4, APP5; APP6, APP7, APP8, APP9, by current group control terminal list (APP1, APP3, APP4, APP5); (APP6, APP7, APP8, APP9) as the control terminal list of the non-synchronous transmitting data of current group, by the control terminal list (APP1, APP3, APP4, APP5) of the non-synchronous transmitting data of current group; (APP6, APP7, APP8, APP9) and transmission data send to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.Control terminal list (APP1, APP3, APP4, APP5) transmission of transmission data and non-synchronous transmitting data is given APP1 by such as APP2, gives APP6 by control terminal list (APP6, APP7, APP8, APP9) transmission of transmission data and non-synchronous transmitting data.
Then, APP1 and APP6 continues according to aforesaid operations synchronous transmitting data.Namely repeated execution of steps 110:APP1 obtains the transmission data of APP2 transmission and the control terminal list (APP1, APP3, APP4, APP5) of non-synchronous transmitting data, and APP6 obtains the transmission data of APP2 transmission and the control terminal list (APP6, APP7, APP8, APP9) of non-synchronous transmitting data.
Repeated execution of steps 120:APP1 judges whether the quantity of the control terminal of current non-synchronous transmitting data in control terminal list (APP1, APP3, APP4, APP5) is greater than 1, now the control terminal of non-synchronous transmitting data is APP3, APP4, APP5, quantity is 3, meet the condition being greater than 1, then control terminal APP3, APP4, APP5 of non-synchronous transmitting data current in control terminal list divide into groups by APP1; Two groups of APP3, APP4 are such as divided into; APP5.APP6 judges whether the quantity of the control terminal of current non-synchronous transmitting data in control terminal list (APP6, APP7, APP8, APP9) is greater than 1, now the control terminal of non-synchronous transmitting data is APP7, APP8, APP9, quantity is 3, meet the condition being greater than 1, then control terminal APP7, APP8, APP9 of non-synchronous transmitting data current in control terminal list divide into groups by APP6; Two groups of APP7, APP8 are such as divided into; APP9.
Further repeated execution of steps 130: each control terminal is divided into groups, using current group control terminal list (APP3, APP4) and (APP5) the control terminal list as the non-synchronous transmitting data of current group, the control terminal list (APP3, APP4) of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal by APP1, until give all control terminals be connected with smart machine by transmission data syn-chronization; Control terminal list (APP3, APP4) transmission of transmission data and non-synchronous transmitting data is given APP3 by such as APP1, and control terminal list (APP5) transmission of transmission data and non-synchronous transmitting data is given APP5 by APP1.Then, APP3 and APP5 continues according to aforesaid operations synchronous transmitting data.In the same way, control terminal list (APP7, APP8) transmission of transmission data and non-synchronous transmitting data is given APP7 by APP6, and control terminal list (APP9) transmission of transmission data and non-synchronous transmitting data is given APP9 by APP6.
Then, APP3, APP5, APP7 and APP9 continue according to aforesaid operations synchronous transmitting data.Namely repeated execution of steps 110:APP3 obtains the transmission data of APP1 transmission and the control terminal list (APP3, APP4) of non-synchronous transmitting data, APP5 obtains the transmission data of APP1 transmission and the control terminal list (APP5) of non-synchronous transmitting data, APP7 obtains the transmission data of APP6 transmission and the control terminal list (APP7, APP8) of non-synchronous transmitting data, and APP9 obtains the transmission data of APP6 transmission and the control terminal list (APP9) of non-synchronous transmitting data.
Repeated execution of steps 120:APP3 judges whether the quantity of the control terminal of current non-synchronous transmitting data in control terminal list (APP3, APP4) is greater than 1, now the control terminal of non-synchronous transmitting data is APP4, quantity is 1, do not meet the condition being greater than 1, therefore no longer divide into groups, transmission data are directly sent to APP4 by APP3.APP5 judges whether the control terminal quantity of current non-synchronous transmitting data in control terminal list (APP5) is greater than 1, now, does not have the control terminal of non-synchronous transmitting data in control terminal list, therefore terminates to transmit data synchronization process.APP7 judges whether the quantity of the control terminal of current non-synchronous transmitting data in control terminal list (APP7, APP8) is greater than 1, now the control terminal of non-synchronous transmitting data is APP8, quantity is 1, do not meet the condition being greater than 1, therefore no longer divide into groups, transmission data are directly sent to APP8 by APP7.APP9 judges the control terminal of current non-synchronous transmitting data in control terminal list (APP9), now, does not have the control terminal of non-synchronous transmitting data in control terminal list, therefore terminates to transmit data synchronization process.So far, the transmission data syn-chronization of all control terminals be connected with described smart machine is completed.
The method of data synchronization of the smart machine that the embodiment of the present invention provides, when the control terminal quantity of non-synchronous transmitting data current in control terminal list is greater than 1, by the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups, and the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization, solve the problem that smart machine easily causes network congestion in data transmission procedure.
It should be noted that, transmission data can be sent by bluetooth channel between each control terminal, can also WIFI channel transmission data be passed through.Connection between each control terminal and smart machine both can be that bluetooth connects can also be that WIFI connects.
Embodiment two
Fig. 4 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention two provides, the method of data synchronization of a kind of smart machine that the present embodiment provides, be applied to the control terminal be connected with smart machine, on the basis of embodiment one, the present embodiment is the optimization to embodiment one, specifically optimize the operation obtaining transmission data, the benefit optimized like this is when transmission data are very large time, further mitigates the network congestion situation of smart machine.As shown in Figure 4, described method comprises:
Step 210, obtain the control terminal list that smart machine divides transmission data block that described transmission data obtain and non-synchronous transmitting data in advance successively;
Wherein, in time transmitting data and be very large, for the ease of transmitting, smart machine can divide transmission data in advance, and transmission data are divided into much little transmission data blocks, described division can be average division, also can be other dividing mode.
Step 220, judge whether the control terminal quantity of current not synchronous described transmission data block in control terminal list is greater than 1 successively, if so, then the control terminal of not synchronous described transmission data block current in control terminal list is divided into groups;
Step 230, each control terminal to be divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data block of current group, the control terminal list of the non-synchronous transmitting data block of current group and transmission data block are sent to the control terminal in the list of current group control terminal, until all transmission data blocks are synchronized to all control terminals be connected with smart machine.
Such as, described smart machine is intelligent sound box, described transmission data are the list of songs in intelligent sound box, when there being 1000 song in list of songs, intelligent sound box can divide this 1000 song in advance, has such as on average been divided into 10 transmission data blocks, and each transmission data block comprises 100 first list of songs, described 10 transmission data blocks be designated as respectively G1, G2, G3 ... G10, has 100 songs in so each transmission data block; Control terminal is provided with the application A PP that can control described smart machine, and each control terminal realizes the synchronous of transmission data by APP.Suppose to connect with intelligent sound box and the control terminal not receiving described 1000 first list of songs has 9, the APP of the control intelligent sound box of 9 control terminals is designated as APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8 and APP9 respectively.Concrete transmission data synchronization process is see Fig. 5:
The first step, APP1 obtains the transmission data block G1 of intelligent sound box transmission and the control terminal list (APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9) of non-synchronous transmitting data block G1.Second step, APP1 judges control terminal list (APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9) in, whether the control terminal quantity of current not synchronous described transmission data block G1 is greater than 1, now the control terminal of not synchronous described transmission data block G1 is APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9, quantity is 8, meet the condition being greater than 1, then APP1 is by the control terminal APP2 of non-synchronous transmitting data block G1 current in control terminal list, APP3, APP4, APP5, APP6, APP7, APP8, APP9 divides into groups, two groups of APP2, APP3, APP4, APP5 are such as divided into, APP6, APP7, APP8, APP9.3rd step, for each control terminal grouping APP2, APP3, APP4, APP5; APP6, APP7, APP8, APP9, by current group control terminal list (APP2, APP3, APP4, APP5); (APP6, APP7, APP8, APP9) as the control terminal list of the non-synchronous transmitting data block G1 of current group, by the control terminal list (APP2, APP3, APP4, APP5) of the non-synchronous transmitting data block G1 of current group; (APP6, APP7, APP8, APP9) and transmission data block G1 send to the control terminal in the list of current group control terminal, until transmission data block G1 is synchronized to all control terminals be connected with smart machine.The control terminal list (APP2, APP3, APP4, APP5) of transmission data block G1 and non-synchronous transmitting data block G1 sends and gives APP2 by such as APP1, the control terminal list (APP6, APP7, APP8, APP9) of transmission data block G1 and non-synchronous transmitting data block G1 is sent and gives APP6.
Then, APP2 and APP6 continues according to aforesaid operations synchronous transmitting data.Namely repeat the first step: APP2 obtains the transmission data block G1 of APP1 transmission and the control terminal list (APP2, APP3, APP4, APP5) of non-synchronous transmitting data block G1, APP6 obtains the transmission data block G1 of APP1 transmission and the control terminal list (APP6, APP7, APP8, APP9) of non-synchronous transmitting data block G1.
Repeat second step: APP2 judges whether the quantity of the control terminal of current non-synchronous transmitting data block G1 in control terminal list (APP2, APP3, APP4, APP5) is greater than 1, now the control terminal of non-synchronous transmitting data block G1 is APP3, APP4, APP5, quantity is 3, meet the condition being greater than 1, then control terminal APP3, APP4, APP5 of non-synchronous transmitting data block G1 current in control terminal list divide into groups by APP2; Two groups of APP3, APP4 are such as divided into; APP5.APP6 judges whether the quantity of the control terminal of current non-synchronous transmitting data block G1 in control terminal list (APP6, APP7, APP8, APP9) is greater than 1, now the control terminal of non-synchronous transmitting data block G1 is APP7, APP8, APP9, quantity is 3, meet the condition being greater than 1, then control terminal APP7, APP8, APP9 of non-synchronous transmitting data block G1 current in control terminal list divide into groups by APP6; Two groups of APP7, APP8 are such as divided into; APP9.
Repeat the 3rd step further: each control terminal is divided into groups, using current group control terminal list (APP3, APP4) and (APP5) the control terminal list as the non-synchronous transmitting data block G1 of current group, the control terminal list (APP3, APP4) of the non-synchronous transmitting data block G1 of current group and transmission data block G1 are sent to the control terminal in the list of current group control terminal by APP2, until transmission data block G1 is synchronized to all control terminals be connected with smart machine; The control terminal list (APP3, APP4) of transmission data block G1 and non-synchronous transmitting data block G1 sends and gives APP3 by such as APP2, and the control terminal list (APP5) of transmission data block G1 and non-synchronous transmitting data block G1 sends and gives APP5 by APP2.Then, APP3 and APP5 continues according to aforesaid operations synchronous transmitting data block G1.In the same way, the control terminal list (APP7, APP8) of transmission data block G1 and non-synchronous transmitting data block G1 sends and gives APP7 by APP6, and the control terminal list (APP9) of transmission data block G1 and non-synchronous transmitting data block G1 sends and gives APP9 by APP6.
Then, APP3, APP5, APP7 and APP9 continue according to aforesaid operations synchronous transmitting data block G1.Namely the first step is repeated: APP3 obtains the transmission data block G1 of APP2 transmission and the control terminal list (APP3, APP4) of non-synchronous transmitting data block G1, APP5 obtains the transmission data block G1 of APP2 transmission and the control terminal list (APP5) of non-synchronous transmitting data block G1, APP7 obtains the transmission data block G1 of APP6 transmission and the control terminal list (APP7, APP8) of non-synchronous transmitting data block G1, and APP9 obtains the transmission data block G1 of APP6 transmission and the control terminal list (APP9) of non-synchronous transmitting data block G1.
Repeat second step: APP3 judges whether the quantity of the control terminal of current non-synchronous transmitting data block G1 in control terminal list (APP3, APP4) is greater than 1, now the control terminal of non-synchronous transmitting data block G1 is APP4, quantity is 1, do not meet the condition being greater than 1, therefore no longer divide into groups, transmission data block G1 is directly sent to APP4 by APP3.APP5 judges whether the control terminal quantity of current non-synchronous transmitting data block G1 in control terminal list (APP5) is greater than 1, now, there is no the control terminal of non-synchronous transmitting data in control terminal list, therefore terminate transmission data block G1 synchronizing process.APP7 judges whether the quantity of the control terminal of current non-synchronous transmitting data block G1 in control terminal list (APP7, APP8) is greater than 1, now the control terminal of non-synchronous transmitting data block G1 is APP8, quantity is 1, do not meet the condition being greater than 1, therefore no longer divide into groups, transmission data block G1 is directly sent to APP8 by APP7.APP9 judges the control terminal of current non-synchronous transmitting data block G1 in control terminal list (APP9), now, does not have the control terminal of non-synchronous transmitting data block G1, therefore terminate transmission data block G1 synchronizing process in control terminal list.So far, the transmission data block G1 completing all control terminals connected with described smart machine is synchronous.
Synchronous other transmission data blocks G2, G3......G10 give the principle of all methods with control terminal APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8 and APP9 that intelligent sound box connects and said method, flow process consistent.
Can ensure that all what see with the control terminal that intelligent sound box connects is being just the same in played songs and list of songs by said method, promote the operating experience of user.
The method of data synchronization of the smart machine that the embodiment of the present invention provides, first smart machine divides a large amount of transmission data, be divided into multiple little transmission data block, then in units of each transmission data block, data syn-chronization is carried out, until transmission data block to be synchronized to all control terminals be connected with smart machine, therefore, when transmitting data and being larger, the problem of smart machine network congestion can not also be caused.
Embodiment three
Fig. 6 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention three provides, and is applied to smart machine, when to can be used for a large amount of transmission data syn-chronization to all control terminals be connected with smart machine.The method can be performed by the data synchronization unit of smart machine, and this device can adopt the form of hardware and/or software to realize.As shown in Figure 6, described method comprises:
Step 310, acquisition transmission data;
Exemplary, above-mentioned steps can be, user to be sent to smart machine by some in the control terminal that connects with smart machine transmits data.
Step 320, transmission data are sent to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.
The method of data synchronization of the smart machine that the embodiment of the present invention provides, smart machine only by transmission data and need to connect with described smart machine and the control terminal list of not synchronous described transmission data is sent to the control terminal in described control terminal list, without the need to sending transmission data to all control terminals be attached thereto, all control terminal offices can be realized and can obtain transmission data, therefore, it is possible to solve the network congestion problem of smart machine in transmission data procedures.
Embodiment four
Fig. 7 is the method for data synchronization flow chart of a kind of smart machine that the embodiment of the present invention four provides, the method of data synchronization of a kind of smart machine that the present embodiment provides, be applied to and smart machine, the present embodiment is the optimization to embodiment three, adding described transmission Data Placement is the operation of multiple transmission data block, the benefit of such setting is when transmitting data and being larger, also can not cause the network congestion of smart machine.As shown in Figure 7, described method comprises:
Step 410, acquisition transmission data;
Step 420, be multiple transmission data block by described transmission Data Placement;
When transmitting data and being larger, for the ease of transmitting, smart machine can divide transmission data in advance, and transmission data are divided into much little transmission data blocks, described division can be average division, also can be other dividing mode.Certainly, if described transmission data are very little, transmit also very convenient, now need not divide it, or directly to can be understood as transmission Data Placement be 1 transmission data block.
Step 430, multiple transmission data block is sent to connect with described smart machine and a control terminal in the control terminal list of not synchronous described transmission data block successively, make described control terminal multiple transmission data block is synchronized to the remaining control terminal be connected with smart machine in described control terminal list successively.
The method of data synchronization of the smart machine that the embodiment of the present invention provides, first smart machine divides transmission data, be divided into multiple transmission data block, then in units of each transmission data block, data syn-chronization is carried out successively, each transmission data block is sent to and to connect with described smart machine and a control terminal in the control terminal list of not synchronous described transmission data block, described control terminal is made multiple transmission data block to be synchronized to the remaining control terminal be connected with smart machine in described control terminal list successively, for the situation that transmitted data amount is large, also the problem of smart machine network congestion can not be caused.
Embodiment five
Present embodiments provide a kind of structured flowchart of data synchronization unit of smart machine, be configured at the control terminal be connected with smart machine, as shown in Figure 8, this device specifically comprises: data acquisition module 510, judge module 520 and data simultaneous module 530.
Wherein, data acquisition module 510 is for obtaining the control terminal list of transmission data and non-synchronous transmitting data; The control terminal of non-synchronous transmitting data current in control terminal list, for judging whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then divides into groups by judge module 520; The control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data; Data simultaneous module 530 is for dividing into groups to each control terminal, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.
The data synchronization unit of the smart machine that the embodiment of the present invention provides, the control terminal quantity of current non-synchronous transmitting data in control terminal list is judged by judge module, when described quantity is greater than 1, lead to and the control terminal of non-synchronous transmitting data block current in control terminal list is divided into groups, by synchronization module the control terminal list of the non-synchronous transmitting data block of current group and transmission data block sent to the control terminal in the list of current group control terminal again, until transmission data block to be synchronized to all control terminals be connected with smart machine, solve when transmitted data amount is very large time, easily cause the problem of smart machine network congestion.
On the basis of above-described embodiment, optionally, data acquisition module 510 specifically for: obtain smart machine successively and divide the transmission data block that described transmission data obtain in advance.
Judge module 520 specifically for: judge whether the control terminal quantity of current not synchronous described transmission data block in control terminal list is greater than 1 successively, if so, then the control terminal of not synchronous described transmission data block current in control terminal list divided into groups.
Data simultaneous module 530 specifically for: each control terminal is divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data block of current group, the control terminal list of the non-synchronous transmitting data block of current group and transmission data block are sent to the control terminal in the list of current group control terminal, until all transmission data blocks are synchronized to all control terminals be connected with smart machine.
Embodiment six
Present embodiments provide a kind of structured flowchart of data synchronization unit of smart machine, be configured at smart machine, as shown in Figure 9, this device specifically comprises: data acquisition module 610 and data transmission module 620.
Wherein, data acquisition module 610 is for obtaining transmission data, data transmission module 620 to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data for transmission data being sent to, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.
The data synchronization unit of the smart machine that the embodiment of the present invention provides, by data transmission module the data that data acquisition module obtains are sent to and to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.Solve when transmitted data amount is very large time, easily cause the problem of smart machine network congestion.
Further, this device also comprises: Data Placement module, for being multiple transmission data block by described transmission Data Placement.
Accordingly, described data transmission module specifically for: multiple transmission data block is sent to connect with described smart machine and a control terminal in the control terminal list of not synchronous described transmission data block successively, make described control terminal multiple transmission data block is synchronized to the remaining control terminal be connected with smart machine in described control terminal list successively.
The said goods can perform the method that any embodiment of the present invention provides, and possesses the corresponding functional module of manner of execution and beneficial effect.The not ins and outs of detailed description in the present embodiment, the method that can provide see any embodiment of the present invention.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (10)

1. a method of data synchronization for smart machine, is characterized in that, is applied to the control terminal be connected with smart machine, comprises:
Obtain the control terminal list of transmission data and non-synchronous transmitting data;
Judge whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups; The control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data;
Each control terminal is divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.
2. method according to claim 1, is characterized in that, described acquisition transmission data, comprising:
Acquisition smart machine divides the transmission data block that described transmission data obtain in advance successively;
Describedly judge whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then the control terminal of non-synchronous transmitting data current in control terminal list is divided into groups; Each control terminal is divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization, comprising:
Judge whether the control terminal quantity of current not synchronous described transmission data block in control terminal list is greater than 1 successively, if so, then the control terminal of not synchronous described transmission data block current in control terminal list is divided into groups; Each control terminal is divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data block of current group, the control terminal list of the non-synchronous transmitting data block of current group and transmission data block are sent to the control terminal in the list of current group control terminal, until all transmission data blocks are synchronized to all control terminals be connected with smart machine.
3. method according to claim 1, is characterized in that, the described data syn-chronization that will transmit, to all control terminals be connected with smart machine, comprising:
According to the control terminal tab sequential of non-synchronous transmitting data, give all control terminals be connected with smart machine by transmission data syn-chronization.
4. method according to claim 1, is characterized in that, described transmission data are list of songs.
5. a method of data synchronization for smart machine, is characterized in that, is applied to smart machine, comprising:
Obtain transmission data;
Transmission data are sent to and to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.
6. method according to claim 5, it is characterized in that, transmission data are being sent to and are being connected and a control terminal of the control terminal list of non-synchronous transmitting data with described smart machine, make described control terminal transmit data syn-chronization to before the remaining control terminal be connected with smart machine in described control terminal list, also comprise:
Be multiple transmission data block by described transmission Data Placement;
Described transmission data being sent to connects and a control terminal of the control terminal list of not synchronous described transmission data with described smart machine, make described control terminal transmit data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, comprising:
Successively multiple transmission data block is sent to and to connect with described smart machine and a control terminal in the control terminal list of not synchronous described transmission data block, make described control terminal multiple transmission data block is synchronized to the remaining control terminal be connected with smart machine in described control terminal list successively.
7. a data synchronization unit for smart machine, is characterized in that, is configured at the control terminal be connected with smart machine, comprises:
Data acquisition module, for obtaining the control terminal list of transmission data and non-synchronous transmitting data;
Judge module, for judging whether the control terminal quantity of current non-synchronous transmitting data in control terminal list is greater than 1, if so, then divides into groups the control terminal of non-synchronous transmitting data current in control terminal list; The control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data;
Data simultaneous module, for dividing into groups to each control terminal, using the control terminal list of current group control terminal list as the non-synchronous transmitting data of current group, the control terminal list of the non-synchronous transmitting data of current group and transmission data are sent to the control terminal in the list of current group control terminal, until give all control terminals be connected with smart machine by transmission data syn-chronization.
8. device according to claim 7, is characterized in that, described data acquisition module specifically for:
Acquisition smart machine divides the transmission data block that described transmission data obtain in advance successively;
Described judge module specifically for: judge whether the control terminal quantity of current not synchronous described transmission data block in control terminal list is greater than 1 successively, if so, then the control terminal of not synchronous described transmission data block current in control terminal list divided into groups;
Described data simultaneous module specifically for: each control terminal is divided into groups, using the control terminal list of current group control terminal list as the non-synchronous transmitting data block of current group, the control terminal list of the non-synchronous transmitting data block of current group and transmission data block are sent to the control terminal in the list of current group control terminal, until all transmission data blocks are synchronized to all control terminals be connected with smart machine.
9. a data synchronization unit for smart machine, is characterized in that, is configured at smart machine, comprising:
Data acquisition module, for obtaining transmission data;
Data transmission module, to be connected with described smart machine and a control terminal in the control terminal list of non-synchronous transmitting data for transmission data are sent to, make described control terminal by transmission data syn-chronization to the remaining control terminal be connected with smart machine in described control terminal list, the control terminal of described non-synchronous transmitting data is the control terminal not obtaining transmission data.
10. device according to claim 9, is characterized in that, also comprises:
Data Placement module, for being multiple transmission data block by described transmission Data Placement;
Described data transmission module specifically for: multiple transmission data block is sent to connect with described smart machine and a control terminal in the control terminal list of not synchronous described transmission data block successively, make described control terminal multiple transmission data block is synchronized to the remaining control terminal be connected with smart machine in described control terminal list successively.
CN201510713304.7A 2015-10-27 2015-10-27 Data synchronization method and apparatus of intelligent device Pending CN105245619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510713304.7A CN105245619A (en) 2015-10-27 2015-10-27 Data synchronization method and apparatus of intelligent device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510713304.7A CN105245619A (en) 2015-10-27 2015-10-27 Data synchronization method and apparatus of intelligent device

Publications (1)

Publication Number Publication Date
CN105245619A true CN105245619A (en) 2016-01-13

Family

ID=55043116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510713304.7A Pending CN105245619A (en) 2015-10-27 2015-10-27 Data synchronization method and apparatus of intelligent device

Country Status (1)

Country Link
CN (1) CN105245619A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635254A (en) * 2017-09-22 2018-01-26 新华三技术有限公司 A kind of data transmission method and device
CN108271101A (en) * 2018-03-13 2018-07-10 广州国光音频科技有限公司 A kind of method for obtaining pull rod speaker song information and playing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247206A (en) * 2008-03-14 2008-08-20 深圳市戴文科技有限公司 Layered transmission method and control system of peer-to-peer network
CN101267458A (en) * 2008-04-29 2008-09-17 北京泰得思达科技发展有限公司 A data transmission method for storage system under network environment
CN102724121A (en) * 2012-06-20 2012-10-10 上海琥智数码科技有限公司 Distributed network data transmission method for LAN
US20130028121A1 (en) * 2011-07-29 2013-01-31 Rajapakse Ravi U Packet loss anticipation and pre emptive retransmission for low latency media applications
CN104539739A (en) * 2015-01-26 2015-04-22 浙江大学 System, method and device for uploading files

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247206A (en) * 2008-03-14 2008-08-20 深圳市戴文科技有限公司 Layered transmission method and control system of peer-to-peer network
CN101267458A (en) * 2008-04-29 2008-09-17 北京泰得思达科技发展有限公司 A data transmission method for storage system under network environment
US20130028121A1 (en) * 2011-07-29 2013-01-31 Rajapakse Ravi U Packet loss anticipation and pre emptive retransmission for low latency media applications
CN102724121A (en) * 2012-06-20 2012-10-10 上海琥智数码科技有限公司 Distributed network data transmission method for LAN
CN104539739A (en) * 2015-01-26 2015-04-22 浙江大学 System, method and device for uploading files

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635254A (en) * 2017-09-22 2018-01-26 新华三技术有限公司 A kind of data transmission method and device
CN108271101A (en) * 2018-03-13 2018-07-10 广州国光音频科技有限公司 A kind of method for obtaining pull rod speaker song information and playing

Similar Documents

Publication Publication Date Title
JP6017056B2 (en) File download method, file download apparatus, system, program, and recording medium
CN109496419B (en) File processing method, device and system
CN104601205A (en) Content sharing method and device
CN106155734B (en) Method and device for downloading software version
EP2474164A2 (en) Methods and systems to personalize content streams
CN110830970B (en) Audio transmission method, device, equipment and storage medium between Bluetooth equipment
CN108289232B (en) Control method of playing device, terminal device and storage medium
CN103077191B (en) Adaptive Web platform audio playing method and device
CN108809561B (en) Transmission method of synchronization signal block, network equipment and user equipment
CN104467928A (en) Method and equipment for cooperation between terminal equipment
CN109902056A (en) A kind of method, apparatus of serial transmission, equipment and computer readable storage medium
CN105245619A (en) Data synchronization method and apparatus of intelligent device
CN116016556A (en) Control method of screen projection system, display device and readable storage medium
CN110543428B (en) Application system testing method and device
CN111797015A (en) Testing method and device based on dynamic byte codes
CN113874850A (en) Synchronization of audio across multiple devices
CN105302752A (en) Connection method of audio equipment and audio playing device
CN111367220A (en) Internet of things equipment control method and device
CN106068635A (en) The method and apparatus that content is provided in a communications system
CN105338258B (en) A kind of video transmission method and equipment
CN109889922A (en) Retransmission method, device, equipment and the storage medium of stream medium data
CN105703987A (en) Control method and apparatus for audio and video playing system
CN103796277B (en) Method, system and device for indicating beacon frame sending and sending beacon frame
CN108173909B (en) Data synchronization method, mobile terminal and computer readable storage medium
CN103888586B (en) A kind of method transmitting data and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160113

RJ01 Rejection of invention patent application after publication