CN110519346B - Data switching method, terminal, server and computer readable storage medium - Google Patents

Data switching method, terminal, server and computer readable storage medium Download PDF

Info

Publication number
CN110519346B
CN110519346B CN201910750503.3A CN201910750503A CN110519346B CN 110519346 B CN110519346 B CN 110519346B CN 201910750503 A CN201910750503 A CN 201910750503A CN 110519346 B CN110519346 B CN 110519346B
Authority
CN
China
Prior art keywords
terminal
data
usage data
server
storage space
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
CN201910750503.3A
Other languages
Chinese (zh)
Other versions
CN110519346A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201910750503.3A priority Critical patent/CN110519346B/en
Publication of CN110519346A publication Critical patent/CN110519346A/en
Application granted granted Critical
Publication of CN110519346B publication Critical patent/CN110519346B/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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Landscapes

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

Abstract

The embodiment of the invention discloses a data switching method, a terminal, a server and a computer readable storage medium, which can improve the utilization rate of a storage space of the terminal and the switching speed, and the method can comprise the following steps: when a switching instruction for switching from a first object to a second object is received, acquiring first use data corresponding to the first object, wherein the first object is an object currently running in a terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs a service in the terminal; under the condition of network connection, if the first use data is smaller than a preset uploading value, the first use data is sent to a server, and then the first object is switched to a second object, so that a service function corresponding to the second object is realized; or if the first use data is larger than the preset upload value, switching the first object to the second object, and sending the first use data to the server after the business function corresponding to the second object is realized.

Description

