CN111240896B - Terminal data synchronization method, device, server and storage medium - Google Patents

Terminal data synchronization method, device, server and storage medium Download PDF

Info

Publication number
CN111240896B
CN111240896B CN202010009645.7A CN202010009645A CN111240896B CN 111240896 B CN111240896 B CN 111240896B CN 202010009645 A CN202010009645 A CN 202010009645A CN 111240896 B CN111240896 B CN 111240896B
Authority
CN
China
Prior art keywords
data
terminal
account
preset application
receiving
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
CN202010009645.7A
Other languages
Chinese (zh)
Other versions
CN111240896A (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.)
Shenzhen Card Number Technology Co ltd
Original Assignee
Shenzhen Card Number Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Card Number Technology Co ltd filed Critical Shenzhen Card Number Technology Co ltd
Priority to CN202010009645.7A priority Critical patent/CN111240896B/en
Publication of CN111240896A publication Critical patent/CN111240896A/en
Application granted granted Critical
Publication of CN111240896B publication Critical patent/CN111240896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The invention discloses a terminal data synchronization method, a device, a server and a storage medium, wherein the method comprises the following steps: receiving a first login request sent by a first terminal starting a preset application to generate a first account, wherein the login request comprises a first identification code of the terminal; receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account; receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal; and when the second identification code is the same as the first identification code, sending the tourist data to a second terminal so as to update the second data of the preset application of the second terminal into the tourist data. The technical scheme of the invention realizes the effect of self-recovery of the local data of the terminal application.

Description

