CN108011882B - Method, device and system for data synchronization - Google Patents

Method, device and system for data synchronization Download PDF

Info

Publication number
CN108011882B
CN108011882B CN201711265221.1A CN201711265221A CN108011882B CN 108011882 B CN108011882 B CN 108011882B CN 201711265221 A CN201711265221 A CN 201711265221A CN 108011882 B CN108011882 B CN 108011882B
Authority
CN
China
Prior art keywords
terminal
data
server
login mode
login
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711265221.1A
Other languages
Chinese (zh)
Other versions
CN108011882A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711265221.1A priority Critical patent/CN108011882B/en
Publication of CN108011882A publication Critical patent/CN108011882A/en
Application granted granted Critical
Publication of CN108011882B publication Critical patent/CN108011882B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The disclosure relates to a method, a device and a system for data synchronization, and belongs to the technical field of computers. The method comprises the following steps: receiving a data downloading request sent by a terminal; if the current login mode of the terminal is a safe login mode, sending data which are not stored in the terminal to the terminal, wherein the safe login mode is a login mode for performing two-step verification; and if the current login mode of the terminal is a common login mode, no data which are not stored in the terminal are sent to the terminal, wherein the common login mode is a login mode without two-step verification. By adopting the method and the device, the safety can be improved.

Description