Data switching method, terminal, server and computer readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a data switching method, a terminal, a server, and a computer-readable storage medium.
Background
Currently, when a terminal supporting a multi-user mode performs user switching, a usage space of a target switching user is restored according to historical data backed up before the target switching user.
However, currently, a terminal maintains, backs up and restores user data of all users on the terminal uniformly, so that the amount of data required to be maintained by the terminal is too large, the speed of backing up and restoring the user data is too slow, and the utilization rate of a storage space of the terminal and the switching speed are reduced.
Disclosure of Invention
Embodiments of the present application are expected to provide a data switching method, a terminal, a server, and a computer-readable storage medium, which can improve the utilization rate of a terminal storage space and the speed of switching between terminal users.
The technical scheme of the application is realized as follows:
the embodiment of the application provides a data switching method, which is applied to a terminal and comprises the following steps:
when a switching instruction for switching from a first object to a second object is received, acquiring first use data corresponding to the first object, wherein the first object is an object currently running in the terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs a service in the terminal;
under the condition of network connection, if the first usage data is smaller than a preset uploading value, the first usage data is sent to a server, and then the first object is switched to the second object, so that a service function corresponding to the second object is realized; or, if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is realized, sending the first usage data to the server.
The embodiment of the application provides a data switching method, which is applied to a server and comprises the following steps:
receiving first use data sent by a terminal, wherein the first use data is data generated when a first object performs service in the terminal, and the first object is an object currently running in the terminal;
and storing the received first use data to a first network storage space, wherein the first network storage space is a network storage space corresponding to the first object in the network storage space of the terminal.
An embodiment of the present application provides a terminal, including: an acquisition unit and an execution unit; wherein the content of the first and second substances,
the acquiring unit is used for acquiring first use data corresponding to a first object when a switching instruction for switching from the first object to a second object is received, wherein the first object is an object currently running in the terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs a service in the terminal;
the execution unit is configured to, in a case of being connected to a network, send the first usage data to a server and then switch the first object to the second object if the first usage data is smaller than a preset upload value, so as to implement a service function corresponding to the second object; or, if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is realized, sending the first usage data to the server.
An embodiment of the present application provides a server, where the server includes: a receiving unit and a storage unit; wherein the content of the first and second substances,
the receiving unit is configured to receive first usage data sent by a terminal, where the first usage data is data generated when a first object performs a service in the terminal, and the first object is an object currently running in the terminal;
the storage unit is configured to store the received first usage data in a first network storage space, where the first network storage space is a network storage space corresponding to the first object in the network storage space of the terminal.
An embodiment of the present application provides a terminal, including: the data switching system comprises a first processor, a first memory and a first communication bus, wherein the first memory is communicated with the first processor through the first communication bus, the first memory stores one or more programs executable by the first processor, and when the one or more programs are executed, the first processor executes any one of the data switching methods.
An embodiment of the present application provides a server, where the server includes: the data switching system comprises a second processor, a second memory and a second communication bus, wherein the second memory is communicated with the second processor through the second communication bus, the second memory stores one or more programs executable by the second processor, and when the one or more programs are executed, the second processor executes any one of the data switching methods.
The embodiment of the present application provides a computer-readable storage medium, which is applied to a terminal, where the computer-readable storage medium stores one or more programs, and the one or more programs may be executed by one or more first processors to implement a data switching method corresponding to a terminal side in the embodiment of the present application.
The embodiment of the present application provides a computer-readable storage medium, which is applied to a server, where the computer-readable storage medium stores one or more programs, and the one or more programs are executable by one or more second processors to implement a data switching method corresponding to a server side in the embodiment of the present application.
The embodiment of the application provides a data switching method, a terminal, a server and a computer readable storage medium, wherein the method comprises the following steps: when a switching instruction for switching from a first object to a second object is received, acquiring first use data corresponding to the first object, wherein the first object is an object currently running in a terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs a service in the terminal; under the condition of network connection, if the first use data is smaller than a preset uploading value, the first use data is sent to a server, and then the first object is switched to a second object, so that a service function corresponding to the second object is realized; or if the first use data is larger than the preset upload value, switching the first object to the second object, and sending the first use data to the server after the business function corresponding to the second object is realized. By adopting the method, when the terminal receives a switching instruction for switching from the first object to the second object, only the first use data corresponding to the first object is acquired; and then, according to the size of the first use data, different modes are adopted to complete switching, only the first use data is sent to the server for storage, and the current object use data is obtained from the server when other objects are switched, so that the storage space required by the terminal for locally and uniformly maintaining a plurality of user data is reduced, the time for uploading the use data is reduced, and the utilization rate of the storage space of the terminal and the switching speed are improved.
Drawings
Fig. 1 is a first flowchart of a data handover method according to an embodiment of the present application;
fig. 2 is a flowchart of a data handover method according to an embodiment of the present application;
fig. 3 is a flow chart of a data switching method according to an embodiment of the present application;
fig. 4 is a fourth flowchart of a data handover method according to an embodiment of the present application;
fig. 5 is a fifth flowchart of a data handover method according to an embodiment of the present application;
fig. 6 is a sixth flowchart of a data handover method according to an embodiment of the present application;
fig. 7 is a seventh flowchart of a data handover method according to an embodiment of the present application;
fig. 8 is a flowchart eight of a data handover method according to an embodiment of the present application;
fig. 9 is a flowchart nine of a data handover method according to an embodiment of the present application;
fig. 10 is a flowchart ten of a data handover method provided in the embodiment of the present application;
fig. 11 is an eleventh flowchart of a data handover method according to an embodiment of the present application;
fig. 12 is a schematic system structure diagram of a data handover method according to an embodiment of the present application;
fig. 13 is a schematic diagram of a multi-user mode of a terminal according to an embodiment of the present application;
FIG. 14 is a first schematic diagram of an example query box;
fig. 15 is a schematic diagram of an inquiry block according to an embodiment of the present application;
fig. 16 is a first schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 17 is a first schematic structural diagram of a server according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a terminal according to a second embodiment of the present disclosure;
fig. 19 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In order to more clearly illustrate the embodiments of the present application or technical solutions in the prior art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the present application provides a data switching system architecture, which includes at least one server 100, at least one terminal 200, and a network 300, as shown in fig. 12, where the server 100 and the terminal 200 are connected through the network 300, the server 100 is provided with at least one network storage space corresponding to the terminal 200, and in the network storage space of each terminal 200, the network storage space is divided into network storage spaces corresponding to each user according to each user on each terminal 200. When the terminal 200 switches the user data, the data of the user before switching is uploaded to the server 100 through the network 300 for backup, and when the server 100 receives the data of the user before switching, the data of the old user is correspondingly stored in the network storage space corresponding to the user of the terminal 200; then the terminal 200 sends a message for pulling the data of the switching target user to the server 100, the server 100 responds to the message for pulling the data of the switching target user, takes out the data from the network storage space corresponding to the data of the switching target user on the server 100 and sends the data to the terminal 200, after the terminal 200 receives the data of the switching target user, the service operation of the switching target user is recovered according to the data of the switching target user, and finally, after the terminal 200 completes the switching, the old user data in the local storage space is deleted.
Based on the above architecture, the embodiments of the present application propose the following implementation.
An embodiment of the present application provides a data handover method, which is applied to a terminal, and as shown in fig. 1, the method may include:
s101, when a switching instruction for switching from a first object to a second object is received, first use data corresponding to the first object is obtained, the first object is an object currently running in a terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs business in the terminal.
The data switching method provided by the embodiment of the application is suitable for a mobile phone or other terminals to perform multi-user switching scenes, such as multi-user account switching on the mobile phone and other scenes supporting multi-user mode terminals to perform user switching.
In the embodiment of the application, the terminal supports a multi-user use mode, the same terminal can support a plurality of different users to use, and different users can correspondingly enter different terminal use spaces to run different services according to different authority settings, system settings or user personal use data when using the same terminal. In some embodiments, the multi-user mode of the mobile phone may support the use of the owner, the visitor, and other types of accounts, and after the multi-user mode is turned on, when the mobile phone is logged in by different users, different use spaces may be correspondingly displayed, which may specifically include a user desktop, setting different system use permissions, and loading historical use data of different users.
In this embodiment of the present application, a multi-user interface on a terminal supporting a multi-user mode may be as shown in fig. 13, where a user may add, maintain, and directly switch among multiple users, and may specifically be a display interface in other forms, which is not limited in this embodiment of the present application.
In this embodiment of the present application, an object in the terminal represents identity information of a user, and the object may be a user account established in the terminal or other expression forms of the identity information.
In this embodiment of the present application, the switching instruction is used to switch among a plurality of objects supported by the terminal, in this embodiment of the present application, the first object is an object currently running in the terminal, and in some embodiments, the first object may be an account currently logged in by the mobile phone and running in the foreground of the terminal system; the second object is a target object to be switched, in some embodiments, an account in which the mobile phone is currently running is an owner account, and when a switching instruction from the owner to the visitor is received, the first object is the owner account, and the second object is a visitor account to be switched. In the embodiment of the application, when a terminal receives a switching instruction for switching from a first object to a second object, first use data corresponding to the first object is acquired.
In some embodiments, the first usage data corresponding to the first object may be stored in a local memory of the mobile phone or an SD card space, and when the terminal acquires the first usage data corresponding to the first object, the terminal searches and acquires the first usage data in the local memory space of the terminal.
In some embodiments, the first usage data may be obtained by detecting data under a corresponding storage directory of the first object in the local storage space of the terminal.
Illustratively, the terminal has two usage accounts, namely an account a and an account B, wherein the account a is a first object currently running, data generated when the account a runs is stored in a data/user directory in a local storage space of the mobile phone, and when the terminal receives a switching instruction for switching from the account a to the account B, the terminal can acquire the first usage data from the data/user directory.
In the embodiment of the application, because the terminal system authorities corresponding to different objects are different, different system settings need to be performed on the use space of the object on the terminal when the different objects are operated, and the operations of users corresponding to the different objects on the terminal are different, so that the generated data are also different. The terminal stores the data generated when the object performs the service in the terminal as the use data corresponding to the object, so that when the object is operated, the terminal can recover the use space of the object according to the stored use data.
In this embodiment, the first usage data is data generated when the first object performs a service in the terminal. For example, the first usage data may be call records generated when the first object performs a service in the mobile phone, saved files, historical browsing records and usage records of each application, and personalized settings such as wallpaper settings, volume settings and the like for a usage space corresponding to the first object.
S102, under the condition of network connection, if the first use data is smaller than a preset uploading value, the first use data is sent to a server, and then the first object is switched to a second object, so that a service function corresponding to the second object is realized.
In the embodiment of the application, after the terminal acquires the first usage data corresponding to the first object, the terminal can judge whether the terminal is connected with the network, and under the condition of being connected with the network, if the first usage data is smaller than a preset upload value, the terminal switches the first object to the second object after sending the first usage data to the server, so that a service function corresponding to the second object is realized; and if the first use data are larger than the preset uploading value, the terminal switches the first object to the second object, and after the business function corresponding to the second object is realized, the first use data are sent to the server.
In the embodiment of the application, the terminal judges whether the terminal is connected with the network, when the terminal is connected with the network, for example, when the terminal is connected with a wireless network or a mobile data network, the terminal can continuously judge the size of the first use data, and different modes of uploading are carried out according to the size of the first use data.
In this embodiment of the present application, the preset upload value is a preset size of the first usage data suitable for immediate upload. In some embodiments, the preset upload value may be 100M, or may be other set values according to an actual situation, which is not limited in this embodiment of the application.
In the embodiment of the application, when the first usage data is smaller than the preset upload value, the terminal sends the first usage data to the server, and then switches the first object to the second object, so as to implement a service function corresponding to the second object.
In the embodiment of the present application, when the first usage data is smaller than the preset upload value, it indicates that the first usage data can be uploaded with lower consumption, and will not occupy too many network resources, system resources, and upload waiting time. Therefore, the terminal can firstly send the first use data to the server and then switch the first object to the second object, so that the service function corresponding to the second object is realized, and the first use data is ensured to be sent to the server in time.
S103, under the condition of network connection, if the first using data is larger than a preset uploading value, the first object is switched to the second object, and after the business function corresponding to the second object is realized, the first using data is sent to the server.
In the embodiment of the application, under the condition of network connection, when the first usage data is greater than the preset upload value, the terminal switches the first object to the second object first, and after the service function corresponding to the second object is realized, the first usage data is sent to the server.
In this embodiment of the application, when the first usage data is greater than the preset upload value, it is described that more time, network resources, and system resources are consumed for uploading the first usage data, and therefore, the terminal may first switch the first object to the second object, and after the service function corresponding to the second object is implemented, send the first usage data to the server in the background during the operation of the second object, so as to reduce the waiting time during switching.
In some embodiments, when the first usage data is greater than the preset upload value, the terminal may further display an upload prompt when the first object is switched to the second object, for prompting that the first usage data is to be uploaded, and in some embodiments, the upload prompt may be as shown in fig. 14.
In the embodiment of the application, the terminal switches the first object to the second object, after the business function corresponding to the second object is realized, the currently running object of the terminal becomes the second object, the terminal enters the use space of the second object, and the business function corresponding to the second object is realized, such as application which can be displayed in the use space of the second object, recovery of historical data of the second object on operation of each application, permission setting for the terminal according to identity information of the second object, and the like.
It can be understood that, when receiving a switching instruction for switching from a first object to a second object, the terminal acquires first usage data generated when the first object runs, and when uploading the first usage data to the server, uploads in different modes according to the size of the first usage data. By using the method provided by the embodiment of the application, the use data of different objects can be correspondingly backed up in the process of switching the terminal object, so that the terminal only needs to locally maintain the use data of the first object currently running, and only needs to send the first use data corresponding to the first object when the first use data is sent to the server for backup, thereby reducing the occupation of the storage space of the terminal and the time for uploading the backup data; and when the first use data is overlarge, the terminal adopts a method of firstly switching to the second object and then uploading the first use data in the background, so that the switching speed of terminal object switching is further improved. Therefore, the method provided by the embodiment of the application can improve the utilization rate and switching speed of the storage space of the terminal.
In some embodiments of the present application, switching the first object to the second object in S102, and implementing a service function corresponding to the second object is specifically implemented as shown in fig. 2, which may include S201-S205, as follows:
s201, detecting whether second use data corresponding to a second object exists locally or not, wherein the second use data are data generated when the second object performs business in the terminal.
In this embodiment of the application, when the terminal switches the first object to the second object, it may first detect whether there is second usage data corresponding to the second object locally, where the second usage data is data generated when the second object performs a service in the terminal.
In some embodiments, correspondingly, whether second usage data exists locally or not is detected, and a detection result can also be obtained by detecting data in a directory correspondingly stored by a second object in a local storage space of the terminal, and data generated when the account B operates is stored in a/data/user/userB directory in the local storage space of the mobile phone, so that the terminal can judge whether second usage data exists locally or not by detecting data in the/data/user/userB directory in the local storage space of the mobile phone.
S202, when the second using data does not exist locally, sending a pulling message of the second using data to a server.
In the embodiment of the application, when the second usage data does not exist locally, the second usage data needs to be acquired from the server to recover the operation of the second object, so that the terminal sends a pull message to the server to pull the second usage data from the server.
S203, receiving the response of the server to the pull message, and pulling the second use data from the server.
In the embodiment of the application, after the terminal sends the pull message to the server, the terminal receives a response of the server to the pull message, and pulls the second usage data from the server based on the server response.
And S204, recovering the second using data in the local area, completing the process of switching the first object to the second object, and realizing the service function corresponding to the second object by adopting the second using data.
In the embodiment of the application, after the terminal pulls the second usage data from the server, the pulled second usage data is stored in the local storage space of the terminal, then the process of switching the first object to the second object is completed according to the second usage data which already exists locally, and the second usage data is adopted to realize the service function corresponding to the second object.
In this embodiment, the service function corresponding to the second object may be a desktop of a usage space corresponding to the second object, an application program that the second object has permission to access and use, a history of an operation of the application program by the second object, a history of a history setting performed by the second object on the terminal, and the like.
In this embodiment of the application, since the second usage data represents the history data generated when the terminal operates, which is backed up by the second object last time, the terminal uses the second usage data to implement the service function corresponding to the second object, and then the terminal usage space corresponding to the second object is restored to the history usage state when the second object corresponding to the second usage data operates last time.
Illustratively, the first object is an account a, the second object is an account B, and data generated when the account B operates is stored in a data/user/userB directory in a local storage space of the mobile phone. And after the first use data of the account A is sent, the terminal quits the login of the account A, closes the use desktop of the account A, enters the login of the account B, and prepares to enter the use space of the account B to operate the account B after the login is successful. When the terminal detects that second use data corresponding to the B account does not exist locally, the terminal pulls the backed-up second use data of the B account from the server, saves the pulled second use data of the B account in a/data/user B directory, and then realizes a service function corresponding to the B account according to the second use data in the/data/user B directory, specifically, the method may include displaying a use desktop of the B account according to the second use data in the/data/user B directory, setting a mobile phone function right for the B account, and restoring applications in the B account, such as games, video playing, call records, and the like, to a history state when the B account is used for the last time.
And S205, when the second use data exists, adopting the second use data in the local to realize the service function corresponding to the second object.
In the embodiment of the application, when the terminal detects that the second usage data exists locally, the second usage data does not need to be pulled, and the service function corresponding to the second object is realized by directly adopting the locally existing second usage data.
It should be noted that S202 to S204 and S205 are two parallel implementations after S201, and the embodiment of the present application may perform different branches according to actual situations, and the embodiment of the present application is not limited.
It can be understood that, in the embodiment of the present application, when the second usage data does not exist locally, the terminal may pull the second usage data from the server, so that a space for locally maintaining the second usage data is saved, and a utilization rate of a storage space is improved.
In some embodiments of the present application, S102 is embodied as shown in fig. 3, and the method may include S301-S304, as follows:
s301, under the condition of network connection, if the first usage data is smaller than a preset uploading value, displaying an inquiry window on the current display interface, wherein the inquiry window is used for inquiring whether to upload the first usage data immediately.
In this embodiment of the application, when the first usage data is smaller than the preset upload value, the terminal displays an inquiry window on a current display interface of the terminal first, where the inquiry window is used to inquire whether to upload the first usage data immediately, and in some embodiments, the inquiry window may be displayed in a pop-up box form and includes a determination control and a cancellation control, as shown in fig. 15. The inquiry window may also be displayed in other forms, and the embodiments of the present application are not particularly limited.
S302, when a determination instruction for triggering an inquiry window is received, first use data are sent to a server.
In the embodiment of the application, after the terminal displays the query window, the terminal waits for receiving a query operation result for the query window, and when a determination instruction for triggering the query window is received, which indicates that the first usage data needs to be uploaded immediately, the terminal sends the first usage data to the server.
In some embodiments, when a determination instruction triggering the query window is received, in the process that the terminal sends the first usage data to the server, a sending progress may be displayed on a current interface of the terminal, and a completion prompt may be displayed on the current interface after the sending is completed, so as to notify that the sending of the first usage data is completed.
In some embodiments, the mobile phone is connected to a wireless network, a main account and a visitor account exist in the mobile phone, the main account is an account currently running, the main account runs business operations such as games, video playing, making calls and the like on the mobile phone, 80M usage data is generated locally on the mobile phone, and the preset upload value is 100M. When the terminal is switched from the slave main account to the visitor account, the terminal judges that the mobile phone is connected with the network and the use data of the main account is smaller than a preset uploading value, the terminal displays an inquiry window on an operation interface of the mobile phone to prompt whether to upload the use data immediately or not, and when a confirmation key in the inquiry window is clicked, the terminal immediately starts to upload the use data of the main account to the server.
And S303, after the first use data is sent, switching the first object to the second object to realize the service function corresponding to the second object.
In the embodiment of the application, after the terminal finishes sending the first usage data, the terminal switches the first object to the second object and realizes the service function corresponding to the second object.
In this embodiment of the application, the method for switching the first object to the second object by the terminal to implement the service function corresponding to the second object is the same as S201 to S205, and is not described herein again.
It can be understood that when the first usage data is smaller than the preset upload value, the terminal prompts whether to upload the first usage data, and when the first usage data is confirmed to be uploaded, the terminal sends the first usage data to the server and then switches the first object to the second object. By adopting the method in the embodiment of the application, when the first use data is small, the terminal can upload the first use data to the server for backup in time, so that the local data maintenance amount of the terminal is reduced, and the utilization rate of the storage space of the terminal is improved.
S304, when a cancel instruction for triggering the inquiry window is received, the first using data is cancelled and uploaded.
In this embodiment of the application, when a cancel instruction triggering an inquiry window is received, it is described that the first usage data does not need to be immediately uploaded, the terminal does not upload the first usage data to the server, and the first usage data continues to be stored locally at the terminal.
It should be noted that S302-S303 and S304 are two parallel implementations after S301, and the embodiment of the present application may perform different branches according to actual situations, and the embodiment of the present application is not limited.
It can be understood that, when the first usage data is smaller than the preset upload value, the terminal uploads the first usage data to the server first, then detects whether second usage data corresponding to the second object exists locally, when the second usage data does not exist locally, the terminal pulls the second usage data historically uploaded by the second object from the server, and restores the pulled second usage data to the local terminal, thereby completing the process of switching the first object to the second object, and implementing the service function corresponding to the second object according to the second usage data locally restored by the terminal. By adopting the method of the embodiment of the application, the terminal can correspondingly backup and restore the use data according to different objects in the terminal, thereby avoiding uniformly backing up and restoring the use data of all the objects in the terminal, reducing the data volume of the use data needing to be maintained locally at the terminal, and reducing the data volume to be transmitted by uploading and pulling the data on the server when the objects are switched, and further improving the utilization rate of the storage space and the switching speed.
In some embodiments of the present application, the specific implementation of S103 is as shown in fig. 4, and may further include S401-S404, as follows:
s401, under the condition of network connection, if the first using data is larger than a preset uploading value, the first object is switched to the second object, and a service function corresponding to the second object is realized.
In this embodiment, when the first usage data is greater than the predetermined upload value, in order to reduce the waiting time for switching, the data query device may first switch the first object to the second object, and implement a service function corresponding to the second object. And after the terminal completes the switching, the second object becomes the object currently running by the terminal.
In this embodiment of the application, the method for the terminal to switch the first object to the second object to implement the service function corresponding to the second object is the same as the method in S201 to S205, and details are not repeated here.
S402, when the second object runs the service, judging whether a preset background uploading condition is met, wherein the preset background uploading condition is a preset condition for ensuring successful background uploading.
In the embodiment of the application, the terminal switches the first object to the second object, and after the service function corresponding to the second object is realized, the second object becomes an object currently running by the terminal. And when the terminal runs the service on the second object, judging whether the current state of the terminal meets the preset background uploading condition.
In the embodiment of the application, since the uploading of data is an operation consuming network resources and terminal system resources, the background uploading needs to be started under a preset background uploading condition, the preset background uploading condition is a judgment condition ensuring successful background uploading, and the condition that the preset background uploading condition is met indicates that the current state of the terminal can be used for background uploading of larger data.
In an embodiment of the present application, the preset background upload condition may include at least one of: network connection speed, usage status, and power.
In the embodiment of the application, the network connection speed in the background uploading condition is preset to check whether the terminal has a network condition capable of uploading larger data, and in some embodiments, the terminal can judge whether the terminal is connected with a wireless network or a 5G network; the use state in the background uploading condition is preset to ensure that the terminal is in an idle state at present, so as to avoid seizing system resources when the background uploading service is concurrent with the operation of a user on the terminal, and in some embodiments, the terminal can judge whether the terminal has received an operation instruction within a preset time; the preset electric quantity in the background uploading condition is to ensure that uploading interruption caused by power failure does not occur in the background uploading process, so that data loss is avoided.
In practical application, the preset background uploading condition may also be another preset condition that can ensure successful background uploading, and is specifically selected according to an actual situation, which is not limited in the embodiment of the present application.
In some embodiments, when the network connection speed is good, the operation instruction is not received within the preset time, and the electric quantity is sufficient, the terminal may determine that the terminal in the current state meets the preset background uploading condition.
And S403, when the preset background uploading condition is met, sending the first usage data background to a server.
In the embodiment of the application, when the terminal meets the preset background uploading condition, the terminal sends the first usage data to the server in the background in the running process of the second object.
In the embodiment of the application, the terminal sends the first usage data to the server in the background to support breakpoint uploading.
And S404, when the preset background uploading condition is not met, the first use data is not sent.
In the embodiment of the application, when the terminal judges that the terminal does not meet the preset background uploading condition, the terminal does not send the first usage data, the first usage data is continuously stored in the local of the terminal, and the terminal uploads the first usage data when the terminal meets the preset background uploading condition in subsequent use.
In some embodiments of the present application, the specific implementation of S103 may also be as shown in fig. 5, including S501-S506, as follows:
s501, under the condition of network connection, if the first usage data is larger than a preset uploading value, first priority uploading data is determined from the first usage data, and the first priority uploading data is part of the first usage data which is sent to a server before the first object is switched to a second object.
In the embodiment of the present application, the first usage data often includes a system configuration file of the first object, a personal file stored by the first object, historical data of the first object on the usage of the terminal service, and the like. The first use data of the system configuration file type is small, uploading can be completed rapidly, and consumption of network resources and terminal system resources is low. Therefore, when the terminal uploads the first usage data larger than the preset value, the first priority upload data can be determined from the first usage data, and the first priority upload data is sent to the server before the first object is switched to the second object. Therefore, the fact that part of the smaller and more important first use data can be uploaded to the server in advance can be guaranteed, and the situation that all the first use data cannot be uploaded all the time due to the fact that the terminal does not meet the preset background condition is avoided.
In some embodiments, the first priority upload data may be a smaller system configuration file, or other types of first usage data may be selected according to an actual situation, which is not specifically limited in this embodiment of the application.
And S502, sending the first priority upload data to a server.
In the embodiment of the application, the terminal sends the first priority upload data to the server in the running process of the first object.
S503, switching the first object to the second object, and realizing the service function corresponding to the second object.
In the embodiment of the application, after the terminal sends the first priority upload data to the server, the first object is switched to the second object, and a service function corresponding to the second object is realized.
In the embodiment of the application, after the terminal sends the first priority upload data to the server, the other part of the first usage data except the first priority upload data needs to be uploaded after the switching is completed, so that the terminal switches the first object to the second object, a service function corresponding to the second object is realized, and an object currently running by the terminal is switched to the second object.
In this embodiment of the application, the method for the terminal to switch the first object to the second object to implement the service function corresponding to the second object is the same as the method in S201 to S205, and details are not repeated here.
S504, when the second object runs the service, judging whether a preset background uploading condition is met;
in this embodiment of the application, when the second object runs the service, the method for determining whether the preset background uploading condition is met by the terminal is the same as that of S402.
And S505, when the preset background uploading condition is met, sending the data except the first priority uploading data in the first using data to a server.
In the embodiment of the application, when the preset background uploading condition is met, the terminal sends the data except the first priority uploading data in the first using data to the server.
In the embodiment of the present application, the principle of sending, by the terminal, data other than the first priority upload data among the first usage data to the server is the same as S403.
And S506, when the preset background uploading condition is not met, the first use data is not sent.
In the embodiment of the application, when the terminal judges that the terminal does not meet the preset background uploading condition, the terminal does not send the first usage data, the first usage data is continuously stored in the local of the terminal, and the terminal uploads the first usage data when the terminal meets the preset background uploading condition in subsequent use.
It can be understood that when the first usage data is larger than the preset upload value, the terminal switches the first object to the second object first, so that the switching waiting time is reduced, and when the terminal meets the preset upload condition, the first usage data is sent to the server through the background. Furthermore, the terminal can also determine first priority upload data in the first usage data, upload the first priority upload data to the server in time before switching the first object to the second object, and send the remaining part of the first usage data to the server when the terminal meets a preset upload condition after switching the first object to the second object. Correspondingly, when the first using data is larger than the preset uploading value, the terminal can also carry out targeted pulling and recovery on the second using data from the server, and the process of switching the first object to the second object is completed. By adopting the method of the embodiment of the application, the terminal can correspondingly backup and restore the use data according to different objects in the terminal, thereby avoiding uniformly backing up and restoring the use data of all the objects in the terminal, reducing the data volume of the use data needing to be maintained locally at the terminal and the data volume to be transmitted by uploading and pulling the data on the server when the objects are switched, and further improving the utilization rate of the storage space and the switching speed; moreover, after the terminal finishes uploading the first use data and obtains the backup of the first use data on the server, the terminal deletes the local first use data, so that the storage space for maintaining the use data corresponding to the first object by the terminal is saved, and the utilization rate of the storage space is further improved; furthermore, when the first usage data is larger than the preset uploading value, the terminal can ensure that the first usage data is successfully uploaded to the server on the premise that the first object is switched to the second object, and the terminal switching speed is further improved.
In some embodiments of the present application, after S102 and S103, an embodiment of the present application provides a data switching method, which may further include: and S104. The following were used:
and S104, deleting the local first using data when the uploading of the first using data is finished.
In the embodiment of the application, when the uploading of the first usage data is completed, it is described that the first usage data has been successfully backed up on the server, and therefore, in order to save the storage space of the terminal and improve the utilization rate of the storage space of the terminal, the terminal deletes the local first usage data and releases the local storage space occupied by the first usage data.
It can be understood that, in the embodiment of the present application, when the uploading of the first usage data is completed, the terminal deletes the local first usage data, so that the local data maintenance amount and the occupation of the storage space of the terminal are reduced, and the utilization rate of the local storage space of the terminal is further improved.
In some embodiments of the present application, after S101, an embodiment of the present application provides a data handover method, where the method further includes: and S105. The following were used:
and S105, directly switching the first object to the second object under the condition of no network connection.
In the embodiment of the application, when the terminal is in a condition without network connection, data cannot be uploaded and pulled through the network, so that the terminal does not upload the first usage data or pull the second usage data, and directly switches the first object to the second object.
In some embodiments of the present application, before S101, an embodiment of the present application further provides a data handover method, which is applied to a terminal, and as shown in fig. 6, the method may include:
s601, judging whether a terminal network storage space exists or not, wherein the terminal network storage space is a network storage space for storing self-uploaded data on a server.
In this embodiment, based on S101, before the terminal acquires the first usage data, it may first determine whether a terminal network storage space exists.
In the embodiment of the application, the terminal network storage space is a network storage space for storing the uploaded data on the server, the terminal network storage space corresponds to the terminal, and the server allocates the corresponding terminal network storage space for each terminal.
In some embodiments, the terminal may be associated with the terminal storage space on the server by a unique terminal identifier, and the association may be that the terminal registers on the server in the form of an account, and establishes a corresponding terminal storage space through the registration, and the terminal is associated with the account through which data on the terminal can be accessed and saved. The association method may be other methods, and is specifically selected according to the actual situation, and the embodiment of the present application is not limited. Illustratively, the mobile phone creates a cloud-stored account through the system setting menu, and data on the mobile phone can be uploaded to the cloud server for backup through the account.
In some embodiments, the terminal determines whether the terminal network storage space exists, and may determine whether the terminal establishes or associates an account on the server, and when the terminal does not establish or associate an account on the server, it is determined that the terminal network storage space does not exist.
S602, when the terminal network storage space does not exist, sending a new network storage space request to the server, wherein the new network storage space request is used for applying for the corresponding network storage space of the server.
In the embodiment of the application, when the terminal determines that the network storage space does not exist, in order to obtain the storage space of the terminal data on the server, the terminal sends a request for creating the network storage space to the server.
In the embodiment of the application, the request for newly establishing the network storage space is used for applying for the network storage space corresponding to the terminal from the server. In some embodiments, the request for establishing network storage space may include a unique identifier of the terminal, an object identifier included in the terminal, or a size of the network storage space to be applied, so that the server may correspondingly establish and allocate the network storage space of the terminal.
S603, receiving a response of the server to the request of the new network storage space, and completing the establishment process of the terminal network storage space.
In the embodiment of the application, after sending the new network storage space request to the server, the terminal receives a response of the server to the new network storage space request.
In some embodiments, the response to the request for new network storage space may include whether the allocation of the terminal network storage space is successful, confirmation of the association between the terminal network storage space and the terminal, or the size of the terminal network storage space.
In the embodiment of the application, after receiving the response to the request for creating the network storage space returned by the server, the terminal can acquire the network storage space of the terminal from the response message of the terminal, and complete the establishment process of the network storage space of the terminal.
Based on the above implementation, the sending of the first usage data to the terminal network storage space on the server in the above embodiment of the present application is actually: the first usage data is sent to a terminal network storage space on a server.
In the embodiment of the application, when the terminal determines that the terminal storage space does not exist, the terminal applies for the network storage space corresponding to the terminal from the server, and then the terminal sends the usage data of the terminal object on the server to the terminal network storage space corresponding to the terminal on the server.
It can be understood that, in the embodiment of the present application, before the terminal acquires the first usage data, the corresponding terminal storage space is established on the server, so that when the first usage data is sent to the server, the server can correspondingly store the first usage data in the network storage space corresponding to the terminal, and obtain a backup of the first usage data on the server, thereby improving the utilization rate of the local storage of the terminal. An embodiment of the present application provides a data switching method, which is applied to a server, and as shown in fig. 7, the method may include:
s701, first using data sent by the terminal are received, the first using data are data generated when a first object performs business in the terminal, and the first object is an object currently running in the terminal.
In the embodiment of the application, after the terminal sends the first usage data to the server, the server receives the first usage data sent by the terminal correspondingly. Correspondingly, the first usage data is data generated when the first object performs a service in the terminal, and the first object is an object currently running in the terminal.
S702, storing the received first use data to a first network storage space, wherein the first network storage space is a network storage space corresponding to a first object in the network storage space of the terminal.
In the embodiment of the application, after the server receives the first usage data sent by the terminal, the first usage data is correspondingly stored in the first network storage space. The first network storage space is a network storage space corresponding to the first object on the server.
In this embodiment of the present application, the first network storage space is located in a terminal storage space on the server, and is a network storage space corresponding to the first object, and is used for storing the first usage data.
In some embodiments, the first network storage space may be associated with an account number of the first object, for example, the user a registers the first network storage space of the user a in the terminal storage space through a mobile phone number or a personal social account number, and binds the mobile phone number or the personal social account number with the first network storage space, so that when the server receives the first usage data of the user a, the server correspondingly stores the first usage data in the first network storage space corresponding to the user a.
It can be understood that, in the embodiment of the present application, the server receives the first data and stores the first data in the network storage space corresponding to the first object. By adopting the method in the embodiment of the application, the server can perform independent data management according to different objects, and subdividing of multi-object use data is realized, so that the use data of corresponding objects can be selected in a targeted manner to be acquired when the terminal performs data switching, the situation that the server receives the use data of all the objects at the same time and does not distinguish and store the use data of all the objects uniformly so as to cause that the use data of a specific single object cannot be provided for the terminal is avoided, the transmission data volume of the use data needing to be transmitted through a network when the terminal switches the objects is reduced, and the switching speed is improved.
In some embodiments of the present application, after S501, the present application implementation further provides a data method applied to a server, as shown in fig. 8, where the method may include:
s801, receiving a pull message of second usage data sent by the terminal, wherein the second usage data is data generated when a second object performs a service in the terminal, and the second object is a target object to be switched.
In the embodiment of the application, after the terminal sends the pull message of the second usage data to the server, the server receives the pull message of the second usage data sent by the terminal. Correspondingly, the second usage data is data generated when the second object performs a service in the terminal, and the second object is a target object to be switched.
S802, responding to the pulling message of the second use data, and sending the second use data stored in the second network storage space to the terminal, wherein the second network storage space is a storage space on the server corresponding to the second object in the network storage space of the terminal.
In this embodiment of the application, after receiving the pull message of the second usage data, the server will respond to the pull message of the second usage data, find the second usage data stored in the second network storage space from the terminal storage space on the server, and send the second usage data to the terminal, where correspondingly, the second network storage space is a storage space on the server corresponding to the second object in the network storage space of the terminal.
It can be understood that, in the embodiment of the present application, the server receives and sends the second usage data stored in the second network storage space to the terminal in response to the pull message of the second usage data. By adopting the method in the embodiment of the application, when the terminal switches the object and the use data of the switching target object needs to be acquired from the server, the server can specifically and independently send the second use data to the terminal, so that the use data of all objects of the terminal stored on the server are prevented from being sent to the terminal, the network transmission quantity is reduced, and the data switching speed of the terminal is improved.
In some embodiments of the present application, before S501, the present application implementation further provides a data method applied to a server, as shown in fig. 9, where the method may include:
and S901, receiving a new network storage space request sent by a terminal.
In the embodiment of the application, when the terminal storage space does not exist, the terminal sends a request for creating the network storage space to the server, and correspondingly, the server receives the request for creating the network storage space sent by the terminal.
S902, distributing a terminal network storage space based on a newly-built network storage space request, wherein the terminal network storage space is a network storage space for uploading data by a storage terminal and comprises a first network storage space corresponding to a first object and a second network storage space corresponding to a second object, the first network storage space is used for storing first use data, and the second network storage space is used for storing second use data.
In the embodiment of the application, after receiving a new network storage space request sent by a terminal, a server may obtain information such as a unique identifier of the terminal and an object identifier included in the terminal from the new network storage space request, and then allocate a terminal network storage space based on the information in the new network storage space request. The terminal network storage space is used for storing data uploaded by a corresponding terminal, and the server divides the terminal network storage space into a first network storage space and a second network storage space according to an object on the terminal, wherein the first network storage space corresponds to a first object and is used for storing first use data; the second network storage space corresponds to the first object for storing the second usage data.
In some embodiments, the first storage space and the second storage space may be respectively associated with account numbers established by the first object and the second object, for example, the first object is bound with the first storage space through a mobile phone number, data in the first storage space may be logged in and accessed through the mobile phone number of the first object, and the terminal needs to log in a mobile phone number account of the first object when uploading the first usage data; the second object is bound with the second storage space through the social network account, data in the second storage space can be logged in and accessed through the social network account of the second object, and the terminal needs to log in the social network account of the second object first when uploading the second use data.
And S903, sending a response to the request for newly building the network storage space to the terminal.
In the embodiment of the application, after the server allocates the terminal storage space to the terminal, a response to the request for the new network storage space is returned to the terminal, and the terminal is notified that the network storage space is already established.
It can be understood that, in the embodiment of the present application, the server receives a request for creating a network storage space sent by the terminal, and in the terminal network storage space created for the terminal, distinguishes, according to an object in the terminal, a first network storage space and a second network storage space, which are used for storing the first usage data and the second usage data, respectively. By adopting the method provided by the embodiment of the application, the server can store the use data of multiple objects in a distinguishing way when the server establishes a network storage space for the terminal, so that when the terminal switches the objects and the use data of the target switching object needs to be pulled from the server in a targeted way, the server can accurately send the use data of the corresponding object to the terminal, thereby reducing the network transmission quantity and improving the speed of terminal data switching.
An embodiment of the present application further provides a method for data handover, which is applied to interaction between a terminal and a server, and as shown in fig. 10, the method may include:
s1001, the terminal sends the first use data to the server.
S1002, the server stores the received first use data in a first network storage space.
S1003, the terminal sends a pull message of the second usage data to the server.
And S1004, the server responds to the pull message of the second use data and sends the second use data stored in the second network storage space to the terminal.
S1005, the terminal pulls the second usage data from the server according to the response of the pull message.
It can be understood that, in the embodiment of the present application, when the terminal performs data switching, the terminal sends the first usage data to the server, after receiving the first usage data, the server correspondingly stores the first usage data in the first storage space, and then the terminal pulls the second usage data from the server, and the server sends the second usage data stored in the second network storage space to the terminal. By adopting the method in the embodiment of the application, when the terminal switches data, only the first use data of the first object can be uploaded to the server correspondingly, and then the second use data of the second object can be pulled in a targeted manner from the server side, so that the uploading and pulling of the use data of all terminal objects are avoided, the data volume of network transmission during switching is reduced, and the switching speed of data switching is improved.
In this embodiment of the present application, when there is no storage space of the terminal network, an embodiment of the present application further provides a method for data handover, which is applied to interaction between a terminal and a server, as shown in fig. 11, the method may include:
s1101, the terminal sends a request for creating a network storage space to the server.
S1102, the server allocates a terminal network storage space based on the request of the newly-built network storage space, wherein the terminal network storage space comprises a first network storage space corresponding to the first object and a second network storage space corresponding to the second object, the first network storage space is used for storing first use data, and the second network storage space is used for storing second use data.
S1103, the server sends a response to the request of the new network storage space to the terminal.
And S1104, the terminal completes the establishment process of the network storage space based on the response of the request for establishing the network storage space.
It can be understood that, in this embodiment of the present application, when there is no terminal network storage space, the terminal may send a request for a newly created network storage space to the server, after the server receives the request for the newly created network storage space, the terminal network storage space is allocated based on the request for the newly created network storage space, then the server sends a response to the request for the newly created network storage space to the terminal, and the terminal receives a response of the server to the request for the newly created network storage space and acquires the terminal network storage space based on the response. By adopting the method in the embodiment of the application, the terminal can establish the corresponding terminal network storage space on the server before data switching is carried out, and each object in the terminal can be independently stored and maintained in the terminal network storage space, so that the use data of a single object can be independently obtained on the server, the use data pulling of all terminal objects is avoided, the data volume of network transmission during switching is reduced, and the switching speed of data switching is improved.
The embodiment of the application provides a terminal, which corresponds to a data switching method; fig. 16 is a schematic structural diagram of a terminal according to an embodiment of the present application, as shown in fig. 16, the terminal 16 includes:
an acquisition unit 161 and an execution unit 162; wherein the content of the first and second substances,
an obtaining unit 161, configured to obtain, when a switching instruction for switching from a first object to a second object is received, first usage data corresponding to the first object, where the first object is an object currently running in the terminal, the second object is a target object to be switched, and the first usage data is data generated when the first object performs a service in the terminal;
an execution unit 162, configured to, in a case of being connected to a network, send the first usage data to a server and then switch the first object to the second object to implement a service function corresponding to the second object if the first usage data is smaller than a preset upload value; or, if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is realized, sending the first usage data to the server.
In some embodiments, the execution unit 162 is further configured to detect whether there is second usage data corresponding to the second object locally, where the second usage data is data generated when the second object performs a service in a terminal; when the second usage data does not exist locally, sending a pull message of the second usage data to the server; receiving a response of the server to the pull message, and pulling the second usage data from the server; and recovering the second use data in local, completing the process of switching the first object to the second object, and realizing the service function corresponding to the second object by adopting the second use data.
In some embodiments, the execution unit 162 is further configured to display an inquiry window on the current display interface if the first usage data is smaller than a preset upload value, where the inquiry window is used to inquire whether to upload the first usage data immediately; when a determination instruction for triggering the inquiry window is received, sending the first usage data to the server; and after the first use data is sent, switching the first object to the second object to realize the service function corresponding to the second object.
In some embodiments, the execution unit 162 is further configured to cancel uploading the first usage data when a cancel instruction that triggers the query window is received.
In some embodiments, the execution unit 162 is further configured to switch the first object to the second object to implement a service function corresponding to the second object if the first usage data is greater than the preset upload value; when the second object runs the service, judging whether a preset background uploading condition is met, wherein the preset background uploading condition is a judgment condition for ensuring successful background uploading; and when the preset background uploading condition is met, the first usage data background is sent to the server.
In some embodiments, the execution unit 162 is further configured to determine, if the first usage data is greater than the preset upload value, first priority upload data from the first usage data, where the first priority upload data is the first usage data that needs to be sent to the server before the first object is switched to the second object; sending the first priority upload data to the server; switching the first object to the second object to realize a service function corresponding to the second object; when the second object runs the service, judging whether a preset background uploading condition is met; and when the preset background uploading condition is met, sending the data except the first priority uploading data in the first using data to the server.
In some embodiments, the preset background upload condition comprises at least one of: network connection speed, usage status, and power.
In some embodiments, the execution unit 162 is further configured to prohibit sending of the first usage data when the preset background upload condition is not satisfied.
In some embodiments, the execution unit 162 is further configured to delete the local first usage data when the uploading of the first usage data is completed.
In some embodiments, the execution unit 162 is further configured to, when the second usage data exists, implement a business function corresponding to the second object by using the second usage data in the local area.
In some embodiments, the execution unit 162 is further configured to directly switch the first object to the second object without network connection.
In some embodiments, the execution unit 162 is further configured to determine whether a terminal network storage space exists, where the terminal network storage space is a network storage space in which the server stores data uploaded by the server; when the terminal network storage space does not exist, sending a new network storage space request to the server, wherein the new network storage space request is used for applying for a network storage space corresponding to the new network storage space request to the server; and receiving the response of the server to the request for establishing the network storage space newly, and finishing the establishment process of the terminal network storage space.
In some embodiments, the executing unit 162 is further configured to send the first usage data to the terminal network storage space on the server.
The embodiment of the application provides a server, which corresponds to a data switching method; fig. 17 is a first schematic structural diagram of a server according to an embodiment of the present application, and as shown in fig. 17, the server 17 includes:
a receiving unit 171 and a storage unit 172; wherein the content of the first and second substances,
a receiving unit 171, configured to receive first usage data sent by a terminal, where the first usage data is data generated when a first object performs a service in the terminal, and the first object is an object currently running in the terminal;
a storage unit 172, configured to store the received first usage data in a first network storage space, where the first network storage space is a network storage space corresponding to the first object in the network storage space of the terminal.
In some embodiments, the receiving unit 171 is further configured to receive a pull message of second usage data sent by the terminal, where the second usage data is data generated when a second object performs a service in the terminal, and the second object is a target object to be switched.
In some embodiments, the server 17 further comprises:
a sending unit 173, configured to respond to the pull message of the second usage data, and send the second usage data stored in a second network storage space to the terminal, where the second network storage space is a storage space on the server corresponding to the second object in the network storage space of the terminal.
In some embodiments, the receiving unit 171 is further configured to receive a new network storage space request sent by the terminal.
In some embodiments, the server 17 further comprises:
the allocating unit 174 is configured to allocate a terminal network storage space based on the newly-built network storage space request, where the terminal network storage space is a network storage space for storing the terminal upload data and includes a first network storage space corresponding to the first object and a second network storage space corresponding to the second object, the first network storage space is used to store the first usage data, and the second network storage space is used to store the second usage data.
The embodiment of the application provides a terminal, which corresponds to a data switching method; fig. 18 is a schematic structural diagram of a terminal according to an embodiment of the present application, and as shown in fig. 18, the terminal 18 includes:
the first processor 184, a first memory 185 and a first communication bus 186, the first memory 185 communicates with the first processor 184 through the first communication bus 186, the first memory 185 stores one or more programs executable by the first processor 184, and when the one or more programs are executed, the first processor 184 executes any one of the data switching methods according to the foregoing embodiments.
The embodiment of the application provides a server, which corresponds to a data switching method; fig. 19 is a schematic structural diagram of a server according to an embodiment of the present application, and as shown in fig. 19, the server 19 includes:
a second processor 194, a second memory 195 and a second communication bus 196, the second memory 195 communicating with the second processor 194 through the second communication bus 196, the second memory 195 storing one or more programs executable by the second processor 194, the second processor 194 performing any one of the data switching methods as in the previous embodiments when the one or more programs are executed.
The embodiment of the present application provides a computer-readable storage medium, which is applied to a terminal, and the computer-readable storage medium stores one or more programs, the one or more programs are executable by one or more first processors 184, and when the program is executed by the first processors 184, the data handover method according to the embodiment of the present application is implemented.
The embodiment of the present application provides a computer-readable storage medium, which is applied to a server, and the computer-readable storage medium stores one or more programs, the one or more programs are executable by one or more second processors 194, and when the program is executed by the second processor 194, the data handover method according to the embodiment of the present application is implemented.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (22)

