CN107040610B - Method of data synchronization, device, storage medium, terminal and server - Google Patents

Method of data synchronization, device, storage medium, terminal and server Download PDF

Info

Publication number
CN107040610B
CN107040610B CN201710393105.1A CN201710393105A CN107040610B CN 107040610 B CN107040610 B CN 107040610B CN 201710393105 A CN201710393105 A CN 201710393105A CN 107040610 B CN107040610 B CN 107040610B
Authority
CN
China
Prior art keywords
terminal
data
synchronized
server
target terminal
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.)
Expired - Fee Related
Application number
CN201710393105.1A
Other languages
Chinese (zh)
Other versions
CN107040610A (en
Inventor
林立安
刘金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201710393105.1A priority Critical patent/CN107040610B/en
Publication of CN107040610A publication Critical patent/CN107040610A/en
Application granted granted Critical
Publication of CN107040610B publication Critical patent/CN107040610B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the present invention provides a kind of method of data synchronization, device, storage medium, terminal and server.The method of data synchronization, comprising the following steps: send synchronization request to server, the synchronization request is used to request data to be synchronized to the server;The response message of the synchronization request is obtained from the server, the response message carries the device identification of one or more second terminals, and the data to be synchronized are stored in the second terminal;Determine that target terminal, the target terminal are located in the preset range of the first terminal from one or more of second terminals;The data to be synchronized are obtained from the target terminal;The data to be synchronized are obtained from the target terminal.The present invention has the beneficial effect for saving network flow.

Description

Method of data synchronization, device, storage medium, terminal and server
Technical field
The present invention relates to the communications field, more particularly to a kind of method of data synchronization, device, storage medium, terminal and Server.
Background technique
With the development of internet, cloud using more and more extensive.In the prior art, frequent user is often by hand Data in the terminals such as machine backup in Cloud Server, and the multiple terminals that often will appear user share a cloud account Situation.
When one of terminal needs to obtain the data of other terminal backups, can only be gone by network from the Cloud Server Middle downloading, data biggish for data volume are very big consumption for the flow of user, are unfavorable for reducing cost, and Also certain pressure can be generated to cloud server end.
Summary of the invention
The embodiment of the present invention provides a kind of method of data synchronization, device, storage medium, terminal and server, to save Network flow.
The embodiment of the present invention provides a kind of method of data synchronization, is applied in first terminal, the method includes following steps It is rapid:
Synchronization request is sent to server, the synchronization request is used to request data to be synchronized to the server;
The response message of the synchronization request is obtained from the server, the response message carries one or more The device identification of second terminal is stored with the data to be synchronized in the second terminal;
Determine that target terminal, the target terminal are located at the first terminal from one or more of second terminals Preset range in;
The data to be synchronized are obtained from the target terminal.
The embodiment of the present invention provides a kind of data synchronization unit, comprising:
First sending module, for sending synchronization request to server, the synchronization request to the server for asking Seek data to be synchronized;
First obtains module, and for obtaining the response message of the synchronization request from the server, the response disappears Breath carries the device identification of second terminal, is stored with the data to be synchronized in the second terminal;
First determining module, for determining target terminal from one or more of second terminals, the target is whole End is located in the preset range of the first terminal;
Second obtains module, for obtaining the data to be synchronized from the target terminal.
The embodiment of the present invention provides a kind of storage medium, is stored with a plurality of instruction, is applied in first terminal, feature exists In described instruction is loaded by processor and executes method described in any of the above embodiments.
A kind of terminal of the embodiment of the present invention, including memory, processor and storage are on a memory and can be on a processor The computer program of operation, the processor realize method described in any of the above embodiments when executing the computer program.
The embodiment of the present invention provides a kind of method of data synchronization, is applied in server, the described method comprises the following steps:
The synchronization request that first terminal is sent is received, the synchronization request is for requesting the data to be synchronized;
One or more second terminals are determined according to the synchronization request, are stored in the second terminal described to same Step data;
The device identification of each second terminal is sent to the first terminal.
The embodiment of the present invention provides a kind of server, including memory, processor and storage on a memory and can located The computer program run on reason device, the processor realize the above method when executing the computer program.
Detailed description of the invention
Fig. 1 is the schematic diagram of a scenario of the method for data synchronization and device in one embodiment of the present invention.
Fig. 2 is the first flow chart of the method for data synchronization in one embodiment of the present invention.
Fig. 3 is second of flow chart of the method for data synchronization in one embodiment of the present invention.
Fig. 4 is the third flow chart of the method for data synchronization in one embodiment of the present invention.
Fig. 5 is the first structure chart of the data synchronization unit in one embodiment of the present invention.
Fig. 6 is second of structure chart of the data synchronization unit in one embodiment of the present invention.
Fig. 7 is the third structure chart of the data synchronization unit in one embodiment of the present invention.
Fig. 8 is the 4th kind of structure chart of the data synchronization unit in one embodiment of the present invention.
Fig. 9 is the first structure chart of the terminal in one embodiment of the present invention.
Figure 10 is second of structure chart of the terminal in one embodiment of the present invention.
Figure 11 is the flow chart of the method for data synchronization in one embodiment of the present invention.
Figure 12 is the structure chart of the data synchronization unit in one embodiment of the present invention.
Figure 13 is the structure chart of the server in one embodiment of the present invention.
Specific embodiment
Schema is please referred to, wherein identical component symbol represents identical component, the principle of the present invention is to implement one It is illustrated in computing environment appropriate.The following description be based on illustrated by the specific embodiment of the invention, should not be by It is considered as the limitation present invention other specific embodiments not detailed herein.
In the following description, specific embodiments of the present invention will refer to the operation as performed by one or multi-section computer The step of and symbol illustrate, unless otherwise stating clearly.Therefore, these steps and operation be will appreciate that, mentioned for several times wherein having It include by representing with the computer disposal list of the electronic signal of the data in a structuring pattern to be executed by computer Member is manipulated.At this manipulation transforms data or the position being maintained in the memory system of the computer, it can match again Set or in addition change in a manner familiar to those skilled in the art the running of the computer.The maintained data knot of the data Structure is the provider location of the memory, has the specific feature as defined in the data format.But the principle of the invention is with above-mentioned Text illustrates, is not represented as a kind of limitation, those skilled in the art will appreciate that plurality of step as described below and Operation also may be implemented in hardware.
Fig. 1 and Fig. 2 is please referred to, Fig. 1 is the schematic diagram of a scenario of a method of data synchronization and device of the invention;The data are same One step process and device are mainly used in terminal, such as in the mobile terminals such as mobile phone, IPAD.
Fig. 2 is the flow chart of the method for data synchronization in one embodiment of the present invention.The method of data synchronization is for the In one terminal, the method for data synchronization the following steps are included:
S101, synchronization request is sent to server, the synchronization request is used to request data to be synchronized to the server.
Wherein, first terminal sends synchronization request to server by internet.It is carried in the synchronization request to be synchronized The Data Identification of data.After server receives the synchronization request, the Data Identification of data to be synchronized is extracted.
S102, the response message that the synchronization request is obtained from the server, the response message carry one Or the device identification of multiple second terminals, the data to be synchronized are stored in the second terminal.
Wherein, establishing in server has concordance list.It is stored with the mapping relations of Backup Data and terminal in the concordance list, leads to It crosses the concordance list and can find certain Backup Data and be present in which terminal.Therefore, server can be according to the data to be synchronized Data Identification one or more second terminals are inquired from concordance list, the data to be synchronized are stored in the second terminal. The quantity of the second terminal may be one, it is also possible to be multiple.
S103, target terminal is determined from one or more of second terminals, the target terminal is located at described the In the preset range of one terminal.
Wherein, which can refer to the effective range of short-distance wireless communication, can also refer to short-distance wireless communication The preferable range of communication quality.
If second terminal number be it is multiple, may there are some second terminals to be located in the preset range of first terminal, have Some second terminals are located at outside the preset range of first terminal.Therefore it needs to pick out one second from multiple second terminal It is whole can to select suitable target as target terminal by first terminal and the location information of each second terminal for terminal End.Wherein, the number of the target terminal can be one, or multiple.
S104, the data to be synchronized are obtained from the target terminal.
In this step, which establishes short-distance wireless according to the device identification and the target terminal of target terminal Communication connection, for example, Bluetooth communication, ZigBee communication etc..After first terminal and the target terminal establish connection, from the target Data to be synchronized are obtained at terminal.
From the foregoing, it will be observed that method of data synchronization provided in an embodiment of the present invention by send synchronization request to server, it is described Synchronization request is used to request data to be synchronized to the server;The response that the synchronization request is obtained from the server disappears Breath, the response message carries the device identification of one or more second terminals, be stored in the second terminal it is described to Synchrodata;Determine that target terminal, the target terminal are located at described first eventually from one or more of second terminals In the preset range at end;The data to be synchronized are obtained from the target terminal;To complete data simultaneously operating, has and save The beneficial effect of flow.
Fig. 3 is the flow chart of the method for data synchronization in one embodiment of the present invention.The method of data synchronization is for the In one terminal, the method for data synchronization the following steps are included:
S201, when detecting synchronous triggering signal, the data volume of data to be synchronized is obtained.
In this step, the data to be synchronized generally can be lteral data, image data or application software, for example, It can be batch photo.After user logs in cloud account, after choosing data to be synchronized in the list of user interface, it can generate same Trigger signal is walked, which generates synchronization request for triggering the first terminal.In some embodiments, in the use The Data Identification for not only needing synchrodata in the list at family interface, need the data volume of synchrodata.For example, as user crowd When amount has selected 100 photos as synchrodata, the data volume of 100 photos is added to obtain by first terminal automatically The data volume of data to be synchronized.
If the data volume of S202, data to be synchronized is greater than predetermined value, synchronization request is generated.
It is to be appreciated that can directly pass through internet from service if the data volume of data to be synchronized is less than predetermined value Device obtains data to be synchronized.The predetermined value can be set as 20MB or 30MB etc..
In this step, the synchronization request of the generation is used to request data to be synchronized to the server.
S203, synchronization request is sent to server, the synchronization request is used to request data to be synchronized to the server.
Wherein, first terminal sends synchronization request to server by internet.It is carried in the synchronization request to be synchronized The Data Identification of data.After server receives the synchronization request, the Data Identification of data to be synchronized is extracted.
S204, the response message that the synchronization request is obtained from the server, the response message carry one Or the device identification of multiple second terminals, the data to be synchronized are stored in the second terminal.
Wherein, establishing in server has concordance list.It is stored with the mapping relations of Backup Data and terminal in the concordance list, leads to It crosses the concordance list and can find certain Backup Data and be present in which terminal.Therefore, server can be according to the data to be synchronized Data Identification one or more second terminals are inquired from concordance list, the data to be synchronized are stored in the second terminal. The quantity of the second terminal may be one, it is also possible to be multiple.
It is to be appreciated that there is no second with the data to be synchronized for discovery if server is by search index table Terminal then directly gives the data to be synchronized to the first terminal by the Internet transmission.
S205, target terminal is determined from one or more of second terminals, the target terminal is located at described the In the preset range of one terminal.
Wherein, which can refer to the effective range of short-distance wireless communication, can also refer to short-distance wireless communication The preferable range of communication quality.
If the number of second terminal is multiple (i.e. at least two), there may be some second terminals to be located at first terminal In preset range, there are some second terminals to be located at outside the preset range of first terminal.Therefore, it is necessary to pick out a second terminal As target terminal, suitable target terminal can be selected by first terminal and the location information of each second terminal.
In some embodiments, step S205 includes:
S2051, the second location information for obtaining each second terminal.
The second location information, which can be, to be loaded directly into the response message of server returned according to synchronization request, the One terminal can extract the second location information of each second terminal from the response message.Certainly, first terminal can be sent out Send inquiry request to server, which is used to request the second location information of each second terminal to server.
S2052, the first location information for obtaining the first terminal.Wherein, first terminal can be fixed by included GPS Position module obtains itself first location information.
S2053, second location information and first location information according to each second terminal, determine target terminal.
Wherein, step S2053 may include:
Determine that target terminal, the target terminal are according to the first location information and the second location information The second terminal nearest apart from the first terminal.Since distance is close it is thus possible to improve communication quality and speed.
Step S2053 can also include:
A, at least one terminal to be selected is determined according to the first location information and the second location information, it is described Terminal to be selected is located in the preset range of the first terminal.It in this step, can be by calculating each second terminal and the The distance between one terminal determines terminal to be selected.
B, the terminal characteristic information of each terminal to be selected is obtained, the terminal characteristic information includes the place of terminal to be selected Manage device occupancy and/or information about power.
C, target terminal is determined from least one described terminal to be selected according to the terminal characteristic information.
Wherein, when the terminal characteristic information only includes electricity, then the terminal to be selected for selecting electricity most sufficient is as mesh Mark terminal.When the terminal characteristic information only includes processor occupancy, then the terminal to be selected that selects occupancy minimum as Target terminal.When the terminal characteristic information includes processor occupancy and electricity, then the target terminal is that electricity is greater than in advance The minimum terminal to be selected of processor occupancy in the terminal to be selected of definite value.
In further embodiments, first terminal has communication list, which is located at first terminal for storing Preset range in terminal device identification.Step S205 includes:
S2054, at least one terminal to be selected, institute are determined from one or more of second terminals according to communication list Terminal to be selected is stated to be located in the preset range of the first terminal.Under normal circumstances, when terminal opens short-distance wireless communication When function, the device identification for the terminal that can be communicated will be searched out automatically in its communication list and store the device identification In communication list.
S2055, target terminal is determined from least one terminal to be selected.
In step S2055, first terminal obtains the signal strength indication for each terminal to be selected that first terminal detects. The signal strength indication stores and in the communication list;Then, it is determined from least one terminal to be selected according to signal strength indication Target terminal out.Wherein, which is the maximum terminal to be selected of signal strength indication.
S206, the data to be synchronized are obtained from the target terminal.
In this step, connection request directly can be sent to target terminal by first terminal to establish connection.It can also To send link order to target terminal by server, the target terminal and first terminal is then made to establish connection.
As shown in figure 4, step S206 includes:
S2061, it is established with target terminal after short-distance wireless communication connect, receives the number to be synchronized that target terminal is sent According to, and real-time detection connection status during receiving data to be synchronized.Due to that may go out during receiving data The case where showing target terminal and leave efficient communication range, or being shut down due to not enough power supply, receiving data to be synchronized During want real-time detection connection status, it is corresponding in order to be carried out when disconnecting and data to be synchronized do not finish receiving Operation.
S2062, when detect connection disconnect and data receiver to be synchronized do not complete when, judge the data volume of not received data Whether threshold value is greater than.It can calculate and not connect according to the total amount of data size of data to be synchronized and the data volume being currently received Receive the data volume of data.The threshold value can be 10MB, 20MB etc..
If the data volume of S2063 not received data is greater than threshold value, as data to be synchronized and executed using not received data The step of sending synchronization request to server, that is to say and go to step S203.
In this step, if the data volume of not received data is greater than threshold value, using not received data as number to be synchronized According to executing operation since step S203.
If the data volume of S2064, not received data in data to be synchronized is less than or equal to threshold value, synchronization request is sent To server to obtain not received data to be synchronized from server.If the data volume of not received data is little, will not waste Too many flow can be obtained directly from server by network.
From the foregoing, it will be observed that method of data synchronization provided in an embodiment of the present invention by send synchronization request to server, it is described Synchronization request is used to request data to be synchronized to the server;The response that the synchronization request is obtained from the server disappears Breath, the response message carries the device identification of one or more second terminals, be stored in the second terminal it is described to Synchrodata;Determine that target terminal, the target terminal are located at described first eventually from one or more of second terminals In the preset range at end;The data to be synchronized are obtained from the target terminal;To complete data simultaneously operating, has and save The beneficial effect of flow.
Referring to figure 5., Fig. 5 is the data synchronization unit in one embodiment of the present invention, the data synchronization unit 300 packet Include: the first sending module 301, first obtains module 302, the first determining module 303 and second obtains module 304.
Wherein, for sending synchronization request to server, the synchronization request is used for described first sending module 301 Server requests data to be synchronized.When first terminal sends synchronization request to server by internet.It is taken in the synchronization request Data Identification with data to be synchronized.After server receives the synchronization request, the Data Identification of data to be synchronized is extracted.
First acquisition module 302 is used to obtain the response message of the synchronization request, the response from the server Message carries the device identification of second terminal, and the data to be synchronized are stored in the second terminal.Wherein, in server Foundation has concordance list.It is stored with the mapping relations of Backup Data and terminal in the concordance list, certain can be found by the concordance list Which terminal Backup Data is present in.Therefore, server can be according to the Data Identification of the data to be synchronized from concordance list One or more second terminals are inquired, the data to be synchronized are stored in the second terminal.The quantity of the second terminal may It is one, it is also possible to be multiple.
First determining module 303 from one or more of second terminals for determining target terminal, the target Terminal is located in the preset range of the first terminal.Wherein, which can refer to effective model of short-distance wireless communication It encloses, can also refer to the preferable range of the communication quality of short-distance wireless communication.
In the one or more second terminal, there may be some second terminals to be located in the preset range of first terminal, have Some second terminals are located at outside the preset range of first terminal;Therefore it needs to pick out one from the one or more second terminal For a second terminal as target terminal, it is suitable to be selected by first terminal and the location information of each second terminal Target terminal.
Second, which obtains module 304, is used to obtain the data to be synchronized from the target terminal.The first terminal is according to mesh The device identification of mark terminal is established short-distance wireless communication with the target terminal and is connect, for example, Bluetooth communication, ZigBee communication Deng.After first terminal and the target terminal establish connection, data to be synchronized are obtained from the target terminal.
In some embodiments, as shown in fig. 6, first determining module 303 includes: first acquisition unit 3031, second Acquiring unit 3032 and the first determination unit 3033.
Wherein, which is used to obtain the second location information of each second terminal.Some In embodiment, which, which can be, is loaded directly into the response message of server returned according to synchronization request, First terminal can extract the second location information of each second terminal from the response message.In further embodiments, First terminal can send inquiry request to server, which is used to request the second of each second terminal to server Location information.
Wherein, which is used to obtain the first location information of the first terminal.Wherein, this first Determination unit 3033 is used to determine target terminal according to the first location information and the second location information.Actually answer In, the first determination unit 3033 according to the second location information and the first location information of each second terminal, Determine target terminal.Wherein, the first determination unit 3033 can determine target terminal by two ways.
Method one: first terminal can be according to first location information and second location information, will be apart from first terminal most Close second terminal is determined as target terminal.
Method two: first terminal obtains the terminal characteristic information of each terminal to be selected, which includes to be selected The processor occupancy and information about power of terminal;First terminal is true from least one terminal to be selected according to terminal characteristic information Make target terminal.Wherein, which is that the processor occupancy that electricity is greater than in the terminal to be selected of predetermined value is minimum Terminal to be selected.
In further embodiments, as shown in fig. 7, first determining module 303 includes: to check unit 3034 and second Determination unit 3035.
Wherein, unit 3034 is checked for checking the communication list of the terminal, with whole from one or more of second At least one terminal to be selected is determined in end, the communication list is used to store in the preset range of the first terminal The device identification of terminal, the terminal to be selected are located in the preset range of the first terminal.Second determination unit 3035 is used In target terminal determining from least one described terminal to be selected.Second determination unit 3035 is for obtaining the first terminal The signal strength indication of each terminal to be selected detected;According to the signal strength indication from least one described terminal to be selected Middle determining target terminal.
The second acquisition module 304 includes detection unit, judging unit, trigger unit.
Detection unit is connecing for after establishing connection with target terminal, receiving the data to be synchronized that target terminal is sent Receive real-time detection connection status during data to be synchronized.
Judging unit is used to judge not received data when detecting that connection disconnects and data receiver to be synchronized does not complete Whether data volume is greater than threshold value;
If data volume of the trigger unit for not received data is greater than threshold value, using not received data as data to be synchronized And it triggers the first sending module and sends synchronization request to server.
In further embodiments, Fig. 8 is please referred to, which can also include that a third obtains module 305 and generation module 306.
Wherein, third obtains module 305 for obtaining the data volume of data to be synchronized when detecting synchronous triggering signal. If data volume of the generation module 306 for data to be synchronized is greater than predetermined value, synchronization request is generated.
The embodiment of the invention also provides a kind of storage mediums, are stored with a plurality of instruction, are applied in first terminal, described Instruction is loaded by processor and executes any of the above-described method as described in the examples.
Fig. 9 is please referred to, the embodiment of the invention also provides a kind of terminal 400, which includes memory 401, processing Device 402 and it is stored in the computer program that can be run on the memory 401 and on the processor 402, the processor 402 is held The method in above-described embodiment is realized when the row computer program.Such as execute following steps:
Synchronization request is sent to server, the synchronization request is used to request data to be synchronized to the server;
The response message of the synchronization request is obtained from the server, the response message carries one or more The device identification of second terminal is stored with the data to be synchronized in the second terminal;
Determine that target terminal, the target terminal are located at the first terminal from one or more of second terminals Preset range in;
The data to be synchronized are obtained from the target terminal.
Please refer to Figure 10, the embodiment of the present invention also provides a kind of terminal 500, the terminal 500 may include radio frequency (RF, Radio Frequency) circuit 501, the memory 502, defeated that includes one or more computer readable storage medium Enter unit 503, display unit 504, sensor 505, voicefrequency circuit 506, Wireless Fidelity (WiFi, Wireless Fidelity) The components such as module 507, the processor 508 for including one or more than one processing core and power supply 509.This field skill Art personnel are appreciated that the restriction of the not structure paired terminal of terminal structure shown in Figure 10, may include than illustrate it is more or Less component perhaps combines certain components or different component layouts.Wherein:
RF circuit 501 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 508 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuit 501 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses Family identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier (LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuit 501 can also by wireless communication with network and its He communicates equipment.Any communication standard or agreement, including but not limited to global system for mobile telecommunications system can be used in the wireless communication Unite (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 502 can be used for storing software program and module, and processor 508 is stored in memory 502 by operation Software program and module, thereby executing various function application and data processing.Memory 502 can mainly include storage journey Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function Such as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created data according to terminal (such as audio data, phone directory etc.) etc..In addition, memory 502 may include high-speed random access memory, can also include Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memory 502 can also include Memory Controller, to provide processor 508 and input unit 503 to memory 502 Access.
Input unit 503 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, in a specific embodiment In, input unit 503 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or touching Control plate, collect user on it or nearby touch operation (such as user using any suitable object such as finger, stylus or Operation of the attachment on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to preset formula It sets.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined The touch orientation of user is surveyed, and detects touch operation bring signal, transmits a signal to touch controller;Touch controller from Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 508, and can reception processing Order that device 508 is sent simultaneously is executed.Furthermore, it is possible to a variety of using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes touch sensitive surface.In addition to touch sensitive surface, input unit 503 can also include other input equipments.Specifically, other are defeated Entering equipment can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse One of mark, operating stick etc. are a variety of.
Display unit 504 can be used for showing information input by user or be supplied to user information and terminal it is various Graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.Display Unit 504 may include display panel, optionally, can using liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further , touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, send processing to Device 508 is followed by subsequent processing device 508 and is provided on a display panel accordingly according to the type of touch event to determine the type of touch event Visual output.Although touch sensitive surface and display panel are to realize input and defeated as two independent components in Figure 10 Enter function, but in some embodiments it is possible to touch sensitive surface and display panel is integrated and realizes and outputs and inputs function.
Terminal may also include at least one sensor 505, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel, proximity sensor can close display panel and/or back when terminal is moved in one's ear Light.As a kind of motion sensor, gravity accelerometer can detect (generally three axis) acceleration in all directions Size can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 506, loudspeaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 506 can By the electric signal after the audio data received conversion, it is transferred to loudspeaker, voice signal output is converted to by loudspeaker;It is another The voice signal of collection is converted to electric signal by aspect, microphone, is converted to audio data after being received by voicefrequency circuit 506, then After the processing of audio data output processor 508, it is sent to such as another terminal through RF circuit 501, or by audio data Output is further processed to memory 502.Voicefrequency circuit 506 is also possible that earphone jack, with provide peripheral hardware earphone with The communication of terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 507 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Figure 10 is shown WiFi module 507, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely Become in the range of the essence of invention and omits.
Processor 508 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and/or module being stored in memory 502, and call and be stored in memory 502 Data execute the various functions and processing data of terminal, to carry out integral monitoring to mobile phone.Optionally, processor 508 can wrap Include one or more processing cores;Preferably, processor 508 can integrate application processor and modem processor, wherein answer With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication. It is understood that above-mentioned modem processor can not also be integrated into processor 508.
Terminal further includes the power supply 509 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system and processor 508 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system Etc. functions.Power supply 509 can also include one or more direct current or AC power source, recharging system, power failure inspection The random components such as slowdown monitoring circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., and details are not described herein.Specifically in this implementation In example, the processor 508 in terminal can be corresponding by the process of one or more application program according to following instruction Executable file is loaded into memory 502, and the application program being stored in memory 502 is run by processor 508, from And realize following functions:
Synchronization request is sent to server, the synchronization request is used to request data to be synchronized to the server;
The response message of the synchronization request is obtained from the server, the response message carries one or more The device identification of second terminal is stored with the data to be synchronized in the second terminal;
Determine that target terminal, the target terminal are located at the first terminal from one or more of second terminals Preset range in;
The data to be synchronized are obtained from the target terminal.
Figure 11 is please referred to, the embodiment of the invention also provides a kind of method of data synchronization, are applied in server, the data Synchronous method the following steps are included:
S601, the synchronization request that first terminal is sent is received, the synchronization request is for requesting the data to be synchronized;
S602, one or more second terminals are determined according to the synchronization request, is stored in the second terminal State data to be synchronized;
S603, the device identification of each second terminal is sent to the first terminal.
Method of data synchronization provided in an embodiment of the present invention has the beneficial effect for saving flow.
Figure 12 is please referred to, the embodiment of the invention also provides a kind of data synchronization units, comprising: receiving module 701, second Determining module 702 and sending module 703.
Receiving module 701 is used to receive the synchronization request of first terminal transmission, the synchronization request for request it is described to Synchrodata;Second determining module 702 is used to determine one or more second terminals according to the synchronization request, described second The data to be synchronized are stored in terminal;Sending module 703 is for the device identification of each second terminal to be sent to The first terminal.
Figure 13 is please referred to, the embodiment of the invention also provides a kind of server, including memory 801, processor 802 and is deposited The computer program that can be run on memory 801 and on processor 802 is stored up, the processor 802 executes the computer The above method is realized when program, such as executes following methods:
The synchronization request that first terminal is sent is received, synchronization request is for requesting data to be synchronized;
One or more second terminals are determined according to synchronization request, and data to be synchronized are stored in second terminal;
The device identification of each second terminal is sent to first terminal.
Server provided in an embodiment of the present invention has the beneficial effect for saving flow.
There is provided herein the various operations of embodiment.In one embodiment, one or more operations can be with structure It, will be so that eventually when being executed by electronic equipment at the computer-readable instruction stored on one or more computer-readable mediums End executes the operation.The sequence for describing some or all of operations should not be construed as to imply that these operations necessarily sequence phase It closes.It will be appreciated by those skilled in the art that the alternative sequence of the benefit with this specification.Furthermore, it is to be understood that not being All operations must exist in each embodiment provided in this article.
Moreover, word " preferred " used herein means serving as example, example or illustration.Feng Wen is described as " preferably " any aspect or design be not necessarily to be construed as than other aspect or design it is more advantageous.On the contrary, the use purport of word " preferred " Concept is being proposed in specific ways.Term "or" as used in this application is intended to mean the "or" for including and non-excluded "or".That is, unless specified otherwise or clear from the context, " X uses A or B " means that nature includes any one of arrangement. That is, if X uses A;X uses B;Or X uses A and B both, then " X uses A or B " is met in aforementioned any example.
Moreover, although the disclosure, this field skill has shown and described relative to one or more implementations Art personnel will be appreciated that equivalent variations and modification based on the reading and understanding to the specification and drawings.The disclosure include it is all this The modifications and variations of sample, and be limited only by the scope of the following claims.In particular, to by said modules (such as element, Resource etc.) the various functions that execute, term for describing such components is intended to correspond to the specified function for executing the component The random component (unless otherwise instructed) of energy (such as it is functionally of equal value), even if illustrated herein with execution in structure The disclosure exemplary implementations in function open structure it is not equivalent.In addition, although the special characteristic of the disclosure Through being disclosed relative to the only one in several implementations, but this feature can with such as can be to given or specific application For be expectation and one or more other features combinations of other advantageous implementations.Moreover, with regard to term " includes ", " tool Have ", " containing " or its deformation be used in specific embodiments or claims for, such term be intended to with term The similar mode of "comprising" includes.
Each functional unit in the embodiment of the present invention can integrate in a processing module, be also possible to each unit list It is solely physically present, can also be integrated in two or more units in a module.Above-mentioned integrated module can both use Formal implementation of hardware can also be realized in the form of software function module.If the integrated module is with software function The form of module is realized and when sold or used as an independent product, also can store in computer-readable storage Jie In matter.Storage medium mentioned above can be read-only memory, disk or CD etc..Above-mentioned each device or system, can be with Execute the method in correlation method embodiment.
In conclusion although the present invention has been disclosed above in the preferred embodiment, but above preferred embodiment is not to limit The system present invention, those skilled in the art can make various changes and profit without departing from the spirit and scope of the present invention Decorations, therefore protection scope of the present invention subjects to the scope of the claims.

Claims (19)

1. a kind of method of data synchronization is applied in first terminal, which is characterized in that the described method comprises the following steps:
Synchronization request is sent to server, the synchronization request is used to request data to be synchronized to the server;
The response message of the synchronization request is obtained from the server, the response message carries one or more second The device identification of terminal is stored with the data to be synchronized in the second terminal;
Determine that target terminal, the target terminal are located at the pre- of the first terminal from one or more of second terminals If in range;
The data to be synchronized are obtained from the target terminal;
It is described from the target terminal obtain the data to be synchronized the step of include:
After establishing connection with target terminal, the data to be synchronized that target terminal is sent are received, and in the mistake for receiving data to be synchronized The connection status of target terminal described in real-time detection and the first terminal in journey;
When the connection disconnection for detecting the target terminal and the first terminal, and the data receiver to be synchronized does not complete When, judge whether the data volume of not received data is greater than threshold value;
If the data volume of the not received data is greater than threshold value, hair as data to be synchronized and is executed using the not received data The step of sending synchronization request to server.
2. method of data synchronization according to claim 1, which is characterized in that the number of the second terminal is at least two A, described the step of determining target terminal from one or more of second terminals, includes:
Obtain the second location information of each second terminal;
Obtain the first location information of the first terminal;
According to the second location information and the first location information of each second terminal, target end is determined End.
3. method of data synchronization according to claim 2, which is characterized in that it is described according to the first location information and The step of second location information determines target terminal include:
According to the first location information and the second location information, by the second terminal nearest apart from the first terminal It is determined as target terminal.
4. method of data synchronization according to claim 2, which is characterized in that it is described according to the first location information and The step of second location information determines target terminal include:
At least one terminal to be selected, the end to be selected are determined according to the first location information and the second location information End is located in the preset range of the first terminal;
The terminal characteristic information of each terminal to be selected is obtained, the terminal characteristic information includes the processing of the terminal to be selected Device occupancy and/or information about power;
Target terminal is determined from least one described terminal to be selected according to the terminal characteristic information.
5. method of data synchronization according to claim 1, which is characterized in that the first terminal includes communication list, institute The device identification that communication list is used to store the terminal being located in the preset range of the first terminal is stated, the second terminal Number is at least two, and described the step of determining target terminal from one or more of second terminals includes:
At least one terminal to be selected is determined from one or more of second terminals according to the communication list;
Target terminal is determined from least one described terminal to be selected.
6. method of data synchronization according to claim 5, which is characterized in that described from least one described terminal to be selected The step of determining target terminal include:
Obtain the signal strength indication for each terminal to be selected that the first terminal detects;
Target terminal is determined from least one described terminal to be selected according to the signal strength indication.
7. method of data synchronization according to claim 1, which is characterized in that the step for sending synchronization request to server Before rapid, further includes:
When detecting synchronous triggering signal, the data volume of data to be synchronized is obtained;
If the data volume of data to be synchronized is greater than predetermined value, synchronization request is generated.
8. a kind of data synchronization unit, described device is applied to first terminal characterized by comprising
First sending module, for sending synchronization request to server, the synchronization request be used for server request to Synchrodata;
First obtains module, and for obtaining the response message of the synchronization request from the server, the response message is taken Device identification with one or more second terminals is stored with the data to be synchronized in the second terminal;
First determining module, for determining target terminal, the target terminal position from one or more of second terminals In in the preset range of the first terminal;
Second obtains module, for obtaining the data to be synchronized from the target terminal, comprising: establish connection with target terminal Afterwards, the data to be synchronized that target terminal is sent are received, and target described in real-time detection is whole during receiving data to be synchronized The connection status at end and the first terminal;When the connection for detecting the target terminal and the first terminal disconnects, and institute State data receiver to be synchronized do not complete when, judge whether the data volume of not received data is greater than threshold value;
First sending module is also used to: if the data volume of the not received data is greater than threshold value, not receiving number with described According to as data to be synchronized, synchronization request is sent to server.
9. data synchronization unit according to claim 8, which is characterized in that first determining module includes:
First acquisition unit, for obtaining the second location information of each second terminal;
Second acquisition unit, for obtaining the first location information of the first terminal;
First determination unit, for according to each second terminal second location information and the first position Information determines target terminal.
10. data synchronization unit according to claim 9, which is characterized in that first determination unit is used for according to institute First location information and the second location information are stated, the second terminal nearest apart from the first terminal is determined as target Terminal.
11. data synchronization unit according to claim 9, which is characterized in that first determination unit is used for according to institute It states first location information and the second location information determines that at least one terminal to be selected, the terminal to be selected are located at described In the preset range of first terminal, and obtain the terminal characteristic information of each terminal to be selected, the terminal characteristic information packet Include the processor occupancy and/or information about power of terminal to be selected;And for according to the terminal characteristic information from it is described at least Target terminal is determined in one terminal to be selected.
12. data synchronization unit according to claim 8, which is characterized in that the first terminal includes communication list, institute Communication list is stated for storing the device identification for the terminal being located in the preset range of the first terminal, described first determines mould Block includes:
Unit is checked, for determining that at least one is to be selected from one or more of second terminals according to the communication list Terminal, the terminal to be selected are located in the preset range of the first terminal;
Second determination unit, for determining target terminal from least one described terminal to be selected.
13. data synchronization unit according to claim 12, which is characterized in that second determination unit is used for:
Obtain the signal strength indication for each terminal to be selected that the first terminal detects;
Target terminal is determined from least one described terminal to be selected according to the signal strength indication.
14. a kind of terminal, which is characterized in that including memory, processor and be stored on the memory and can be in processor The computer program of upper operation, the processor realize side as claimed in claim 1 when executing the computer program Method.
15. a kind of storage medium is stored with a plurality of instruction, it is applied in first terminal, which is characterized in that described instruction is by handling Device load and the perform claim requirement described in any item methods of 1-7.
16. a kind of method of data synchronization is applied in server, which is characterized in that the described method comprises the following steps:
The synchronization request that first terminal is sent is received, the synchronization request is for requesting data to be synchronized;
One or more second terminals are determined according to the synchronization request, and the number to be synchronized is stored in the second terminal According to;
The device identification of each second terminal is sent to the first terminal, so that the first terminal is wanted according to right It asks the described in any item methods of 1-7 to determine target terminal, and obtains the data to be synchronized from the target terminal.
17. a kind of data synchronization unit characterized by comprising
Receiving module, for receiving the synchronization request of first terminal transmission, the synchronization request is for requesting data to be synchronized;
Second determining module, for determining one or more second terminals according to the synchronization request, in the second terminal It is stored with the data to be synchronized;
Sending module, for the device identification of each second terminal to be sent to the first terminal, so that described first Terminal determines target terminal according to the described in any item methods of claim 1-7, and from the target terminal described in acquisition Data to be synchronized.
18. a kind of server, which is characterized in that on a memory and can be on a processor including memory, processor and storage The computer program of operation, the processor realize the method described in claim 16 when executing the computer program.
19. a kind of storage medium is stored with a plurality of instruction, it is applied in server, which is characterized in that described instruction is by processor Load method described in simultaneously perform claim requirement 16.
CN201710393105.1A 2017-05-27 2017-05-27 Method of data synchronization, device, storage medium, terminal and server Expired - Fee Related CN107040610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710393105.1A CN107040610B (en) 2017-05-27 2017-05-27 Method of data synchronization, device, storage medium, terminal and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710393105.1A CN107040610B (en) 2017-05-27 2017-05-27 Method of data synchronization, device, storage medium, terminal and server

Publications (2)

Publication Number Publication Date
CN107040610A CN107040610A (en) 2017-08-11
CN107040610B true CN107040610B (en) 2019-10-25

Family

ID=59540546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710393105.1A Expired - Fee Related CN107040610B (en) 2017-05-27 2017-05-27 Method of data synchronization, device, storage medium, terminal and server

Country Status (1)

Country Link
CN (1) CN107040610B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108627173B (en) * 2018-06-01 2020-12-22 Oppo广东移动通信有限公司 Navigation method, navigation device, terminal, navigation server and storage medium
CN110166562B (en) * 2019-05-24 2022-04-05 东软集团股份有限公司 Data synchronization method and device, storage medium and electronic equipment
CN112187842B (en) * 2019-07-04 2024-04-09 北京京东振世信息技术有限公司 Local area network data processing system and local area network data processing method
CN110782985B (en) * 2019-10-25 2021-08-17 腾讯科技(深圳)有限公司 Feature processing method and related equipment
CN111506439B (en) * 2020-04-08 2024-04-09 北京兰格云商科技有限公司 Data acquisition method and device, storage medium and mobile terminal
CN113347233B (en) * 2021-05-20 2022-09-20 深圳软牛科技有限公司 Method, device, equipment and storage medium for extracting call and WIFI data from cloud
CN114567645A (en) * 2022-03-01 2022-05-31 深圳市潮流网络技术有限公司 Backup method and device between communication devices, computer device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725691A (en) * 2004-07-23 2006-01-25 腾讯科技(深圳)有限公司 Data download method and system
CN101425899A (en) * 2007-10-31 2009-05-06 北大方正集团有限公司 Method and system for publishing and distributing implementation
CN103533093A (en) * 2012-11-30 2014-01-22 Tcl集团股份有限公司 Data transmission method and system based on voices
CN104754618A (en) * 2013-12-31 2015-07-01 索尼公司 Wireless data transmission method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NZ727697A (en) * 2014-06-30 2022-05-27 Baxter Corp Englewood Managed medical information exchange

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725691A (en) * 2004-07-23 2006-01-25 腾讯科技(深圳)有限公司 Data download method and system
CN101425899A (en) * 2007-10-31 2009-05-06 北大方正集团有限公司 Method and system for publishing and distributing implementation
CN103533093A (en) * 2012-11-30 2014-01-22 Tcl集团股份有限公司 Data transmission method and system based on voices
CN104754618A (en) * 2013-12-31 2015-07-01 索尼公司 Wireless data transmission method and device

Also Published As

Publication number Publication date
CN107040610A (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN107040610B (en) Method of data synchronization, device, storage medium, terminal and server
CN104518953B (en) Method for deleting message, instant communication terminal and system
CN106412093B (en) A kind of method for uploading of data, apparatus and system
CN104519485B (en) Communication means, device and system between a kind of terminal
WO2020077485A1 (en) Geo-fence updating method, and communication device
CN107276602B (en) Radio frequency interference processing method, device, storage medium and terminal
CN106375582B (en) Vibration control method and device
CN106484326B (en) A kind of data transmission processing method and mobile terminal
CN105302452A (en) Gesture interaction-based operation method and device
CN106162811B (en) Method and device for establishing network connection
EP3105912B1 (en) Application-based service providing method and system
CN103399706A (en) Page interaction method, device and terminal
CN106681884B (en) A kind of monitoring method and device of system calling
CN103197944A (en) Method for determining performance of process of application program and computer system
CN103488720A (en) Method, system and client for viewing data
CN111274463B (en) Information display method, device and storage medium based on IM contact person grouping setting
CN109348425B (en) Positioning information updating method, device, equipment and storage medium
CN105354067B (en) A kind of interface configuration method and device
CN105022621A (en) Method and device for collecting session message and terminal
CN104965825A (en) Method and terminal for processing data
CN108234275B (en) Method and device for releasing communication information
CN106777383B (en) File sorting method and intelligent terminal
CN106454728B (en) A kind of network control method of terminal applies, device and terminal
CN115065609A (en) B-end SaaS system hybrid deployment method and system
CN105872041B (en) The processing method and processing device of operation object

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191025

CF01 Termination of patent right due to non-payment of annual fee