Method, device and system for data synchronization
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for data synchronization.
Background
With the development of computer technology, terminals such as mobile phones and tablet computers are widely applied, the types of application programs on the corresponding terminals are more and more, the functions are more and more abundant, and the multi-functionality of the terminals brings great convenience to the life of people.
People use the terminal, so that a large amount of personal data (such as data like photos) is stored in the terminal, in order to store the personal data, the terminal often stores the personal data in the terminal into the server to realize backup, and meanwhile, data uploaded to the server by other terminals can be synchronized into the terminal to realize synchronization of data in multiple terminals. Before the terminal and the server perform data synchronization, the terminal can perform authentication through a pre-registered user name and a pre-registered password (wherein, the login mode can be called as a common login mode), when the user name and the password input by the user are correct, the terminal can successfully log in the server, and further, the data synchronization between the terminal and the server can be realized, namely, data which is not stored in the terminal can be downloaded to the server, and the data which is not stored in the server can be uploaded to the server.
In carrying out the present disclosure, the inventors found that at least the following problems exist:
based on the login mode, the terminal only carries out verification through the user name and the password, and when the password is broken by other users, the other users can download the personal data uploaded by the user to the server through the terminal, so that the safety is low.
Disclosure of Invention
In order to overcome the problem of low security in the related art, the present disclosure provides a method, an apparatus, and a system for data synchronization. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for data synchronization, the method including:
receiving a data downloading request sent by a terminal;
if the current login mode of the terminal is a safe login mode, sending data which are not stored in the terminal to the terminal, wherein the safe login mode is a login mode for performing two-step verification;
and if the current login mode of the terminal is a common login mode, no data which are not stored in the terminal are sent to the terminal, wherein the common login mode is a login mode without two-step verification.
Optionally, the method further includes:
receiving a data uploading request sent by the terminal, wherein the data uploading request carries data to be backed up;
and storing the data to be backed up carried in the data uploading request.
Optionally, the method further includes:
when a data inquiry request sent by the terminal is received, if data which are not stored in the terminal exist in a server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for data synchronization, the method including:
determining that data which is not stored in the terminal exists in the server;
if the current login mode is a safe login mode, sending a data downloading request to the server, wherein the safe login mode is a login mode for performing two-step verification;
if the current login mode is a common login mode, no data downloading request is sent to the server, wherein the common login mode is a login mode without two-step verification;
and when data which are not stored in the terminal and transmitted by the server are received, storing the data which are not stored in the terminal.
Optionally, the method further includes:
when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
Optionally, the determining that data not stored in the terminal exists in the server includes:
sending a data inquiry request to the server every time a preset inquiry period is reached;
and when receiving a data confirmation message which is sent by the server and corresponds to the data inquiry request, determining that data which is not stored in the terminal exists in the server.
According to a third aspect of embodiments of the present disclosure, there is provided a server, including:
the receiving module is used for receiving a data downloading request sent by the terminal;
the sending module is used for sending data which is not stored in the terminal to the terminal if the current login mode of the terminal is a safe login mode, wherein the safe login mode is a login mode for performing two-step verification; and if the current login mode of the terminal is a common login mode, no data which are not stored in the terminal are sent to the terminal, wherein the common login mode is a login mode without two-step verification.
Optionally, the receiving module is further configured to:
receiving a data uploading request sent by the terminal, wherein the data uploading request carries data to be backed up;
and storing the data to be backed up carried in the data uploading request.
Optionally, the sending module is further configured to:
when a data inquiry request sent by the terminal is received, if data which are not stored in the terminal exist in a server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a terminal, including:
the determining module is used for determining that data which are not stored in the terminal exist in the server;
the sending module is used for sending a data downloading request to the server if the current login mode is a safe login mode, wherein the safe login mode is a login mode for performing two-step verification; if the current login mode is a common login mode, no data downloading request is sent to the server, wherein the common login mode is a login mode without two-step verification;
and the storage module is used for storing the data which are not stored in the terminal when receiving the data which are not stored in the terminal and are sent by the server.
Optionally, the sending module is further configured to:
when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
Optionally, the determining module is configured to:
sending a data inquiry request to the server every time a preset inquiry period is reached;
and when receiving a data confirmation message which is sent by the server and corresponds to the data inquiry request, determining that data which is not stored in the terminal exists in the server.
According to a fifth aspect of embodiments of the present disclosure, there is provided a server comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the method for data synchronization according to the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method for data synchronization according to the first aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a terminal comprising a processor and a memory, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the method for data synchronization according to the second aspect.
According to an eighth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method for data synchronization according to the second aspect.
According to a ninth aspect of the embodiments of the present disclosure, there is provided a system for data synchronization, the system including a terminal and a server, wherein: the server, as described in the third aspect; the terminal, as claimed in the fourth aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, when the server receives a data download request sent by the terminal, if the current login mode of the terminal is a secure login mode, the server may send data that is not stored in the terminal to the terminal, and if the current login mode is a normal login mode, the data that is not stored in the terminal is no longer sent to the terminal, where the normal login mode is a login mode in which two-step authentication is not performed, and the secure login mode is a login mode in which two-step authentication is performed. Thus, when the terminal is in a normal login mode, the server does not allow the terminal to download the personal data stored in the server, and therefore, the security can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. In the drawings:
FIG. 1 is a flow chart illustrating a method of data synchronization in accordance with an exemplary embodiment;
FIG. 2 is a system architecture diagram illustrating an exemplary embodiment;
FIG. 3 is a schematic diagram illustrating the structure of a server in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating a terminal according to an exemplary embodiment;
FIG. 5 is a schematic diagram illustrating the structure of a server in accordance with an exemplary embodiment;
fig. 6 is a schematic diagram illustrating a structure of a terminal according to an exemplary embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
An exemplary embodiment of the present disclosure provides a method for data synchronization, which may be implemented by a terminal and a server together, where the terminal may be a terminal having a data synchronization function, such as a mobile phone, a tablet computer, and the like. The server may be a background server for the data synchronization function.
The terminal may include a processor, memory, transceiver, etc. The processor may be a CPU (Central Processing Unit), and may be used to determine the related Processing of the current login manner of the terminal. The Memory may be a RAM (Random Access Memory), a Flash (Flash Memory), and the like, and may be configured to store received data, data required by the processing procedure, data generated in the processing procedure, and the like, such as data sent by the server. The transceiver may be used for data transmission with other devices, for example, to receive data not stored in the terminal transmitted by the server, and may include an antenna, a matching circuit, a modem, and the like.
The server may include a processor, memory, transceiver, etc. The processor may be a CPU or the like, and may be used for processing related to determining a current login manner of the terminal. The memory may be a RAM, a Flash, or the like, and may be used to store received data, data required by the processing procedure, data generated in the processing procedure, or the like, such as data backed up by the terminal. The transceiver may be used for data transmission with a terminal or other server, e.g., to transmit data not stored in the terminal to the terminal, and may include an antenna, matching circuit, modem, etc.
The process flow shown in fig. 1 will be described in detail below with reference to the embodiments, and the contents may be as follows:
in step 101, the terminal determines that data not stored in the terminal exists in the server.
In implementation, a user can trigger the terminal to log in the server through operation in the process of using the terminal, wherein the terminal can log in the server through a common login mode or a safe login mode. Specifically, when a user wants to trigger the terminal to log in the server, the user can display a login mode selection interface by operating the trigger terminal, wherein a common login button corresponding to a common login mode and a safety login button corresponding to a safety login mode can be displayed in the login mode selection interface, and the user can select the corresponding login button according to the needs of the user. When a user clicks a common login button, the terminal can log in the server through user name and password authentication, when the user clicks a safe login button, the terminal performs two-step authentication (such as inputting an authentication code) besides authentication through the user name and the password, wherein in the login process, when the terminal sends a login request to the server, the login request can carry the user name and the password (and the authentication code), in addition, the login request can also carry a login mode identifier, and after the login is successful, the terminal and the server can record the current login mode of the terminal.
After the terminal logs in the server, the terminal may detect whether data that is not stored in the terminal exists in the server (i.e., data that is backed up to the server by another terminal), and when data that is not stored in the terminal exists in the server, the terminal may determine that data that is not stored in the terminal exists in the server.
In step 102, if the current login mode is a secure login mode, the terminal sends a data download request to the server, wherein the secure login mode is a login mode for performing two-step authentication.
In implementation, when the terminal determines that data which is not stored in the terminal exists in the server, whether the current login mode of the terminal is a normal login mode or a secure login mode may be determined, and if the current login mode is the secure login mode, the terminal may send a data download request to the server, as shown in fig. 2.
In step 103, if the current login mode is a normal login mode, the terminal does not send a data download request to the server, where the normal login mode is a login mode without performing the two-step authentication.
In implementation, when the terminal determines that data which is not stored in the terminal exists in the server, if the current login mode of the terminal is a common login mode, the terminal may not send a data download request to the server any more. In this way, when the current login mode is a login mode with low security, the terminal can not download data to the server any more so as to protect personal data stored in the server.
Optionally, the terminal may further upload data that is not backed up in the server and is stored in the terminal to the server, and correspondingly, the terminal may further perform the following processing: when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
In implementation, in the using process of the terminal, the terminal may further detect whether new data is generated in the terminal, that is, whether data that is not backed up in the server exists in the terminal, and when detecting that data that is not backed up in the server exists in the terminal, the terminal may send a data upload request to the server, where the data upload request may carry data to be backed up.
Optionally, the terminal may determine whether data not stored in the terminal exists in the server by querying the server, and accordingly, the processing procedure of step 101 may be as follows: sending a data inquiry request to a server every time a preset inquiry period is reached; when a data confirmation message corresponding to the data inquiry request transmitted by the server is received, it is determined that data not stored in the terminal exists in the server.
In implementation, the terminal may be preset with an inquiry period, and each time the preset inquiry period is reached, the terminal may send a data inquiry request to the server, where the data inquiry request is used to inquire whether data that is not stored in the terminal exists in the server. Correspondingly, after the server receives the data inquiry request, if data which is not stored in the terminal exists in the server, the server can send a data confirmation message corresponding to the data inquiry request to the terminal. The terminal may receive a data confirmation message corresponding to the data inquiry request sent by the server, and at this time, the terminal may determine that data not stored in the terminal exists in the server.
In step 104, the server receives a data download request sent by the terminal.
In implementation, after the terminal sends the data download request to the server, the server may receive the data download request sent by the terminal.
In step 105, if the current login mode of the terminal is a secure login mode, the server sends data not stored in the terminal to the terminal, wherein the secure login mode is a login mode for performing two-step authentication.
In implementation, after receiving a data download request sent by a terminal, a server may determine whether a current login manner of the terminal is a normal login manner or a secure login manner, and if the current login manner is the secure login manner, the server may respond to the data download request sent by the terminal, that is, the server may send data that is not stored in the terminal to the terminal.
In step 106, if the current login mode of the terminal is a normal login mode, the server does not send data which is not stored in the terminal to the terminal, wherein the normal login mode is a login mode without two-step verification.
In implementation, after the server receives the data download request sent by the terminal, if the current login mode of the terminal is the normal login mode, the server may not respond to the data download request sent by the terminal, that is, no data not stored in the terminal is sent to the terminal. In this way, when the current login method is a login method with low security, data which is not stored in the terminal is not sent to the terminal so as to protect personal data stored in the server.
Optionally, for a situation that the terminal sends a data upload request to the server, correspondingly, the server may further perform the following processing: receiving a data uploading request sent by a terminal, wherein the data uploading request carries data to be backed up; and storing the data to be backed up carried in the data uploading request.
In implementation, after the terminal sends the data upload request to the server, the server may receive the data upload request sent by the terminal, and may analyze the data upload request to obtain the data to be backed up carried in the data upload request. After the data to be backed up is acquired, the server can store the data to be backed up carried in the data uploading request so as to backup the data to be backed up.
Optionally, for a case that the terminal sends a data query request to the server, correspondingly, the server may further perform the following processing: when a data inquiry request sent by a terminal is received, if data which is not stored in the terminal exists in a server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
In implementation, after the terminal sends the data query request to the server, the server may receive the data query request sent by the terminal, and further, the server may determine whether data that is not stored in the terminal exists in the server, and if data that is not stored in the terminal exists in the server, the server may send a data confirmation message corresponding to the data query request to the terminal, so that after the terminal receives the data confirmation message, it is determined that data that is not stored in the terminal exists in the server.
In step 107, when data not stored in the terminal transmitted by the server is received, the data not stored in the terminal is stored.
In an implementation, when the server sends data not stored in the terminal to the terminal, after the server sends the data not stored in the terminal to the terminal, the terminal may receive the data not stored in the terminal sent by the server, and further, the terminal may store the data not stored in the terminal.
According to the scheme, the terminal and the server simultaneously support two login modes, namely a common login mode and a safe login mode, when the current login mode is the safe login mode, the terminal can download data which are not stored in the terminal to the server, when the current login mode is the common login mode, the terminal cannot download the data which are not stored in the terminal to the server, and no matter whether the current login mode is the safe login mode or the common login mode, the terminal can upload data which are not backed up in the server to the server. Therefore, when the terminal receiving the verification code is not at the user, the terminal can successfully log in the server so as to realize the backup of the data in the terminal. When the current login mode is the common login mode, the terminal is not allowed to download the data in the server, so that the safety can be improved.
In the embodiment of the disclosure, when the server receives a data download request sent by the terminal, if the current login mode of the terminal is a secure login mode, the server may send data that is not stored in the terminal to the terminal, and if the current login mode is a normal login mode, the data that is not stored in the terminal is no longer sent to the terminal, where the normal login mode is a login mode in which two-step authentication is not performed, and the secure login mode is a login mode in which two-step authentication is performed. Thus, when the terminal is in a normal login mode, the server does not allow the terminal to download the personal data stored in the server, and therefore, the security can be improved.
Yet another exemplary embodiment of the present disclosure provides a server, as shown in fig. 3, including:
a receiving module 310, configured to receive a data download request sent by a terminal;
a sending module 320, configured to send data that is not stored in the terminal to the terminal if the current login manner of the terminal is a secure login manner, where the secure login manner is a login manner for performing two-step verification; and if the current login mode of the terminal is a common login mode, no data which are not stored in the terminal are sent to the terminal, wherein the common login mode is a login mode without two-step verification.
Optionally, the receiving module 310 is further configured to:
receiving a data uploading request sent by the terminal, wherein the data uploading request carries data to be backed up;
and storing the data to be backed up carried in the data uploading request.
Optionally, the sending module 320 is further configured to:
when a data inquiry request sent by the terminal is received, if data which are not stored in the terminal exist in a server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
Based on the same technical concept, still another exemplary embodiment of the present disclosure provides a terminal, as shown in fig. 4, including:
a determining module 410, configured to determine that data not stored in the terminal exists in the server;
a sending module 420, configured to send a data download request to the server if the current login manner is a secure login manner, where the secure login manner is a login manner for performing two-step verification; if the current login mode is a common login mode, no data downloading request is sent to the server, wherein the common login mode is a login mode without two-step verification;
and a storage module 430, configured to store data that is not stored in the terminal when receiving data that is not stored in the terminal and sent by the server.
Optionally, the sending module 420 is further configured to:
when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
Optionally, the determining module 410 is configured to:
sending a data inquiry request to the server every time a preset inquiry period is reached;
and when receiving a data confirmation message which is sent by the server and corresponds to the data inquiry request, determining that data which is not stored in the terminal exists in the server.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In the embodiment of the disclosure, when the server receives a data download request sent by the terminal, if the current login mode of the terminal is a secure login mode, the server may send data that is not stored in the terminal to the terminal, and if the current login mode is a normal login mode, the data that is not stored in the terminal is no longer sent to the terminal, where the normal login mode is a login mode in which two-step authentication is not performed, and the secure login mode is a login mode in which two-step authentication is performed. Thus, when the terminal is in a normal login mode, the server does not allow the terminal to download the personal data stored in the server, and therefore, the security can be improved.
It should be noted that: in the data synchronization device according to the above embodiment, only the division of the functional modules is illustrated when performing data synchronization, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the terminal or the server may be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for performing data synchronization and the method for performing data synchronization provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Yet another exemplary embodiment of the present disclosure shows a system for data synchronization, the system including a terminal and a server, wherein: the server, such as the server described in FIG. 3; the terminal is the terminal shown in figure 4.
In the embodiment of the disclosure, when the server receives a data download request sent by the terminal, if the current login mode of the terminal is a secure login mode, the server may send data that is not stored in the terminal to the terminal, and if the current login mode is a normal login mode, the data that is not stored in the terminal is no longer sent to the terminal, where the normal login mode is a login mode in which two-step authentication is not performed, and the secure login mode is a login mode in which two-step authentication is performed. Thus, when the terminal is in a normal login mode, the server does not allow the terminal to download the personal data stored in the server, and therefore, the security can be improved.
Fig. 5 is a block diagram illustrating an apparatus 1900 for data synchronization according to an example embodiment. For example, the apparatus 1900 may be provided as a server. Referring to fig. 5, the device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method of data synchronization.
The device 1900 may also include a power component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input/output (I/O) interface 1958. The device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Device 1900 may include memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors include instructions for:
receiving a data downloading request sent by a terminal;
if the current login mode of the terminal is a safe login mode, sending data which are not stored in the terminal to the terminal, wherein the safe login mode is a login mode for performing two-step verification;
and if the current login mode of the terminal is a common login mode, no data which are not stored in the terminal are sent to the terminal, wherein the common login mode is a login mode without two-step verification.
Optionally, the method further includes:
receiving a data uploading request sent by the terminal, wherein the data uploading request carries data to be backed up;
and storing the data to be backed up carried in the data uploading request.
Optionally, the method further includes:
when a data inquiry request sent by the terminal is received, if data which are not stored in the terminal exist in a server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
In the embodiment of the disclosure, when the server receives a data download request sent by the terminal, if the current login mode of the terminal is a secure login mode, the server may send data that is not stored in the terminal to the terminal, and if the current login mode is a normal login mode, the data that is not stored in the terminal is no longer sent to the terminal, where the normal login mode is a login mode in which two-step authentication is not performed, and the secure login mode is a login mode in which two-step authentication is performed. Thus, when the terminal is in a normal login mode, the server does not allow the terminal to download the personal data stored in the server, and therefore, the security can be improved.
Yet another exemplary embodiment of the present disclosure shows a structural diagram of a terminal. The terminal may be a mobile phone or the like.
Referring to fig. 6, terminal 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the terminal 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the terminal 600. Examples of such data include instructions for any application or method operating on terminal 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 606 provides power to the various components of terminal 600. Power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for audio output device 600.
The multimedia component 608 comprises a screen providing an output interface between the terminal 600 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal 600 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the audio output device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing various aspects of status assessment for the terminal 600. For example, sensor component 614 can detect an open/closed state of terminal 600, relative positioning of components, such as a display and keypad of terminal 600, change in position of terminal 600 or a component of terminal 600, presence or absence of user contact with terminal 600, orientation or acceleration/deceleration of terminal 600, and temperature change of terminal 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the terminal 600 and other devices in a wired or wireless manner. The terminal 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the terminal 600 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of a terminal, enable the terminal to perform a method of data synchronization, the method comprising:
determining that data which is not stored in the terminal exists in the server;
if the current login mode is a safe login mode, sending a data downloading request to the server, wherein the safe login mode is a login mode for performing two-step verification;
if the current login mode is a common login mode, no data downloading request is sent to the server, wherein the common login mode is a login mode without two-step verification;
and when data which are not stored in the terminal and transmitted by the server are received, storing the data which are not stored in the terminal.
Optionally, the method further includes:
when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
Optionally, the determining that data not stored in the terminal exists in the server includes:
sending a data inquiry request to the server every time a preset inquiry period is reached;
and when receiving a data confirmation message which is sent by the server and corresponds to the data inquiry request, determining that data which is not stored in the terminal exists in the server.
In the embodiment of the disclosure, when the server receives a data download request sent by the terminal, if the current login mode of the terminal is a secure login mode, the server may send data that is not stored in the terminal to the terminal, and if the current login mode is a normal login mode, the data that is not stored in the terminal is no longer sent to the terminal, where the normal login mode is a login mode in which two-step authentication is not performed, and the secure login mode is a login mode in which two-step authentication is performed. Thus, when the terminal is in a normal login mode, the server does not allow the terminal to download the personal data stored in the server, and therefore, the security can be improved.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1. A method for data synchronization, the method comprising:
receiving a data downloading request sent by a terminal;
if the current login mode of the terminal is a safe login mode, sending data which are not stored in the terminal to the terminal, wherein the safe login mode is a login mode for performing two-step verification, and the login mode for performing two-step verification comprises inputting a verification code;
if the current login mode of the terminal is a common login mode, data which are not stored in the terminal are not sent to the terminal, wherein the common login mode is a login mode which is not subjected to two-step verification;
when a user wants to trigger the terminal to log in a server, the user triggers the terminal to display a login mode selection interface through operation, a common login button corresponding to the common login mode and a safety login button corresponding to the safety login mode are displayed in the login mode selection interface, the user selects the corresponding login button according to the own needs to select the current login mode, when the terminal sends a login request to the server in the login process, the login request carries a login mode identifier, and after the login is successful, the terminal and the server record the current login mode of the terminal;
the method further comprises the following steps:
when a data inquiry request sent to a server by the terminal every time a preset inquiry period is reached is received, if data which are not stored in the terminal exist in the server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
2. The method of claim 1, further comprising:
receiving a data uploading request sent by the terminal, wherein the data uploading request carries data to be backed up;
and storing the data to be backed up carried in the data uploading request.
3. A method for data synchronization, the method comprising:
determining that data which is not stored in the terminal exists in the server;
if the current login mode is a safe login mode, sending a data downloading request to the server, wherein the safe login mode is a login mode for performing two-step verification, and the login mode for performing two-step verification comprises inputting a verification code;
if the current login mode is a common login mode, no data downloading request is sent to the server, wherein the common login mode is a login mode without two-step verification;
when data which are not stored in the terminal and sent by the server are received, the data which are not stored in the terminal are stored;
when a user wants to trigger the terminal to log in the server, the user triggers the terminal to display a login mode selection interface through operation, a common login button corresponding to the common login mode and a safety login button corresponding to the safety login mode are displayed in the login mode selection interface, the user selects the corresponding login button according to the own needs to select the current login mode, in the login process, when the terminal sends a login request to the server, the login request carries a login mode identifier, and after the login is successful, the terminal and the server record the current login mode of the terminal;
wherein, the determining that data which is not stored in the terminal exists in the server includes:
sending a data inquiry request to the server every time a preset inquiry period is reached;
and when receiving a data confirmation message which is sent by the server and corresponds to the data inquiry request, determining that data which is not stored in the terminal exists in the server.
4. The method of claim 3, further comprising:
when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
5. A server, characterized in that the server comprises:
the receiving module is used for receiving a data downloading request sent by the terminal;
the sending module is used for sending data which is not stored in the terminal to the terminal if the current login mode of the terminal is a safe login mode, wherein the safe login mode is a login mode for performing two-step verification; if the current login mode of the terminal is a common login mode, data which are not stored in the terminal are not sent to the terminal any more, wherein the common login mode is a login mode which is not subjected to two-step verification, and the login mode which is subjected to the two-step verification comprises inputting a verification code;
when a user wants to trigger the terminal to log in a server, the user triggers the terminal to display a login mode selection interface through operation, a common login button corresponding to the common login mode and a safety login button corresponding to the safety login mode are displayed in the login mode selection interface, the user selects the corresponding login button according to the own needs to select the current login mode, when the terminal sends a login request to the server in the login process, the login request carries a login mode identifier, and after the login is successful, the terminal and the server record the current login mode of the terminal;
wherein the sending module is further configured to:
when a data inquiry request sent to a server by the terminal every time a preset inquiry period is reached is received, if data which are not stored in the terminal exist in the server, a data confirmation message corresponding to the data inquiry request is sent to the terminal.
6. The server according to claim 5, wherein the receiving module is further configured to:
receiving a data uploading request sent by the terminal, wherein the data uploading request carries data to be backed up;
and storing the data to be backed up carried in the data uploading request.
7. A terminal, characterized in that the terminal comprises:
the determining module is used for determining that data which are not stored in the terminal exist in the server;
the sending module is used for sending a data downloading request to the server if the current login mode is a safe login mode, wherein the safe login mode is a login mode for performing two-step verification; if the current login mode is a common login mode, no data downloading request is sent to the server, wherein the common login mode is a login mode without two-step verification, and the login mode with the two-step verification comprises inputting a verification code;
the storage module is used for storing the data which are not stored in the terminal when the data which are not stored in the terminal and sent by the server are received;
when a user wants to trigger the terminal to log in the server, the user triggers the terminal to display a login mode selection interface through operation, a common login button corresponding to the common login mode and a safety login button corresponding to the safety login mode are displayed in the login mode selection interface, the user selects the corresponding login button according to the own needs to select the current login mode, in the login process, when the terminal sends a login request to the server, the login request carries a login mode identifier, and after the login is successful, the terminal and the server record the current login mode of the terminal;
wherein the determining module is configured to:
sending a data inquiry request to the server every time a preset inquiry period is reached;
and when receiving a data confirmation message which is sent by the server and corresponds to the data inquiry request, determining that data which is not stored in the terminal exists in the server.
8. The terminal of claim 7, wherein the sending module is further configured to:
when detecting that data which are not backed up in the server exist in the terminal, sending a data uploading request to the server, wherein the data uploading request carries the data to be backed up.
9. A server, characterized in that it comprises a processor and a memory, in which at least one instruction, at least one program, set of codes or set of instructions is stored, which is loaded and executed by the processor to implement the method for data synchronization according to any one of claims 1 to 2.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of data synchronization according to any one of claims 1 to 2.
11. A terminal, characterized in that it comprises a processor and a memory in which at least one instruction, at least one program, set of codes or set of instructions is stored, which is loaded and executed by the processor to implement the method for data synchronization according to any of claims 3 to 4.
12. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method for data synchronization according to any one of claims 3 to 4.
13. A system for data synchronization, the system comprising a terminal and a server, wherein:
the server, the server of any one of the claims 5-6;
the terminal according to any of the claims 7-8.
CN201711265221.1A 2017-12-05 2017-12-05 Method, device and system for data synchronization Active CN108011882B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711265221.1A CN108011882B (en) 2017-12-05 2017-12-05 Method, device and system for data synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711265221.1A CN108011882B (en) 2017-12-05 2017-12-05 Method, device and system for data synchronization