1. A data switching method is applied to a terminal and is characterized by comprising the following steps:
when a switching instruction for switching from a first object to a second object is received, acquiring first use data corresponding to the first object, wherein the first object is an object currently running in the terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs a service in the terminal;
under the condition of network connection, if the first usage data is smaller than a preset uploading value, the first usage data is sent to a server, and then the first object is switched to the second object, so that a service function corresponding to the second object is realized; or, if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is realized, sending the first usage data to the server.
2. The method of claim 1, wherein switching the first object to the second object to implement a business function corresponding to the second object comprises:
detecting whether second use data corresponding to the second object exists locally or not, wherein the second use data are data generated when the second object performs service in a terminal;
when the second use data does not exist locally, sending a pull message of the second use data to the server;
receiving a response of the server to the pull message, and pulling the second usage data from the server;
and recovering the second use data in local, completing the process of switching the first object to the second object, and realizing the service function corresponding to the second object by adopting the second use data.
3. The method of claim 1, wherein if the first usage data is smaller than a preset upload value, after the first usage data is sent to a server, the first object is switched to the second object, so as to implement a service function corresponding to the second object, and the method includes:
if the first usage data is smaller than a preset uploading value, displaying an inquiry window on a current display interface, wherein the inquiry window is used for inquiring whether to upload the first usage data immediately;
when a determination instruction for triggering the inquiry window is received, sending the first usage data to the server;
and after the first use data is sent, switching the first object to the second object to realize the service function corresponding to the second object.
4. The method of claim 3, wherein after displaying the query window on the current display interface if the first usage data is less than the predetermined upload value, the method further comprises:
and canceling the uploading of the first usage data when a canceling instruction for triggering the inquiry window is received.
5. The method of claim 1, wherein if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is implemented, sending the first usage data to the server comprises:
if the first use data is larger than the preset upload value, switching the first object to the second object to realize a service function corresponding to the second object;
when the second object runs the service, judging whether a preset background uploading condition is met, wherein the preset background uploading condition is a judgment condition for ensuring successful background uploading;
and when the preset background uploading condition is met, the first usage data background is sent to the server.
6. The method according to claim 1, wherein if the first usage data is greater than the preset upload value, the first object is switched to the second object, and after a service function corresponding to the second object is implemented, the first usage data is sent to the server, and the method further includes:
if the first usage data is larger than the preset uploading value, determining first priority uploading data from the first usage data, wherein the first priority uploading data is part of the first usage data which is sent to the server before the first object is switched to the second object;
sending the first priority upload data to the server;
switching the first object to the second object to realize a service function corresponding to the second object;
when the second object runs the service, judging whether a preset background uploading condition is met;
and when the preset background uploading condition is met, sending the data except the first priority uploading data in the first using data to the server.
7. The method according to claim 5 or 6,
the preset background uploading condition comprises at least one of the following conditions: network connection speed, usage status, and power.
8. The method according to claim 5 or 6, wherein after determining whether the preset background uploading condition is met, the method further comprises:
and when the preset background uploading condition is not met, prohibiting the first usage data from being sent.
9. The method according to any one of claims 1 to 6, wherein in the case of connecting to a network, if the first usage data is smaller than a preset upload value, after the first usage data is sent to a server, the first object is switched to the second object, and after a service function corresponding to the second object is implemented; or, if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is implemented, sending the first usage data to the server, where the method further includes:
and when the uploading of the first usage data is completed, deleting the local first usage data.
10. The method of claim 2, wherein after detecting whether second usage data corresponding to the second object is locally present, the method further comprises:
and when the second use data exist, the second use data in the local area are adopted to realize the business function corresponding to the second object.
11. The method of claim 1, wherein after the obtaining the first usage data corresponding to the first object, the method further comprises:
switching the first object directly to the second object without a network connection.
12. The method of claim 1, wherein prior to obtaining the first usage data corresponding to the first object, the method further comprises:
judging whether a terminal network storage space exists or not, wherein the terminal network storage space is a network storage space for storing self-uploaded data on the server;
when the terminal network storage space does not exist, sending a new network storage space request to the server, wherein the new network storage space request is used for applying for a corresponding network storage space to the server;
and receiving the response of the server to the newly-built network storage space request, and finishing the building process of the terminal network storage space.
13. The method of claim 12, wherein sending the first usage data to a server comprises:
and sending the first usage data to the terminal network storage space on the server.
14. A data switching method is applied to a server and is characterized by comprising the following steps:
the receiving terminal switches the first object to the first usage data sent before the second object under the condition that the first usage data is determined to be smaller than a preset uploading value, or the receiving terminal switches the first object to the first usage data sent after the second object under the condition that the first usage data is determined to be larger than the preset uploading value;
storing the received first usage data to a first network storage space, wherein the first network storage space is a network storage space corresponding to the first object in the network storage space of the terminal;
the first usage data is data generated when the first object performs a service in the terminal, the first object is an object currently running in the terminal, the first usage data is obtained when the terminal receives a switching instruction for switching from the first object to the second object, and the second object is a target object to be switched.
15. The method of claim 14, wherein after depositing the received first usage data to a first network storage space, the method further comprises:
receiving a pull message of second usage data sent by a terminal, wherein the second usage data is data generated when a second object performs service in the terminal, and the second object is a target object to be switched;
and responding to the pull message of the second usage data, and sending the second usage data stored in a second network storage space to the terminal, wherein the second network storage space is a storage space on the server corresponding to the second object in the network storage space of the terminal.
16. The method of claim 14, wherein before the receiving the first usage data sent by the terminal, the method further comprises:
receiving a new network storage space request sent by the terminal;
allocating a terminal network storage space based on the newly-built network storage space request, wherein the terminal network storage space is a network storage space for storing the terminal upload data and comprises a first network storage space corresponding to the first object and a second network storage space corresponding to the second object, the first network storage space is used for storing the first use data, and the second network storage space is used for storing the second use data;
and sending a response to the request of the newly-built network storage space to the terminal.
17. A terminal, characterized in that the terminal comprises: an acquisition unit and an execution unit; wherein the content of the first and second substances,
the acquiring unit is used for acquiring first use data corresponding to a first object when a switching instruction for switching from the first object to a second object is received, wherein the first object is an object currently running in the terminal, the second object is a target object to be switched, and the first use data is data generated when the first object performs a service in the terminal;
the execution unit is configured to, in a case of being connected to a network, send the first usage data to a server and then switch the first object to the second object if the first usage data is smaller than a preset upload value, so as to implement a service function corresponding to the second object; or, if the first usage data is greater than the preset upload value, switching the first object to the second object, and after a service function corresponding to the second object is realized, sending the first usage data to the server.
18. A server, characterized in that the server comprises: a receiving unit and a storage unit; wherein the content of the first and second substances,
the receiving unit is used for receiving first usage data sent before the terminal switches the first object to the second object when the first usage data is determined to be smaller than a preset uploading value, or receiving first usage data sent after the terminal switches the first object to the second object when the first usage data is determined to be larger than the preset uploading value;
the storage unit is configured to store the received first usage data in a first network storage space, where the first network storage space is a network storage space corresponding to the first object in the network storage space of the terminal;
the first usage data is data generated when the first object performs a service in the terminal, the first object is an object currently running in the terminal, the first usage data is obtained when the terminal receives a switching instruction for switching from the first object to the second object, and the second object is a target object to be switched.
19. A terminal, characterized in that the terminal comprises: a first processor, a first memory, and a first communication bus, the first memory in communication with the first processor through the first communication bus, the first memory storing one or more programs executable by the first processor, the first processor performing the method of any of claims 1-13 when the one or more programs are executed.
20. A server, characterized in that the server comprises: a second processor, a second memory, and a second communication bus, the second memory in communication with the second processor through the second communication bus, the second memory storing one or more programs executable by the second processor, the second processor performing the method of any of claims 14-16 when the one or more programs are executed.
21. A computer-readable storage medium for use in a terminal, the computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more first processors to implement the method of any of claims 1-13.
22. A computer-readable storage medium applied to a server, wherein the computer-readable storage medium stores one or more programs, the one or more programs being executable by one or more second processors to implement the method of any one of claims 14-16.
CN201910750503.3A 2019-08-14 2019-08-14 Data switching method, terminal, server and computer readable storage medium Active CN110519346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910750503.3A CN110519346B (en) 2019-08-14 2019-08-14 Data switching method, terminal, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910750503.3A CN110519346B (en) 2019-08-14 2019-08-14 Data switching method, terminal, server and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110519346A CN110519346A (en) 2019-11-29
CN110519346B true CN110519346B (en) 2022-06-07