Terminal data synchronization method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the field of data synchronization, in particular to a terminal data synchronization method, a device, a server and a storage medium.
Background
The data synchronization helps the user to save his own usage data on the application software. The data synchronization scheme only solves the problem that after the account is logged in, the data is associated with the user account, so that the data is synchronized to another terminal when the user logs in at other terminals. For users without registered accounts, the data cannot be synchronized to the cloud, and the problem of data loss can be faced.
Disclosure of Invention
The invention provides a terminal data synchronization method, a device, a server and a storage medium, so as to achieve the effect of self-recovery of local data of a terminal application.
In a first aspect, an embodiment of the present invention provides a method for synchronizing terminal data, including:
receiving a first login request sent by a first terminal starting a preset application to generate a first account, wherein the login request comprises a first identification code of the terminal;
receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal;
and when the second identification code is the same as the first identification code, sending the guest data to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is locally stored data of the preset application of the second terminal.
In a second aspect, an embodiment of the present invention further provides a terminal data synchronization device, including:
the first login module is used for receiving a first login request sent by a first terminal starting preset application to generate a first account, and the login request comprises a first identification code of the terminal;
the visitor data storage module is used for receiving first data of the preset application uploaded by a first terminal, storing the first data as visitor data, and associating the visitor data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
the second login module is used for receiving a second login request sent by a second terminal for starting a preset application, wherein the second login request comprises a second identification code of the terminal;
and the data synchronization module is used for sending the guest data to a second terminal when the second identification code and the first identification code are the same, so as to update the second data of the preset application of the second terminal into the guest data, wherein the second data is the local storage data of the preset application of the second terminal.
In a third aspect, an embodiment of the present invention further provides a server, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the terminal data synchronization method as described above.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a terminal data synchronization method as described above.
According to the technical scheme, a first login request sent by a first terminal starting preset application is received to generate a first account, wherein the login request comprises a first identification code of the terminal; receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal; receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal; when the second identification code is the same as the first identification code, the guest data is sent to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is locally stored data of the preset application of the second terminal, thereby solving the problem that the application without registered account is likely to lose data and achieving the effect of self-recovery of local data applied by the terminal.
Drawings
Fig. 1 is a flowchart of a terminal data synchronization method in a first embodiment of the present invention.
Fig. 2 is a flowchart of a terminal data synchronization method in the second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal data synchronization device in a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a server in a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Furthermore, the terms "first," "second," and the like, may be used herein to describe various directions, acts, steps, or elements, etc., but these directions, acts, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first account may be referred to as a second account, and similarly, a second account may be referred to as a first account without departing from the scope of the present application. Both the first account and the second account are accounts, but they are not the same account. The terms "first," "second," and the like, are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Example 1
Fig. 1 is a flowchart of a terminal data synchronization method according to an embodiment of the present invention, where the embodiment is applicable to a terminal data synchronization situation, and the method specifically includes the following steps:
s110, receiving a first login request sent by a first terminal starting preset application to generate a first account, wherein the login request comprises a first identification code of the terminal;
in this embodiment, the preset application is a preset application capable of implementing the scheme. For example, the user can directly use the login account without logging in the random application software, and can also use the login account in a backup way. The first identification code is a terminal unique ID of the terminal for installing the preset application, and each device is provided with a unique device ID, wherein the ID refers to a parameter given by hardware when the hardware leaves a factory. After the preset application is installed on the terminal, the terminal unique ID of the terminal can be automatically obtained, and after the preset application is communicated with the wireless network, a login request based on the terminal unique ID is sent to the server.
S120, receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
in this embodiment, the first data includes local data stored in a preset application, where the first data includes at least one piece of first data and a first timestamp corresponding to each piece of first data, where the first timestamp is used to indicate a time when the first data is last modified; the tourist data is data corresponding to the first data stored in a first account generated based on the unique ID of the terminal in the server data center, wherein the tourist data comprises at least one piece of tourist data and a second timestamp corresponding to each piece of tourist data, and the second timestamp is used for indicating the latest time of modification of the tourist data; and comparing the first time stamp of the first data with the second time stamp of the tourist data to obtain a comparison result. Updating the guest data into the first data if the first timestamp is later than the second timestamp; if the second timestamp is later than the time of the first timestamp, the first data is updated into the guest data.
S130, receiving a second login request sent by a second terminal for starting a preset application, wherein the second login request comprises a second identification code of the terminal;
in this embodiment, when the preset application on the terminal is uninstalled and reinstalled or the data of the preset application based on the storage space of the terminal is cleared, the preset application may reacquire the second identifier, that is, the unique ID of the terminal, and send a login request carrying the second identifier to the server.
And S140, when the second identification code and the first identification code are the same, sending the guest data to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is local storage data of the preset application of the second terminal.
In this embodiment, after receiving the login request carrying the second identifier sent by the terminal in step 130, the server matches the corresponding account from the identifier library stored in the server, and if the matching fails, regenerates the account and sends the regenerated account to the terminal; if the matching is successful, the second identification code is the same as the first identification code, namely the terminal generates an account according to the unique ID of the terminal and synchronizes the data, a timestamp attached to the current local data of the terminal can be detected, the preset application is uninstalled and reinstalled or the timestamp attached to the local data of the preset application can be set to 0 after the data of the preset application based on the storage space of the terminal is cleared, and the second data locally stored by the preset application of the second terminal can be updated to tourist data.
According to the technical scheme, a first login request sent by a preset application started by a first terminal is received to generate a first account, wherein the login request comprises a first identification code of the terminal; receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal; receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal; when the second identification code is the same as the first identification code, the guest data is sent to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is locally stored data of the preset application of the second terminal, thereby solving the problem that the application without registered account is likely to lose data and achieving the effect of self-recovery of local data applied by the terminal.
Example two
Fig. 2 is a flowchart of a terminal data synchronization method provided in a second embodiment of the present invention, where the method specifically includes:
s210, receiving a first login request sent by a first terminal starting preset application to generate a first account, wherein the login request comprises a first identification code of the terminal;
in this embodiment, after the preset application is installed on the terminal, the terminal unique ID of the terminal is automatically obtained, and after the preset application is connected to the wireless network, a login request based on the terminal unique ID is sent to the server. Further, the receiving the first login request sent by the first terminal to start the preset application to generate the first account includes: receiving the first login request; matching a corresponding first account from the prestored accounts according to the first identification code; if the match is unsuccessful, a first account generation operation is performed.
In this embodiment, the pre-stored account is a pre-stored database related to the association relationship between the terminal identification code and the account. After receiving a login request sent by a first terminal, a server extracts a first identification code from the login request, and matches a corresponding first account from a pre-stored account, if the matching is unsuccessful, the server indicates that the preset application is not used at the first terminal, and new account synchronization is needed; if the matching is successful, the preset application is synchronized with the data to the server, and the data can be directly sent to the first terminal to be matched with the first account logged in before.
S220, receiving an access request sent by the preset application, wherein the access request comprises the first account stored by the first terminal;
in this embodiment, after the preset application sends a login request to the server to generate the first account, an access request may be sent to the server to login the account.
S230, generating a first access mark according to the access request and sending the first access mark to the first terminal, wherein the first access mark is associated with the first account.
In this embodiment, the first access flag may be a token, where the token means a "token", which is a string of characters generated by the server and is used as an identifier of the request made by the client. After the user logs in for the first time, the server generates a token and returns the token to the preset application, and the preset application only needs to carry the token to request data before carrying the token, and does not need to carry the user name and the password again. The composition of a simple token; ui (unique identity of user), time (timestamp of current time), sign (signature, hexadecimal string of a certain length compressed by hash algorithm of the first few bits of token.
S240, receiving a data synchronization request sent by the first terminal, wherein the data synchronization request comprises the first access mark and the first data;
in this embodiment, the server may compare the first timestamp of the local data of the preset application with the second timestamp of the guest data at any time, and when the first timestamp is later than the second timestamp, may control the preset application to initiate a request for data synchronization to the service.
S250, judging the authority of the data synchronization request according to the first access mark.
In this embodiment, if the user registers and logs in with the unique terminal identifier, the user is the guest user; if the user registers and logs in by other channels such as a mobile phone number, the user is a regular user. The access token corresponding to the guest user's account has only the ability to synchronize data, while the access token corresponding to the regular user's account indicates that the user account has more functions of the access server that can be used.
S260, receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
in this embodiment, when the application is started and the data is modified, the data may be synchronized so as to keep the consistency of the application end and the server data. And updating the guest data into the first data when the first time stamp is later than the second time stamp according to the comparison result of the first time stamp of the first data and the second time stamp of the guest data.
Further, after the receiving the first data of the preset application uploaded by the first terminal and storing the first data as the guest data, associating the guest data with the first account, the method further includes:
receiving a data migration request sent by a first terminal, wherein the data migration request comprises a first access mark and a second access mark, and the second access mark is associated with a second account generated according to conventional account login;
in this embodiment, the conventional account may be a registered account such as a mobile phone or a mailbox. When a user logs in a conventional account on a preset application of a first terminal for the first time, the terminal sends a data migration request to a server so as to migrate tourist data to a second account corresponding to the conventional account, and data loss caused by terminal replacement is avoided. When a user logs in on a preset application according to a conventional account, the server generates a second account according to the conventional account, sends the second account to the first terminal, and then generates a second access mark according to an access request carrying the second account sent by the first terminal.
Matching a first account corresponding to the first access mark and a second account corresponding to the second access mark from prestored accounts;
and deleting the association relation between the guest data and the first account and associating the guest data with the second account.
In this embodiment, after a user logs in a conventional account, the user may query a corresponding first account and a corresponding second account from the prestored accounts according to the first access flag and the second access flag, and may associate guest data corresponding to the first account to the second account corresponding to the conventional account, and delete an association relationship between the guest data and the first account, so that data synchronization of the first account logged in according to the unique ID of the terminal is not required, and repeated data synchronization is avoided. Alternatively, the local data may also be directly uploaded to the server storage space corresponding to the second account.
Further, after deleting the association relationship between the guest data and the first account and associating the guest data with the second account, the method further includes: and clearing the first access mark and notifying the first terminal that the data migration is successful.
In this embodiment, the server user center clears the token of the guest account and notifies the success of the migration of the preset application data.
Further, after clearing the first access flag and notifying the first terminal that the data migration is successful, the method further includes: and controlling the first terminal to clear the first account and the first access identifier corresponding to the first identification code.
In this embodiment, after receiving the success of data migration, the preset application may delete the token and the guest account related to the guest account stored in the first terminal.
Further, before deleting the association relationship between the guest data and the first account and associating the guest data with the second account, the method further includes: detecting whether the second account has associated regular data, the regular data being data stored in a server based on the second account; if the second account is detected to be associated with the conventional data, no data migration operation is performed.
In this embodiment, when the user logs in the conventional account after installing the preset application, if the logged in conventional account is a new account, the cloud server has no associated data, and meanwhile, the tourist account associated with the device has associated data, so that the tourist data of the terminal can be migrated to the conventional account. The cloud server does not migrate when data exists, otherwise, the cloud server can cover the data of the user.
S270, receiving a second login request sent by a second terminal for starting a preset application, wherein the second login request comprises a second identification code of the terminal;
in this embodiment, when the preset application on the terminal is uninstalled and reinstalled or the data of the preset application based on the storage space of the terminal is cleared, the preset application may reacquire the second identifier, that is, the unique ID of the terminal, and send a login request carrying the second identifier to the server.
And S280, when the second identification code and the first identification code are the same, sending the guest data to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is local storage data of the preset application of the second terminal.
In this embodiment, if the user does not want the data to be synchronized to the cloud, the synchronization function of the guest account may be turned off. The preset application can be provided with a mark bit for switching guest synchronization, and when the mark bit is closed, the data synchronization can not be triggered any more in the use process of the preset application, and the data of the user are only stored locally.
According to the technical scheme of the embodiment, an access request sent by the preset application is received, wherein the access request comprises the first account stored by the first terminal; generating a first access mark according to the access request and sending the first access mark to the first terminal, wherein the first access mark is associated with the first account; receiving a data synchronization request sent by the first terminal, wherein the data synchronization request comprises the first access mark and the first data; and judging the authority of the data synchronization request according to the first access mark, so that the problem that the data synchronization authority of the tourist account and the data synchronization authority of the conventional account are different is solved, and the effect of distinguishing the tourist account from the conventional account is achieved.
Example III
Fig. 3 is a schematic structural diagram of a terminal data synchronization device 300 according to a third embodiment of the present invention, where the embodiment is applicable to a terminal data synchronization situation, and the specific structure is as follows:
a first login module 310, configured to receive a first login request sent by a first terminal to start a preset application to generate a first account, where the login request includes a first identification code of the terminal;
the guest data storage module 320 is configured to receive first data of the preset application uploaded by a first terminal, store the first data as guest data, and associate the guest data with the first account, where the first data is locally stored data of the preset application of the first terminal;
a second login module 330, configured to receive a second login request sent by a second terminal for starting a preset application, where the second login request includes a second identification code of the terminal;
and the data synchronization module 340 is configured to send the guest data to a second terminal when the second identification code is the same as the first identification code, so as to update second data of the preset application of the second terminal to the guest data, where the second data is locally stored data of the preset application of the second terminal.
Further, the first login module 310 includes a first login unit, a first account matching unit and a first account generating unit,
the first login unit is used for receiving the first login request;
the first account matching unit is used for matching a corresponding first account from the prestored accounts according to the first identification code;
the first account generation unit is used for executing a first account generation operation if the matching is unsuccessful.
Further, the apparatus 300 further comprises an access request receiving module, a first access flag generating module, a synchronization request receiving module and a synchronization right determining module,
the access request receiving module is used for receiving an access request sent by the preset application, wherein the access request comprises the first account stored by the first terminal;
the first access mark generation module is used for generating a first access mark according to the access request and sending the first access mark to the first terminal, and the first access mark is associated with the first account.
The synchronization request receiving module is used for receiving a data synchronization request sent by the first terminal, wherein the data synchronization request comprises the first access mark and the first data;
and the synchronous authority judging module is used for judging the authority of the data synchronous request according to the first access mark.
Further, the apparatus 300 further includes a data migration request receiving module, an account query module and a data migration module,
the data migration request receiving module is used for receiving a data migration request sent by the first terminal, wherein the data migration request comprises a first access mark and a second access mark, and the second access mark is associated with a second account generated according to conventional account login;
the account inquiry module is used for matching a first account corresponding to the first access mark and a second account corresponding to the second access mark from prestored accounts;
the data migration module is used for deleting the association relation between the guest data and the first account and associating the guest data with the second account.
Further, the apparatus 300 further includes a data migration success reminding module, configured to clear the first access flag and notify the first terminal that the data migration is successful.
Further, the apparatus 300 further includes a visitor account information emptying module, configured to control the first terminal to clear the first account and the first access identifier corresponding to the first identifier.
Further, the apparatus 300 further comprises
Detecting whether the second account has associated regular data, the regular data being data stored in a server based on the second account;
if the second account is detected to be associated with the conventional data, no data migration operation is performed.
The terminal data synchronization device 300 provided by the embodiment of the invention can execute the terminal data synchronization method provided by the previous embodiment, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary server 412 suitable for use in implementing embodiments of the present invention. The server 412 shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 4, the server 412 is in the form of a general purpose server. Components of server 412 may include, but are not limited to: one or more processors 416, a storage 428, and a bus 418 that connects the various system components (including the storage 428 and the processors 416).
Bus 418 represents one or more of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry standard architecture (Industry Subversive Alliance, ISA) bus, micro channel architecture (Micro Channel Architecture, MAC) bus, enhanced ISA bus, video electronics standards association (Video Electronics Standards Association, VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
Server 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by server 412 and includes both volatile and nonvolatile media, removable and non-removable media.
The storage 428 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 430 and/or cache memory 432. The terminal 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable nonvolatile optical disk such as a Read Only Memory (CD-ROM), digital versatile disk (Digital Video Disc-Read Only Memory, DVD-ROM), or other optical media, may be provided. In such cases, each drive may be coupled to bus 418 via one or more data medium interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for example, in the storage 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 442 generally perform the functions and/or methodologies in the described embodiments of the invention.
The server 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing terminal, display 424, etc.), one or more terminals that enable a user to interact with the server 412, and/or any terminals (e.g., network card, modem, etc.) that enable the server 412 to communicate with one or more other computing terminals. Such communication may occur through an input/output (I/O) interface 422. Also, the server 412 may communicate with one or more networks (e.g., local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and/or public network, such as the internet) via the network adapter 420. As shown in fig. 4, network adapter 420 communicates with the other modules of server 412 via bus 418. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with server 412, including, but not limited to: microcode, end drives, redundant processors, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) systems, tape drives, data backup storage systems, and the like.
The processor 416 executes various functional applications and data processing by running a program stored in the storage 428, for example, to implement a terminal data synchronization method provided by any embodiment of the present invention, and the method may include:
receiving a first login request sent by a first terminal starting a preset application to generate a first account, wherein the login request comprises a first identification code of the terminal;
receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal;
and when the second identification code is the same as the first identification code, sending the guest data to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is locally stored data of the preset application of the second terminal.
Example five
A fifth embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a terminal data synchronization method as provided in any embodiment of the present invention, the method may include:
receiving a first login request sent by a first terminal starting a preset application to generate a first account, wherein the login request comprises a first identification code of the terminal;
receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal;
and when the second identification code is the same as the first identification code, sending the guest data to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is locally stored data of the preset application of the second terminal.
The computer-readable storage media of embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A method for synchronizing terminal data, comprising:
receiving a first login request sent by a first terminal starting a preset application to generate a first account, wherein the login request comprises a first identification code of the terminal;
receiving first data of the preset application uploaded by a first terminal, storing the first data as tourist data, and associating the tourist data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
receiving a second login request sent by a second terminal starting a preset application, wherein the second login request comprises a second identification code of the terminal;
when the second identification code is the same as the first identification code, sending the guest data to a second terminal so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is locally stored data of the preset application of the second terminal;
the step of receiving the first data of the preset application uploaded by the first terminal, storing the first data as guest data, and associating the guest data with the first account includes:
receiving a data migration request sent by a first terminal, wherein the data migration request comprises a first access mark and a second access mark, and the second access mark is associated with a second account generated according to conventional account login;
matching a first account corresponding to the first access mark and a second account corresponding to the second access mark from prestored accounts;
and deleting the association relation between the guest data and the first account and associating the guest data with the second account.
2. The method of claim 1, wherein receiving a first login request sent by a first terminal to start a preset application to generate a first account comprises:
receiving the first login request;
matching a corresponding first account from the prestored accounts according to the first identification code;
if the match is unsuccessful, a first account generation operation is performed.
3. The method for synchronizing terminal data according to claim 1, wherein after receiving the first login request sent by the first terminal to start the preset application to generate the first account, the method further comprises:
receiving an access request sent by the preset application, wherein the access request comprises the first account stored by the first terminal;
generating a first access mark according to the access request and sending the first access mark to the first terminal, wherein the first access mark is associated with the first account;
receiving a data synchronization request sent by the first terminal, wherein the data synchronization request comprises the first access mark and the first data;
and judging the authority of the data synchronization request according to the first access mark.
4. The terminal data synchronization method according to claim 1, wherein after deleting the association relationship between the guest data and the first account and associating the guest data with the second account, further comprising:
and clearing the first access mark and notifying the first terminal that the data migration is successful.
5. The method for synchronizing data of a terminal according to claim 4, wherein after the clearing of the first access flag and the notification of the success of the first terminal data migration, further comprising:
and controlling the first terminal to clear the first account and the first access identifier corresponding to the first identification code.
6. The terminal data synchronization method according to claim 1, wherein before deleting the association relationship between the guest data and the first account and associating the guest data with the second account, further comprising:
detecting whether the second account has associated regular data, the regular data being data stored in a server based on the second account;
if the second account is detected to be associated with the conventional data, no data migration operation is performed.
7. A terminal data synchronization device, comprising:
the first login module is used for receiving a first login request sent by a first terminal starting preset application to generate a first account, and the login request comprises a first identification code of the terminal;
the visitor data storage module is used for receiving first data of the preset application uploaded by a first terminal, storing the first data as visitor data, and associating the visitor data with the first account, wherein the first data is locally stored data of the preset application of the first terminal;
the second login module is used for receiving a second login request sent by a second terminal for starting a preset application, wherein the second login request comprises a second identification code of the terminal;
the data synchronization module is used for sending the guest data to a second terminal when the second identification code and the first identification code are the same, so as to update second data of the preset application of the second terminal into the guest data, wherein the second data is local storage data of the preset application of the second terminal;
the data migration request receiving module is used for receiving a data migration request sent by the first terminal, wherein the data migration request comprises a first access mark and a second access mark, and the second access mark is associated with a second account generated according to conventional account login;
the account inquiry module is used for matching a first account corresponding to the first access mark and a second account corresponding to the second access mark from prestored accounts;
and the data migration module is used for deleting the association relation between the guest data and the first account and associating the guest data with the second account.
8. A server, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the terminal data synchronization method of any of claims 1-6.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the terminal data synchronization method according to any one of claims 1-6.
CN202010009645.7A 2020-01-06 2020-01-06 Terminal data synchronization method, device, server and storage medium Active CN111240896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010009645.7A CN111240896B (en) 2020-01-06 2020-01-06 Terminal data synchronization method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010009645.7A CN111240896B (en) 2020-01-06 2020-01-06 Terminal data synchronization method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111240896A CN111240896A (en) 2020-06-05
CN111240896B true CN111240896B (en) 2024-04-02