Publications (2)

Publication Number Publication Date
CN108011882A CN108011882A (en) 2018-05-08
CN108011882B true CN108011882B (en) 2020-11-27

Family

ID=62056609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711265221.1A Active CN108011882B (en) 2017-12-05 2017-12-05 Method, device and system for data synchronization

Country Status (1)

Country Link
CN (1) CN108011882B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991633B (en) * 2023-08-29 2024-05-31 北京星汉博纳医药科技有限公司 Data backup processing method, device and equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7849165B2 (en) * 2005-04-21 2010-12-07 Fiducci Thomas E Data backup, storage, transfer, and retrieval system, method and computer program product
CN103685169B (en) * 2012-09-06 2019-02-12 盛趣信息技术(上海)有限公司 Login method and system
CN103139372A (en) * 2012-11-15 2013-06-05 无锡成电科大科技发展有限公司 Backup method of user information
CN104281504B (en) * 2014-10-30 2018-03-27 广东欧珀移动通信有限公司 A kind of method and system of the application data backup of storage reduction based on MD5 codes
CN107291577A (en) * 2017-06-19 2017-10-24 腾讯科技(深圳)有限公司 file backup method, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Android智能手机的云服务应用研究;江燕良,黄海于;《单片机与嵌入式系统应用》;20130930(第9期);第5-7页 *
Md Maruf Hasan;Chutiporn Anutariya;M Zau Ja."A metadata-orientated integrated approach to personal file management".《2012 8th International Conference on Computing Technology and Information Management (NCM and ICNIT)》.2012,459-464页. *