Family

ID=68625105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910750503.3A Active CN110519346B (en) 2019-08-14 2019-08-14 Data switching method, terminal, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110519346B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182002A (en) * 2020-09-27 2021-01-05 北京字节跳动网络技术有限公司 Data disaster tolerance method and device, electronic equipment and computer readable medium
CN113411265B (en) * 2021-06-09 2022-07-29 南方电网数字电网研究院有限公司 Power grid monitoring system preposition service channel dynamic adjusting method based on risk prediction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559455A (en) * 2013-09-27 2014-02-05 李天才 Android device personal information protection method based on user identification
CN104516777A (en) * 2013-10-04 2015-04-15 三星电子株式会社 User interface management method and system
CN106791084A (en) * 2016-12-19 2017-05-31 广东欧珀移动通信有限公司 The synchronous method and mobile terminal of personalizing parameters

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150012400A1 (en) * 2013-07-08 2015-01-08 Capital One Financial Corporation Systems and methods for switching credit card accounts

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559455A (en) * 2013-09-27 2014-02-05 李天才 Android device personal information protection method based on user identification
CN104516777A (en) * 2013-10-04 2015-04-15 三星电子株式会社 User interface management method and system
CN106791084A (en) * 2016-12-19 2017-05-31 广东欧珀移动通信有限公司 The synchronous method and mobile terminal of personalizing parameters