Family

ID=70869237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010009645.7A Active CN111240896B (en) 2020-01-06 2020-01-06 Terminal data synchronization method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111240896B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116467A (en) * 2020-06-16 2020-12-22 上海金融期货信息技术有限公司 Parallel operation method and system for heterogeneous counter
CN112055064B (en) * 2020-08-26 2023-11-28 北京致医健康信息技术有限公司 Data synchronization method, device, equipment and storage medium
CN112583799B (en) * 2020-12-03 2022-07-01 深圳市镜玩科技有限公司 Processing method, related device, equipment and medium for registered account
CN114567631A (en) * 2022-02-10 2022-05-31 北京乐驾科技有限公司 Distributed application method and system
CN115242511B (en) * 2022-07-22 2024-04-12 成都中科大旗软件股份有限公司 Multi-environment application management platform and management method
CN116360710B (en) * 2023-06-02 2023-08-04 北京国电通网络技术有限公司 Data storage method applied to server cluster, electronic device and readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06208477A (en) * 1989-12-22 1994-07-26 Tandem Comput Inc Fault-tolerant computer with online re-incorporation and interruption / restart
JP2007306168A (en) * 2006-05-10 2007-11-22 Sony Ericsson Mobilecommunications Japan Inc Portable terminal and method of synchronizing data portable terminal
JP2009237767A (en) * 2008-03-26 2009-10-15 Nippon Telegr & Teleph Corp <Ntt> Information succession method and saving/restoration device and information succession program
JP2011096045A (en) * 2009-10-30 2011-05-12 Hitachi Ltd Computer, computer system and method for executing application
CN102098812A (en) * 2011-02-16 2011-06-15 中兴通讯股份有限公司 Data synchronization method and mobile terminal
CN106487911A (en) * 2016-10-25 2017-03-08 广东欧珀移动通信有限公司 A kind of method of data synchronization, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005086519A1 (en) * 2004-03-04 2005-09-15 Access Co., Ltd. Wireless communication terminal synchronization method, wireless communication system, wireless communication terminal, and server
KR101449675B1 (en) * 2012-07-06 2014-10-15 엔에이치엔엔터테인먼트 주식회사 Apparatus, method and computer readable recording medium for interworking the account based on a mobile terminal and the account based on a game

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06208477A (en) * 1989-12-22 1994-07-26 Tandem Comput Inc Fault-tolerant computer with online re-incorporation and interruption / restart
JP2007306168A (en) * 2006-05-10 2007-11-22 Sony Ericsson Mobilecommunications Japan Inc Portable terminal and method of synchronizing data portable terminal
JP2009237767A (en) * 2008-03-26 2009-10-15 Nippon Telegr & Teleph Corp <Ntt> Information succession method and saving/restoration device and information succession program
JP2011096045A (en) * 2009-10-30 2011-05-12 Hitachi Ltd Computer, computer system and method for executing application
CN102098812A (en) * 2011-02-16 2011-06-15 中兴通讯股份有限公司 Data synchronization method and mobile terminal
CN106487911A (en) * 2016-10-25 2017-03-08 广东欧珀移动通信有限公司 A kind of method of data synchronization, device and system