Also Published As

Publication number Publication date
CN108011882A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
US20160381629A1 (en) Virtual sim card for accessing operator network
CN105975828B (en) Unlocking method and device
US10291608B2 (en) Method and device for establishing wireless connection
CN109219036B (en) Method and device for unbinding equipment and electronic equipment
EP2981116B1 (en) Method and apparatus for accessing wi-fi network and computer program product
CN106375096B (en) short message verification method and device
CN108811179B (en) Wireless network connection method, device and storage medium
EP3232385A1 (en) Method, device and system for executing business process
CN107094094B (en) Application networking method and device and terminal
CN109814942B (en) Parameter processing method and device
CN110839073A (en) Method for acquiring push information, method and device for sending push information
EP3407278A1 (en) Method and apparatus for reporting loss of card or device associated with account number or stolen of account number
US20220256497A1 (en) Methods and apparatuses for receiving paging signaling, and methods and apparatuses for transmitting paging signaling
CN105100074A (en) Data operation processing method, device and terminal equipment
CN107147815B (en) Call processing method and device based on taxi taking
CN107612888B (en) Enterprise user space creation method and device
CN111277984A (en) Wireless local area network access method and device
CN104618987B (en) Access the method and device of network
CN113407427A (en) Verification information processing method and device, terminal equipment and storage medium
CN105376318A (en) File transmission method, device and system
CN105991626A (en) Network access method and network access device
CN108011882B (en) Method, device and system for data synchronization
CN107105005B (en) Method and device for synchronizing data
CN106027735B (en) Method and device for integrating communication numbers
CN112733092B (en) Information processing method and device

Legal Events

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