Also Published As

Publication number Publication date
CN110519346A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
US10117253B2 (en) Mobile terminal and resource management method of mobile terminal
CN110519346B (en) Data switching method, terminal, server and computer readable storage medium
JP5137781B2 (en) Mobile device and application switching method
CN104461744A (en) Resource allocation method and device
CN106790092B (en) Remote procedure call server control system and method
CN114096953A (en) Memory management method and device, electronic equipment and computer readable medium
CN109766172B (en) Asynchronous task scheduling method and device
CN106502840B (en) A kind of data back up method, apparatus and system
CN102932409B (en) The method and system that a kind of virtual machine moves online
CN107291395B (en) LUN online capacity expansion method and system
CN103379185A (en) Method, device and system for network address translation
CN106776013B (en) Multi-system resource scheduling method and device
CN106547628B (en) Multi-system resource release method and device
CN106528333A (en) Data backup method and apparatus
CN103179153B (en) Mobile terminal and mobile terminal data backup method based on cloud server
CN112711469A (en) Cloud host migration method and device, computer equipment and storage medium
CN105487921B (en) A kind of task stack management method and device
CN109936462B (en) Disaster recovery method and device
CN103064793B (en) Simplify configuration capacity recovery method and system
CN114629958A (en) Resource allocation method, device, electronic equipment and storage medium
CN104346228A (en) Application program sharing method and terminal
CN114726664A (en) Household equipment binding method and equipment
CN108092790B (en) Management method and device
CN111026048B (en) Data processing method, device and storage medium
CN114168254A (en) Data processing method, device and equipment

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