Also Published As

Publication number Publication date
CN111240896A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN111240896B (en) Terminal data synchronization method, device, server and storage medium
CN110113407B (en) Applet state synchronization method, apparatus and computer storage medium
CN106874389B (en) Data migration method and device
US9294550B2 (en) Efficient data transfer for cloud storage by centralized management of access tokens
CN110389935B (en) Method, equipment and computer storage medium for starting small program
WO2015101320A1 (en) Account number generation method, terminal and background server
JP6637940B2 (en) Forced encryption on connected devices
US20170118647A1 (en) Transmitting Management Commands to a Client Device
CN113271296B (en) Login authority management method and device
CN111259022A (en) Information synchronization method, synchronization system, computer equipment and medium
CN109891849A (en) Highly usable and reliable secret distribution infrastructure
CN112612977A (en) Page display method, system, device, equipment and storage medium
WO2022142536A1 (en) Grayscale publishing method, system and apparatus, and device and storage medium
CN111143800B (en) Cloud computing resource management method, device, equipment and storage medium
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN110134419B (en) System upgrading method, device, equipment and storage medium for double-sided cabinet
WO2023280145A1 (en) Information citing method, system and apparatus, and electronic device
EP3147787A1 (en) Method, device and terminal for setting system data
CN112187786B (en) Service processing method, device, server and storage medium for network service
CN110968557B (en) Data processing method and device in distributed file system and electronic equipment
CN109189753B (en) Method and device for adding user information in HUE
CN112612806A (en) House resource information processing method and device, electronic equipment and computer readable medium
US20200401600A1 (en) Sub-scope synchronization
CN112463887A (en) Data processing method, device, equipment and storage medium
CN112732728A (en) Data synchronization method and system

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200619

Address after: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A (located in Shenzhen Qianhai business secretary Co. Ltd.)

Applicant after: Shenzhen card number Technology Co.,Ltd.

Address before: 518000 8th floors Nan Zuo801 chambers, science and technology Nan Shi bis-B, JinDie Software garden, road, Southern Hi-Tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN READILY TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant