WO2021233351A1 - Data transfer method and device, and terminal and computer-readable storage medium - Google Patents

Data transfer method and device, and terminal and computer-readable storage medium Download PDF

Info

Publication number
WO2021233351A1
WO2021233351A1 PCT/CN2021/094701 CN2021094701W WO2021233351A1 WO 2021233351 A1 WO2021233351 A1 WO 2021233351A1 CN 2021094701 W CN2021094701 W CN 2021094701W WO 2021233351 A1 WO2021233351 A1 WO 2021233351A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
transferred
dual
directory
target
Prior art date
Application number
PCT/CN2021/094701
Other languages
French (fr)
Chinese (zh)
Inventor
唐宗丽
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021233351A1 publication Critical patent/WO2021233351A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Definitions

  • This application relates to the field of terminal technology, in particular to data transfer methods and devices, terminals, and computer-readable storage media.
  • the single-system version can be directly upgraded to the dual-system version through a version upgrade.
  • the original single system data is placed under the root system of the dual system, and the living system and work system directly used by the user cannot directly obtain the original single system data in the root system. That is, for the user, the original single system data is lost, which brings a bad experience to the user.
  • the commonly used method is to use the backup and recovery function to back up the single system data before the system upgrade, and then perform the recovery operation in the system directly used by the user after the upgrade.
  • an embodiment of the present application provides a data transfer method, including:
  • the data to be transferred in the root system is transferred to the target system.
  • an embodiment of the present application provides a data transfer device, including:
  • the detection module is configured to detect the system status and data validity after receiving the dual-system start instruction
  • the transfer module is configured to transfer the data to be transferred in the root system to the target system when the system status and data validity meet the data transfer conditions.
  • an embodiment of the present application provides a terminal, and the terminal includes:
  • One or more processors are One or more processors;
  • Memory configured to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the data transfer method in the embodiment of the present application.
  • an embodiment of the present application provides a computer-readable storage medium that stores a computer program that implements the data transfer method in the embodiment of the present application when the computer program is executed by a processor.
  • FIG. 1 is a schematic flowchart of a data transfer method provided by this application.
  • Figure 2 is a schematic diagram of the single system upgrade dual system and user data transfer process provided by the application
  • FIG. 3 is a flow chart of the single system upgrade dual system provided by this application.
  • Fig. 4 is a flowchart of the method for judging whether the data transfer condition is satisfied provided by the present application
  • FIG. 5 is a schematic structural diagram of a data transfer device provided by this application.
  • Fig. 6 is a schematic structural diagram of a terminal provided by the present application.
  • a smart terminal has two systems visible to the user at the same time. Work and life are independent of each other.
  • the system currently displayed on the terminal screen is the foreground system, and the other is the background system.
  • the background system is also running and can receive messages.
  • users can easily switch between the two systems, which not only meets the needs of users' lives and work without interfering with each other, but also is convenient and quick to use.
  • dual-system terminals use container technology, share a core, and support the operation of two systems through lightweight virtualization technology.
  • the living system and working system are isolated at the operating system layer, and the root file systems, processes and networks of the two systems Complete isolation.
  • the dual-system terminal architecture is composed of three systems, a root system, a working system, and a living system. When the terminal starts, it first starts the root system, and then the root system prepares its own file systems for the working system and the living system. Finally, the root system starts the working system and the living system through container technology, and the root system is responsible for overall management and control system switching , Coordinate the work system and the life system to work together.
  • the location of the data area of the root system in the dual system is actually the same as the location of the data area of the single system, while the data areas of the living system and the working system are created for them by the root system, and both have their own storage locations. Therefore, if it is necessary to keep the single system data to the living system, it is to transfer the user data under the single system data area to the living system data area. Similarly, if it is necessary to retain single-system user data to the working system, transfer the user data under the single-system data area to the working system data area.
  • the data of the single system is actually in the data area of the dual system root system. Therefore, in order to retain the data of the single system to the target system after the upgrade, it is actually to transfer user data in the data area of the dual system root system To the data area of the target system.
  • this application provides a data transfer method
  • FIG. 1 is a schematic flowchart of a data transfer method provided in this application. This method can be applied to the situation that the data of the single system is transferred to the system used by the user in the dual system in the process of upgrading the dual system of the single system. This method is executed by the data transfer device provided in this application, and the above data transfer device can be implemented by software and/or hardware.
  • the data transfer method is applied to a terminal, which can be a mobile smart phone with an operating system, a tablet computer with an operating system, a wearable device with an operating system, and a smart electrical appliance with an operating system.
  • a terminal can be a mobile smart phone with an operating system, a tablet computer with an operating system, a wearable device with an operating system, and a smart electrical appliance with an operating system.
  • a mobile smart phone with an operating system is taken as an example for description.
  • this application is not only applicable to a single system upgrade dual Android system architecture, but also applicable to scenarios such as a single system upgrade multiple Android system architecture, or a heterogeneous dual system architecture upgrade.
  • the solution of this application can be used to retain the user data of the previous single Android system in one of the Android subsystems during the upgrade process.
  • the data transfer method provided by the embodiment of the present application mainly includes steps S10 and S20.
  • the system may be an Android system, an IOS system, or other terminal operating systems, which is not limited in this embodiment.
  • an Android system is taken as an example for description, that is, a single Android system is upgraded to a dual Android system as an example for description.
  • the dual-system startup instruction can be understood as an instruction that instructs the operating system in the terminal to start. Receipt of the dual system start instruction can be understood as receiving an instruction to instruct the operating system in the terminal to start.
  • the dual-system startup instruction may be received after the single-system is upgraded to the dual-system, and the dual-system startup instruction is automatically received after the completion of the system upgrade is detected. Receipt of the dual-system start instruction may also be the detection that the user triggers the dual-system start button, and then the dual-system start instruction is received.
  • the dual-system startup button can be a startup button set by the terminal, and the dual-system startup button can also be a restart button set by the terminal. It should be noted that, in this embodiment, only the receiving of the dual-system start instruction is described, but not limited.
  • the data to be transferred can be understood as the data transferred to the data area under the root system of the dual system after the single system data is upgraded, and it is the user data generated in the process of using the single system by the terminal.
  • the data to be transferred includes but is not limited to system application data (setting information of the application, text messages, mobile phone contacts, call records, alarm settings, etc.), installed third-party applications and data, and content in the built-in SD card (including shooting Pictures, videos, etc.), special information (such as lock screen password), etc.
  • the target system can be any system used by the user in the dual system, that is, it can be a working system or a living system.
  • the single system data before detecting the system status and data validity, it also includes: after the single system data is upgraded, it is first transferred to the data area under the root system of the dual system, and transferred to the single system data in the data partition under the root system. This is the data to be transferred as described in this implementation.
  • the transferring the data to be transferred in the root system to the target system includes:
  • the data to be transferred in the root system is transferred to the target system in a mobile mode.
  • the data transfer method adopts a mobile method to perform data transfer operations, which is faster than copying and reduces storage space occupation.
  • the transferring user data in the root system to a data area of the target system includes: transferring a designated directory containing user data in the root system to a data area directory of the target system.
  • the transferring the data to be transferred in the root system to the target system includes:
  • the specified directory containing the data to be transferred in the root system is transferred to the target system.
  • the designated directory includes one or more of the following:
  • the directory of unencrypted user data to be transferred The directory of unencrypted user data to be transferred.
  • file-based encryption (FBE) is briefly introduced for the first time:
  • the Android data partition adopts the FBE method, which can use different keys to encrypt different files, and can decrypt these files separately.
  • File-level encryption is supported in Android 7.0 and higher.
  • the designated directory containing the data to be transferred is a subdirectory of the data partition. Since the designated directory is a partition directory that uses file-level encryption, it is necessary to consider the impact of file-level encryption to ensure that the data can still be encrypted and decrypted normally after the data is transferred.
  • each user has two storage locations available for applications:
  • CE Credential Encryption
  • DE Device Encryption
  • the first type is the global device encryption key.
  • the key is placed in /data/unencryptd.
  • the three systems use a set of keys, and the key stored under the root system is used. Since the root system needs to access the directory encrypted with the key under the working system and the living system before the working system and the living system are started, such as /data/app, /data/misc, etc., the key is designed to be three The system is unified, and the key is installed and decrypted when the root system is started.
  • the second type is the user equipment encryption key. Take user 0 as an example.
  • the key is placed in /data/misc/vold/user_keys/de/0.
  • the three systems are independent, and each user creates and uses its own Key, the directories encrypted with the key are: /data/system_de/0, /data/misc_de/0, /data/user_de/0, etc.
  • the key is installed and decrypted when each system starts.
  • the third type is the user credential encryption key. Taking user 0 as an example, the key is placed in /data/misc/vold/user_keys/ce/0. In the dual system, the three systems are independent, and each user creates and uses its own Key, the directories encrypted with the key are: /data/system_ce/0, /data/misc_ce/0, etc.
  • the difference between this type of key and the previous two keys is that if the lock screen password is not set, the key installation and decryption will be performed when the system is started. If the lock screen password is set, the system needs to wait for the user to enter the lock screen. The key is installed and decrypted after the password. The key is actually encrypted and saved with the lock screen password. Therefore, when the user does not enter the lock screen password, the corresponding encrypted directory will not be available.
  • the global device key is installed and decrypted by the root system in the dual system, so its storage directory needs to be kept under the root system.
  • the directory path is /data/unencryptd.
  • directories encrypted with the global device encryption key and non-encrypted directories need to be moved to the target system if user data is stored.
  • directories that need to be moved include but are not limited to:
  • the directory may change with the upgrade of the overall Android version or changes in requirements. For example, a new function needs to create a new directory under the data partition, and the data of this function needs to be upgraded and retained, and the directory needs to be added. Move, but the basic principle of confirming whether the directory needs to be moved remains the same.
  • Directory selection principle The storage directory of user equipment encryption key and user credential encryption key, and the directory encrypted with these two types of keys need to be moved to the target system.
  • the global device encryption key storage directory must be kept in the root system.
  • the directories and non-encrypted directories encrypted with the global device encryption key need to be moved to the target system if user data is stored. Other directories do not need to be moved, such as the log directory can be kept in the root system.
  • system status and data validity satisfying data transfer conditions include:
  • the dual system is started for the first time
  • the data to be transferred is valid.
  • the target system when the dual system is started for the first time, the target system is configured for the first time, and the data to be transferred is valid, it is determined that the system state and data validity meet the data transfer conditions.
  • the dual system it is first judged whether the dual system is started for the first time. If the dual system is started for the first time, it is judged whether the target system is configured for the first time. The subsequent process of system startup. If the target system is configured for the first time, it is determined whether the data to be transferred is valid. If the target system is not configured for the first time, it is determined that the system status does not meet the data transfer conditions, and the subsequent process of dual system startup is executed. If the data to be transferred is valid, it is determined that the system status and data validity meet the data transfer conditions. If the data to be transferred is invalid, it is determined that the validity of the data does not meet the data transfer conditions, and the subsequent process of dual system startup is executed.
  • the time to transfer data is selected after the upgrade operation is completed.
  • the data partition is loaded successfully and the global device encryption key is installed.
  • run The transfer operation is performed in a script.
  • Moving the directory is before the process of creating each subdirectory for the data partition, it can ensure that after the directory is moved, the missing directories in the root system will be automatically created again in the subsequent process to ensure the stability of the subsequent operation of the system.
  • the determination of the first startup of the dual system includes:
  • the first startup identifier includes one or more of the following: a directory created for the first startup of the dual system, a file created for the first startup of the dual system, and an attribute identifier set for the first startup of the dual system.
  • the first startup logo refers to a unique logo after the dual system is started.
  • the unique mark after dual system startup is judged. If it does not exist, the dual system is started for the first time, and subsequent judgments are continued. If the unique mark exists, it means that the dual system has been started and no moving operation is performed.
  • the unique mark can be a special directory or file created after the dual system is started, or it can be a special attribute set after the dual system is started, but it is not limited to these forms, as long as it can be identified as a sign that the dual system has started. Can.
  • the determination of the first startup of the dual system includes:
  • the preset identification bit is set when the system upgrade module recognizes that the system to be upgraded is a dual system.
  • a flag bit is set. If the flag bit is read after the dual system is started, it means that the single system is upgraded and the dual system is started for the first time. Data movement operation can be performed. After the movement is completed, the flag bit is cleared. When the dual system is started next time, it will know that it is not the first time and no movement operation will be performed. Compared with the optimal solution, this alternative solution requires more modules to be modified, but it can also achieve judgment.
  • the determination of the first configuration of the target system includes:
  • the data to be transferred effectively includes:
  • the specified directory containing the data to be transferred exists and is valid in the root system.
  • each subdirectory under the data partition exists and is valid.
  • the existence and validity indicate that the data partition already has data when the dual system is started for the first time. These data must be generated by the single system before the upgrade, and you can confirm This is the first time the dual system starts after the single system is upgraded to the dual system, and data needs to be transferred. Otherwise, it means that the dual system is the first time to burn the version, or the whole machine is restored to factory settings, etc., these scenarios do not require data transfer operations
  • the technical solution provided in this embodiment is completed in the process of upgrading a single system to a dual system.
  • the dual system is started for the first time, the data under the root system is transferred to the data area of the target system to realize the retention of the single system data to the target system.
  • you need to make relevant judgments first such as whether it is a single system upgrade to a dual system, whether user data is valid, etc., so that the terminal can upgrade from a single system version to the corresponding dual system version while retaining the user's data to the target
  • it is easy to operate and does not increase the length of the upgrade process.
  • With the upgrade process it is automatically completed when the user is insensible.
  • the retained user data is also complete. It does not rely on additional storage devices and networks, and the user experience is very good.
  • FIG. 2 is a structural schematic diagram of the single-system upgrade dual-system user data transfer process provided by the application.
  • a single-system user After the data is upgraded, it is first transferred to the data partition under the dual-system root system, and then after the data transfer scheme provided by this application, part of the data is transferred from the root system to the data area of the target system to realize the single-system user data after the upgrade. Keep it under the target system of the dual system.
  • the other system is a system other than the target system and the root system under the dual system, and the data in the target system is the data after the transfer of the data to be transferred in the root system.
  • FIG. 3 is a flowchart of the single system upgrading dual system provided by this application. As shown in FIG. 3, the single system upgrading dual system provided by this application The flow of the system mainly includes steps S31, S32, S33, and S34.
  • the single-system upgrade module detects the dual-system upgrade package and performs an upgrade operation.
  • FIG. 4 is a flowchart of the method provided by this application for judging whether the data transfer condition is met. As shown in FIG. 4, the method provided by this application The process of the method for determining whether the data transfer condition is met mainly includes steps S41, S42, S43, and S44.
  • S41 Determine whether it is the first startup of the dual system, that is, determine whether the unique mark after the dual system is started (such as the unique directory that will be created after the dual system is started, the unique attribute set, etc.), if the unique mark exists after the dual system is started, Note that it is not the first startup of the dual system, then execute S45, if it is the first startup, execute S42.
  • S42 Determine whether the target system is created for the first time, that is, whether there is a data directory in the data area of the target system. If there is a data directory in the data area of the target system, it means that the target system already has data and the data transfer operation cannot be performed, then execute S45, if If it is the first time to create, go to S43.
  • S43 Determine whether the subdirectory to be moved under the data partition is valid, such as whether the user device encryption key and user credential encryption key storage directory exists, whether the directory to be moved exists, etc., if the directory does not exist or is invalid, execute S45 . If the directories are all valid, it means that the data to be restored in these single systems is valid, the check is passed, and S44 is executed.
  • this application provides a data transfer device
  • FIG. 5 is a schematic structural diagram of a data transfer device provided in this application.
  • the device can be suitable for the situation that the data of the single system is transferred to the system used by the user in the dual system in the process of upgrading the single system to the dual system.
  • the data transfer device can be implemented by software and/or hardware.
  • the data transfer device provided by the embodiment of the present application mainly includes a detection module 51 and a transfer module 52.
  • the detection module 51 is configured to detect the system status and data validity after receiving the dual system start instruction.
  • the transfer module 52 is configured to transfer the data to be transferred in the root system to the target system when the system status and data validity meet the data transfer conditions.
  • the transferring the data to be transferred in the root system to the target system includes:
  • the data to be transferred in the root system is transferred to the target system in a mobile mode.
  • the transferring the data to be transferred in the root system to the target system includes:
  • the specified directory containing the data to be transferred in the root system is transferred to the target system.
  • the designated directory includes one or more of the following:
  • the directory of unencrypted user data to be transferred The directory of unencrypted user data to be transferred.
  • system status and data validity satisfying data transfer conditions include:
  • the dual system is started for the first time
  • the data to be transferred is valid.
  • the determination of the first startup of the dual system includes:
  • the first startup identifier includes one or more of the following: a directory created for the first startup of the dual system, a file created for the first startup of the dual system, and an attribute identifier set for the first startup of the dual system.
  • the determination of the first startup of the dual system includes:
  • the preset identification bit is set when the system upgrade module recognizes that the system to be upgraded is a dual system.
  • the determination of the first configuration of the target system includes:
  • the data to be transferred effectively includes:
  • the specified directory containing the data to be transferred exists and is valid in the root system.
  • the data transfer device provided in this embodiment can execute the data transfer method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
  • the data transfer method provided in any embodiment of the present disclosure please refer to the data transfer method provided in any embodiment of the present disclosure.
  • the units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, each The specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application.
  • FIG. 6 is a schematic structural diagram of a terminal provided by the present application.
  • the terminal includes a processor 61, a memory 62, an input device 63, and an output device 64;
  • the number of processors 61 can be one or more.
  • one processor 61 is taken as an example; the processor 61, the memory 62, the input device 63 and the output device 64 in the terminal can be connected by a bus or other means. Take the bus connection as an example in 6.
  • the memory 62 can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the data transfer method in the embodiment of the present application (for example, the detection module in the data transfer device). 51 and transfer module 52).
  • the processor 61 executes various functional applications and data processing of the terminal by running software programs, instructions, and modules stored in the memory 62, that is, implements any method provided in the embodiments of the present application.
  • the memory 62 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like.
  • the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 62 may further include a memory remotely provided with respect to the processor 61, and these remote memories may be connected to the terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 63 can be used to receive inputted digital or character information, and generate key signal input related to user settings and function control of the terminal.
  • the output device 64 may include a display device such as a display screen.
  • An embodiment of the present application also provides a computer-readable storage medium containing computer-executable instructions that, when executed by a computer processor, perform a data transfer method, and the data transfer method includes:
  • the data to be transferred in the root system is transferred to the target system.
  • the computer-executable instructions are not limited to performing the operations described above, and can also perform the data transfer method provided by any embodiment of the present application Related operations in.
  • user terminal encompasses any suitable type of wireless user equipment, such as mobile phones, portable data processing devices, portable web browsers, or vehicle-mounted mobile stations.
  • the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof.
  • some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.
  • Computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code written in any combination of one or more programming languages or Object code.
  • ISA instruction set architecture
  • the block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions.
  • the computer program can be stored on the memory.
  • the memory can be of any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read only memory (ROM), random access memory (RAM), optical storage devices and systems (digital multi-function optical discs) DVD or CD) etc.
  • Computer-readable media may include non-transitory storage media.
  • the data processor can be any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSP), application-specific integrated circuits (ASIC), programmable logic devices (FGPA) And processors based on multi-core processor architecture.
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FGPA programmable logic devices

Abstract

The present application provides a data transfer method and device, and a terminal and a computer-readable storage medium. The data transfer method comprises: after a dual-system starting instruction is received, detecting a system state and data validity; and under the condition that the system state and the data validity satisfy a data transfer condition, transferring data to be transferred in a root system to a target system.

Description

数据转移方法及装置、终端和计算机可读存储介质Data transfer method and device, terminal and computer readable storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2020年5月19日提交的中国专利申请NO.202010426148.7的优先权,该中国专利申请的内容通过引用的方式整体合并于此。This application claims the priority of Chinese patent application No. 202010426148.7 filed on May 19, 2020, and the content of the Chinese patent application is incorporated herein by reference in its entirety.
技术领域Technical field
本申请涉及终端技术领域,具体涉及数据转移方法及装置、终端和计算机可读存储介质。This application relates to the field of terminal technology, in particular to data transfer methods and devices, terminals, and computer-readable storage media.
背景技术Background technique
目前市面上的终端大多是采用单系统,基于双系统的终端(例如手机)在业界的推广使用为用户带来全新的体验,单系统版本可以通过版本升级直接升级到双系统版本。Currently, most of the terminals on the market use a single system, and the promotion and use of dual-system-based terminals (such as mobile phones) in the industry brings a brand new experience to users. The single-system version can be directly upgraded to the dual-system version through a version upgrade.
然而,从单系统升级到双系统后,原先的单系统数据是放置在双系统的根系统下,用户直接使用的生活系统和工作系统并不能直接获取根系统中的原先的单系统数据。即,对于用户来说,原先的单系统数据丢失了,给用户带来不好的体验。However, after upgrading from a single system to a dual system, the original single system data is placed under the root system of the dual system, and the living system and work system directly used by the user cannot directly obtain the original single system data in the root system. That is, for the user, the original single system data is lost, which brings a bad experience to the user.
为了解决上述问题,给用户更好的升级体验,需要将原先的单系统数据保存至双系统中用户直接使用的系统中。目前常用的方法是借助备份恢复功能,在系统升级前先备份单系统数据,升级后再在用户直接使用的系统中进行恢复操作。In order to solve the above problems and give users a better upgrade experience, it is necessary to save the original single system data to the system directly used by the user in the dual system. At present, the commonly used method is to use the backup and recovery function to back up the single system data before the system upgrade, and then perform the recovery operation in the system directly used by the user after the upgrade.
上述方案中备份和恢复都需要用户额外操作,并且耗时长,能恢复的单系统数据也非常有限,并且需要额外的存储备份数据的空间。Both backup and restoration in the above scheme require additional operations by the user, and are time-consuming, the single-system data that can be restored is also very limited, and additional space for storing the backup data is required.
公开内容Public content
第一方面,本申请实施例提供一种数据转移方法,包括:In the first aspect, an embodiment of the present application provides a data transfer method, including:
在接收到双系统启动指令后,检测系统状态和数据有效性;After receiving the dual system start command, check the system status and data validity;
在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。When the system status and data validity meet the data transfer conditions, the data to be transferred in the root system is transferred to the target system.
第二方面,本申请实施例提供一种数据转移装置,包括:In a second aspect, an embodiment of the present application provides a data transfer device, including:
检测模块,被配置为在接收到双系统启动指令后,检测系统状态和数据有效性;The detection module is configured to detect the system status and data validity after receiving the dual-system start instruction;
转移模块,被配置为在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。The transfer module is configured to transfer the data to be transferred in the root system to the target system when the system status and data validity meet the data transfer conditions.
第三方面,本申请实施例提供一种终端,所述终端包括:In a third aspect, an embodiment of the present application provides a terminal, and the terminal includes:
一个或多个处理器;One or more processors;
存储器,配置为存储一个或多个程序,Memory, configured to store one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现本申请实施例中的数据转移方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the data transfer method in the embodiment of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例中的数据转移方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program that implements the data transfer method in the embodiment of the present application when the computer program is executed by a processor.
关于本申请的以上实施例和其他方面以及其实现方式,在附图说明、具体实施方式和权利要求中提供更多说明。Regarding the above embodiments and other aspects of the application and their implementation manners, more descriptions are provided in the description of the drawings, the specific implementation manners, and the claims.
附图说明Description of the drawings
图1为本申请提供的一种数据转移方法的流程示意图;Figure 1 is a schematic flowchart of a data transfer method provided by this application;
图2是申请提供的单系统升级双系统及用户数据转移过程的结构示意图;Figure 2 is a schematic diagram of the single system upgrade dual system and user data transfer process provided by the application;
图3是本申请提供的单系统升级双系统的流程图;Figure 3 is a flow chart of the single system upgrade dual system provided by this application;
图4是本申请提供的判断是否满足数据转移条件的方法的流程图;Fig. 4 is a flowchart of the method for judging whether the data transfer condition is satisfied provided by the present application;
图5为本申请提供的一种数据转移装置的结构示意图;以及Figure 5 is a schematic structural diagram of a data transfer device provided by this application; and
图6是本申请提供的一种终端的结构示意图。Fig. 6 is a schematic structural diagram of a terminal provided by the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other arbitrarily if there is no conflict.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowcharts of the drawings may be executed in a computer system such as a set of computer-executable instructions. And, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.
首先,在本申请中对双系统进行简单解释。First, in this application, the dual system is briefly explained.
随着智能终端功能不断丰富,智能终端在人们的日常生活中扮演着不可或缺的角色,并且涉及到很多敏感信息和数据,包括个人隐私、支付安全等。因此为满足安全等方面的需求,双系统架构的终端(例如手机)应运而生。With the continuous enrichment of smart terminal functions, smart terminals play an indispensable role in people's daily life, and involve a lot of sensitive information and data, including personal privacy, payment security, etc. Therefore, in order to meet the requirements of security and other aspects, a terminal (such as a mobile phone) with a dual-system architecture has emerged as the times require.
一部智能终端同时具备两个用户可见的系统,工作、生活相互独立,当前在终端屏幕中显示的系统为前台系统,另一个为后台系统,后台系统也同样处于运行状态,可以接收消息等,此外用户还可以便捷的进行两个系统之间的切换,既满足用户生活、工作互不干扰的需求,使用上也方便快捷。A smart terminal has two systems visible to the user at the same time. Work and life are independent of each other. The system currently displayed on the terminal screen is the foreground system, and the other is the background system. The background system is also running and can receive messages. In addition, users can easily switch between the two systems, which not only meets the needs of users' lives and work without interfering with each other, but also is convenient and quick to use.
目前双系统终端采用的是容器技术,共享一个内核,通过轻量级的虚拟化技术支持两个系统运行,生活系统和工作系统在操作系统层隔离,两个系统的根文件系统、进程及网络完全隔离。双系统终端架构是由三个系统组成,一个根系统、一个工作系统、一个生活系统。终端启动时首先是启动根系统,再由根系统为工作系统和生活系统分别准备各自的文件系统,最后根系统通过容器技术启动工作系统和生活系统,根系统会负责整体的管理、控制系统切换、协调工作系统和生活系统协同工作。At present, dual-system terminals use container technology, share a core, and support the operation of two systems through lightweight virtualization technology. The living system and working system are isolated at the operating system layer, and the root file systems, processes and networks of the two systems Complete isolation. The dual-system terminal architecture is composed of three systems, a root system, a working system, and a living system. When the terminal starts, it first starts the root system, and then the root system prepares its own file systems for the working system and the living system. Finally, the root system starts the working system and the living system through container technology, and the root system is responsible for overall management and control system switching , Coordinate the work system and the life system to work together.
双系统中根系统数据区域位置实际和单系统的数据区域位置相同,而生活系统和工作系统的数据区域由根系统为它们创建,都拥有各自的存储位置。因此若是需要保留单系统数据到生活系统,就是将单系统数据区域下用户数据转移到生活系统数据区域中。同样,若是需要保留单系统用户数据到工作系统,就是将单系统数据区域下用户数据转移到工作系统数据区域中。The location of the data area of the root system in the dual system is actually the same as the location of the data area of the single system, while the data areas of the living system and the working system are created for them by the root system, and both have their own storage locations. Therefore, if it is necessary to keep the single system data to the living system, it is to transfer the user data under the single system data area to the living system data area. Similarly, if it is necessary to retain single-system user data to the working system, transfer the user data under the single-system data area to the working system data area.
单系统升级双系统后,单系统数据实际是在双系统根系统的数据区域中,因此为实现升级后保留单系统的数据到目标系统,实际就是将双系统根系统的数据区域中用户数据转移到目标系统的数据区域中。After a single system is upgraded to a dual system, the data of the single system is actually in the data area of the dual system root system. Therefore, in order to retain the data of the single system to the target system after the upgrade, it is actually to transfer user data in the data area of the dual system root system To the data area of the target system.
在一个实施例中,本申请提供一种数据转移方法,图1为本申请提供的一种数据转移方法的流程示意图。该方法可以适用于单系统升级双系统的过程中,将单系统数据转移至双系统中用户使用的系统中的情况。该方法由本申请中提供的数据转移装置来执行,上述数据转移装置可以由软件和/或硬件实现。In one embodiment, this application provides a data transfer method, and FIG. 1 is a schematic flowchart of a data transfer method provided in this application. This method can be applied to the situation that the data of the single system is transferred to the system used by the user in the dual system in the process of upgrading the dual system of the single system. This method is executed by the data transfer device provided in this application, and the above data transfer device can be implemented by software and/or hardware.
在本实施例中,所述数据转移方法应用于终端,可以是拥有操作系统的移动智能手机,拥有操作系统的平板电脑,拥有操作系统的可穿戴设备,以及拥有操作系统的智能电器等。本实施例中以拥有操作系统的移动智能手机为例进行说明。In this embodiment, the data transfer method is applied to a terminal, which can be a mobile smart phone with an operating system, a tablet computer with an operating system, a wearable device with an operating system, and a smart electrical appliance with an operating system. In this embodiment, a mobile smart phone with an operating system is taken as an example for description.
需要说明的是,本申请除适用于单系统升级双安卓系统架构外,也适用于单系统升级多安卓系统的架构,或者升级异构双系统架构等场景。只要升级后的系统包含一个安卓系统,就可以使用本申请的方案将之前单安卓系统的用户数据在升级过程中保留到其中一个安卓子系统中。It should be noted that this application is not only applicable to a single system upgrade dual Android system architecture, but also applicable to scenarios such as a single system upgrade multiple Android system architecture, or a heterogeneous dual system architecture upgrade. As long as the upgraded system includes an Android system, the solution of this application can be used to retain the user data of the previous single Android system in one of the Android subsystems during the upgrade process.
如图1所示,本申请实施例提供的数据转移方法主要包括步骤S10和S20。As shown in FIG. 1, the data transfer method provided by the embodiment of the present application mainly includes steps S10 and S20.
S10、在接收到双系统启动指令后,检测系统状态和数据有效性。S10. After receiving the dual system start instruction, check the system status and data validity.
S20、在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。S20: When the system status and data validity meet the data transfer conditions, transfer the data to be transferred in the root system to the target system.
在本实施例中,所述系统可以是安卓(Android)系统,也可以是IOS系统,也可以是其他终端操作系统,本实施例中并不进行限定。需要说明的是,本实施例中以安卓系统为例进行说明,即以单安卓系统升级双安卓系统为例进行说明。In this embodiment, the system may be an Android system, an IOS system, or other terminal operating systems, which is not limited in this embodiment. It should be noted that, in this embodiment, an Android system is taken as an example for description, that is, a single Android system is upgraded to a dual Android system as an example for description.
双系统启动指令可以理解为指示终端中的操作系统进行启动的指令。接收到双系统启动指令可以理解为接收到指示终端中的操作系 统进行启动的指令。The dual-system startup instruction can be understood as an instruction that instructs the operating system in the terminal to start. Receipt of the dual system start instruction can be understood as receiving an instruction to instruct the operating system in the terminal to start.
进一步的,接收到双系统启动指令可以是在单系统升级到双系统之后,检测到系统升级完成,则自动接收到双系统启动指令。接收到双系统启动指令还可以是检测到用户触发双系统启动按键,则接收到双系统启动指令。双系统启动按键可以是终端设置的开机按键,双系统启动按键还可以是终端设置的重启按键。需要说明的是,本实施例中仅对接收到双系统启动指令进行说明,而非限定。Further, the dual-system startup instruction may be received after the single-system is upgraded to the dual-system, and the dual-system startup instruction is automatically received after the completion of the system upgrade is detected. Receipt of the dual-system start instruction may also be the detection that the user triggers the dual-system start button, and then the dual-system start instruction is received. The dual-system startup button can be a startup button set by the terminal, and the dual-system startup button can also be a restart button set by the terminal. It should be noted that, in this embodiment, only the receiving of the dual-system start instruction is described, but not limited.
所述待转移数据可以理解为单系统数据升级后转移到双系统的根系统下的数据区域中的数据,是终端使用单系统的过程中产生的用户数据。例如:待转移数据包括但不限于系统应用数据(设置应用的设置信息、短信、手机联系人、通话记录、闹钟设置等)、安装的第三方应用及数据、内置SD卡中的内容(包括拍摄的图片、视频等)、特殊信息(如锁屏密码)等。The data to be transferred can be understood as the data transferred to the data area under the root system of the dual system after the single system data is upgraded, and it is the user data generated in the process of using the single system by the terminal. For example: the data to be transferred includes but is not limited to system application data (setting information of the application, text messages, mobile phone contacts, call records, alarm settings, etc.), installed third-party applications and data, and content in the built-in SD card (including shooting Pictures, videos, etc.), special information (such as lock screen password), etc.
所述目标系统可以是双系统中用户使用的任一系统,即可以是工作系统,也可以是生活系统。The target system can be any system used by the user in the dual system, that is, it can be a working system or a living system.
在本实施例中,检测系统状态和数据有效性之前还包括:单系统数据升级后首先转移到双系统的根系统下的数据区域中,转移到根系统下的数据分区中的单系统数据即为本实施中所述的待转移数据。In this embodiment, before detecting the system status and data validity, it also includes: after the single system data is upgraded, it is first transferred to the data area under the root system of the dual system, and transferred to the single system data in the data partition under the root system. This is the data to be transferred as described in this implementation.
在一个示例性的实施方式中,所述将根系统中的待转移数据转移到目标系统中包括:In an exemplary implementation, the transferring the data to be transferred in the root system to the target system includes:
采用移动方式将根系统中的待转移数据转移到目标系统中。The data to be transferred in the root system is transferred to the target system in a mobile mode.
在本实施例中,数据转移方式采用移动的方式进行转移数据操作,移动方式相比拷贝速度快,并且减少存储空间的占用。In this embodiment, the data transfer method adopts a mobile method to perform data transfer operations, which is faster than copying and reduces storage space occupation.
在一个示例性的实施方式中,所述将根系统中的用户数据转移到目标系统的数据区域中包括:将根系统中包含用户数据的指定目录转移到目标系统的数据区域目录中。In an exemplary embodiment, the transferring user data in the root system to a data area of the target system includes: transferring a designated directory containing user data in the root system to a data area directory of the target system.
在一个示例性的实施方式中,所述将根系统中的待转移数据转移到目标系统中包括:In an exemplary implementation, the transferring the data to be transferred in the root system to the target system includes:
所述将根系统中包含待转移数据的指定目录转移到目标系统中。The specified directory containing the data to be transferred in the root system is transferred to the target system.
在一个示例性的实施方式中,所述指定目录包括如下一个或多 个:In an exemplary embodiment, the designated directory includes one or more of the following:
使用用户设备加密密钥加密的目录;Directory encrypted with user device encryption key;
使用用户凭据加密密钥加密的目录;Directory encrypted with user credential encryption key;
使用全局加密密钥加密且存储待转移数据的目录;以及The directory where the global encryption key is used to encrypt and store the data to be transferred; and
非加密且待转移用户数据的目录。The directory of unencrypted user data to be transferred.
在本实施例中,首次对文件级加密(File Based Encryption,FBE)进行简单介绍:In this embodiment, file-based encryption (FBE) is briefly introduced for the first time:
目前安卓数据分区采用的是FBE方式,其可以使用不同的密钥对不同的文件进行加密,并且可以对这些文件进行单独解密。在安卓7.0及更高版本开始支持文件级加密。At present, the Android data partition adopts the FBE method, which can use different keys to encrypt different files, and can decrypt these files separately. File-level encryption is supported in Android 7.0 and higher.
本实施例中包含待转移数据的指定目录是数据分区的子目录。由于指定目录是使用文件级加密的分区目录,就需要考虑文件级加密的影响,保证在数据在转移后仍能正常加解密。In this embodiment, the designated directory containing the data to be transferred is a subdirectory of the data partition. Since the designated directory is a partition directory that uses file-level encryption, it is necessary to consider the impact of file-level encryption to ensure that the data can still be encrypted and decrypted normally after the data is transferred.
在启用了文件级加密的设备上,每位用户均有两个可供应用使用的存储位置:On a device with file-level encryption enabled, each user has two storage locations available for applications:
凭据加密(Credential Encryption,CE)存储空间,这是默认存储位置,只有在用户解锁设备后才可用;以及Credential Encryption (CE) storage space, which is the default storage location and is only available after the user unlocks the device; and
设备加密(Device Encryption,DE)存储空间,在直接启动模式期间以及用户解锁设备后均可用。Device Encryption (DE) storage space is available during direct boot mode and after the user unlocks the device.
这种存储位置的区分能够使工作资料更加安全,加密不再只基于启动密码,从而能够同时保护多位用户。This distinction between storage locations can make work data more secure, and encryption is no longer only based on the activation password, so that multiple users can be protected at the same time.
例如,安卓系统中有以下三类密钥。For example, there are the following three types of keys in the Android system.
第一类是全局设备加密密钥,密钥放置在/data/unencryptd中,在双系统的实现中三个系统统一使用一套密钥,使用根系统下存储的该密钥。由于根系统需要在工作系统、生活系统启动前,就访问工作系统和生活系统下以该密钥加密的目录,如/data/app、/data/misc等,因此该密钥被设计为三个系统统一,在根系统启动时进行密钥安装解密。The first type is the global device encryption key. The key is placed in /data/unencryptd. In the implementation of the dual system, the three systems use a set of keys, and the key stored under the root system is used. Since the root system needs to access the directory encrypted with the key under the working system and the living system before the working system and the living system are started, such as /data/app, /data/misc, etc., the key is designed to be three The system is unified, and the key is installed and decrypted when the root system is started.
第二类是用户设备加密密钥,以用户0为例,密钥放置在/data/misc/vold/user_keys/de/0,在双系统中三个系统各自独立, 各自用户创建并使用各自的密钥,以该密钥加密的目录有:/data/system_de/0、/data/misc_de/0、/data/user_de/0等。该密钥是各系统启动时各自进行密钥安装解密。The second type is the user equipment encryption key. Take user 0 as an example. The key is placed in /data/misc/vold/user_keys/de/0. In the dual system, the three systems are independent, and each user creates and uses its own Key, the directories encrypted with the key are: /data/system_de/0, /data/misc_de/0, /data/user_de/0, etc. The key is installed and decrypted when each system starts.
第三类是用户凭据加密密钥,以用户0为例,密钥放置在/data/misc/vold/user_keys/ce/0,在双系统中三个系统各自独立,各自用户创建并使用各自的密钥,以该密钥加密的目录有:/data/system_ce/0、/data/misc_ce/0等。该类密钥相比于前两种秘钥的区别之处在于若是未设置锁屏密码,系统启动时就会进行密钥安装解密,若是设置了锁屏密码,系统需要等用户输入了锁屏密码后才进行密钥安装解密,密钥实际是用锁屏密码加密保存的,因此当用户没有输入锁屏密码时,相应的加密目录将不可使用。The third type is the user credential encryption key. Taking user 0 as an example, the key is placed in /data/misc/vold/user_keys/ce/0. In the dual system, the three systems are independent, and each user creates and uses its own Key, the directories encrypted with the key are: /data/system_ce/0, /data/misc_ce/0, etc. The difference between this type of key and the previous two keys is that if the lock screen password is not set, the key installation and decryption will be performed when the system is started. If the lock screen password is set, the system needs to wait for the user to enter the lock screen. The key is installed and decrypted after the password. The key is actually encrypted and saved with the lock screen password. Therefore, when the user does not enter the lock screen password, the corresponding encrypted directory will not be available.
全局设备密钥在双系统中是根系统进行安装解密的,因此其存储目录需要保留在根系统下。目录路径为/data/unencryptd。The global device key is installed and decrypted by the root system in the dual system, so its storage directory needs to be kept under the root system. The directory path is /data/unencryptd.
由于根系统下没有安卓系统框架及应用,用户相关的目录实际并不需要,而这部分又包含了用户的数据,因此用户设备加密密钥和用户凭据加密密钥存储目录和加密的目录都需要移动到目标系统中。Since there is no Android system framework and application under the root system, the user-related directory is actually not needed, and this part contains user data, so the user device encryption key and user credential encryption key storage directory and encrypted directory are required Move to the target system.
此外,使用全局设备加密密钥加密的目录和非加密目录若是存储有用户数据则需要移动到目标系统。In addition, directories encrypted with the global device encryption key and non-encrypted directories need to be moved to the target system if user data is stored.
因此需要移动的目录包括但不限于:Therefore, the directories that need to be moved include but are not limited to:
/data/misc/data/misc_ce/data/misc_de/data/system/data/system_ce/data/system_de/data/vendor/data/vendor_ce/data/vendor_de/data/data/data/user/data/user_de/data/media/data/apex data/app*(即app开头的所有目录)。/data/misc/data/misc_ce/data/misc_de/data/system/data/system_ce/data/system_de/data/vendor/data/vendor_ce/data/vendor_de/data/data/data/user/data/user_de/data /media/data/apex data/app* (that is, all directories at the beginning of app).
需要说明的是,目录可能随着安卓整体版本升级或者是需求变化而改变,比如某新增功能需要在数据分区下创建新的目录,而该功能的数据需要升级保留,就需要增加该目录的移动,但是确认目录是否需要移动的基本原则不变。It should be noted that the directory may change with the upgrade of the overall Android version or changes in requirements. For example, a new function needs to create a new directory under the data partition, and the data of this function needs to be upgraded and retained, and the directory needs to be added. Move, but the basic principle of confirming whether the directory needs to be moved remains the same.
目录选取原则:用户设备加密密钥和用户凭据加密密钥存储目录、使用该两类密钥加密的目录都需要移动到目标系统中。全局设备加密密钥存储目录必须保留在根系统。使用全局设备加密密钥加密的 目录和非加密目录,若是存储有用户数据则需要移动到目标系统。其他目录无需移动,比如日志目录可保留在根系统。Directory selection principle: The storage directory of user equipment encryption key and user credential encryption key, and the directory encrypted with these two types of keys need to be moved to the target system. The global device encryption key storage directory must be kept in the root system. The directories and non-encrypted directories encrypted with the global device encryption key need to be moved to the target system if user data is stored. Other directories do not need to be moved, such as the log directory can be kept in the root system.
在一个示例性的实施方式中,所述系统状态和数据有效性满足数据转移条件包括:In an exemplary implementation, the system status and data validity satisfying data transfer conditions include:
所述双系统首次启动;The dual system is started for the first time;
所述目标系统首次配置;以及The first configuration of the target system; and
所述待转移数据有效。The data to be transferred is valid.
在本实施例中,在所述双系统首次启动、且所述目标系统首次配置、且所述待转移数据有效的情况下,确定系统状态和数据有效性满足数据转移条件。In this embodiment, when the dual system is started for the first time, the target system is configured for the first time, and the data to be transferred is valid, it is determined that the system state and data validity meet the data transfer conditions.
进一步的,在本实施例中,首先判断双系统是否首次启动,如果双系统是首次启动,则判断目标系统是否首次配置,如果双系统不是首次启动,确定系统状态不满足数据转移条件,执行双系统启动的后续流程。如果目标系统是首次配置,则判断待转移数据是否有效,如果目标系统不是首次配置,确定系统状态不满足数据转移条件,执行双系统启动的后续流程。如果待转移数据有效,则确定系统状态和数据有效性满足数据转移条件。如果待转移数据无效,确定数据有效性不满足数据转移条件,执行双系统启动的后续流程。Further, in this embodiment, it is first judged whether the dual system is started for the first time. If the dual system is started for the first time, it is judged whether the target system is configured for the first time. The subsequent process of system startup. If the target system is configured for the first time, it is determined whether the data to be transferred is valid. If the target system is not configured for the first time, it is determined that the system status does not meet the data transfer conditions, and the subsequent process of dual system startup is executed. If the data to be transferred is valid, it is determined that the system status and data validity meet the data transfer conditions. If the data to be transferred is invalid, it is determined that the validity of the data does not meet the data transfer conditions, and the subsequent process of dual system startup is executed.
进一步的,本实施例中将转移数据的时机选择在升级操作完成,双系统第一次启动时数据分区加载成功并且全局设备加密密钥安装后,在为数据分区创建各个子目录前,通过运行脚本的方式进行转移操作。Further, in this embodiment, the time to transfer data is selected after the upgrade operation is completed. When the dual system is started for the first time, the data partition is loaded successfully and the global device encryption key is installed. Before creating each subdirectory for the data partition, run The transfer operation is performed in a script.
移动目录是在为数据分区创建各子目录流程前,可以保证在目录移动走后,根系统缺少的目录会在后续的流程中被自动再次创建出来,保证系统后续运行的稳定性。Moving the directory is before the process of creating each subdirectory for the data partition, it can ensure that after the directory is moved, the missing directories in the root system will be automatically created again in the subsequent process to ensure the stability of the subsequent operation of the system.
在一个示例性的实施方式中,所述双系统首次启动的确定包括:In an exemplary embodiment, the determination of the first startup of the dual system includes:
在检测到首次启动标识后,确定双系统首次启动;After detecting the first boot logo, confirm that the dual system is booted for the first time;
其中,所述首次启动标识包括如下一个或多个:双系统首次启动创建的目录、双系统首次启动创建的文件、以及双系统首次启动设置的属性标识。Wherein, the first startup identifier includes one or more of the following: a directory created for the first startup of the dual system, a file created for the first startup of the dual system, and an attribute identifier set for the first startup of the dual system.
所述首次启动标识是指双系统启动后的特有标志。The first startup logo refers to a unique logo after the dual system is started.
在本实施中,判断双系统启动后的特有标志,若是不存在,则双系统是首次启动,继续进行后续判断,若是特有标志存在,则说明双系统已经启动过了,不进行移动操作。In this implementation, the unique mark after dual system startup is judged. If it does not exist, the dual system is started for the first time, and subsequent judgments are continued. If the unique mark exists, it means that the dual system has been started and no moving operation is performed.
特有标志可以是双系统在启动后会创建的特有目录或者文件,也可以是双系统启动后会设置的特殊属性,但不限于这几种形式,只要能识别出是双系统启动过的标志即可。The unique mark can be a special directory or file created after the dual system is started, or it can be a special attribute set after the dual system is started, but it is not limited to these forms, as long as it can be identified as a sign that the dual system has started. Can.
在一个示例性的实施方式中,所述双系统首次启动的确定包括:In an exemplary embodiment, the determination of the first startup of the dual system includes:
在检测到预设标识位后,确定双系统首次启动;After detecting the preset identification position, confirm that the dual system starts for the first time;
其中,所述预设标识位由系统升级模块识别出待升级系统是双系统的情况下设置。Wherein, the preset identification bit is set when the system upgrade module recognizes that the system to be upgraded is a dual system.
在本实施例中,单系统在升级时识别出待升级的版本是双系统,则设置一个标志位,双系统启动后若读取到该标志位,则表示是单系统升级双系统首次启动,可进行数据移动操作,移动完成后清除该标志位,双系统下次启动时,就能知道非首次启动,不进行移动操作。该替代方案相比于最优方案,需要配合修改的模块更多,但是同样可以实现判断。In this embodiment, when the single system recognizes that the version to be upgraded is a dual system during the upgrade, a flag bit is set. If the flag bit is read after the dual system is started, it means that the single system is upgraded and the dual system is started for the first time. Data movement operation can be performed. After the movement is completed, the flag bit is cleared. When the dual system is started next time, it will know that it is not the first time and no movement operation will be performed. Compared with the optimal solution, this alternative solution requires more modules to be modified, but it can also achieve judgment.
在一个示例性的实施方式中,所述目标系统首次配置的确定包括:In an exemplary implementation, the determination of the first configuration of the target system includes:
在检测到目标系统的数据区域中未存储所述待转移数据的情况下,确定目标系统首次配置。When it is detected that the data to be transferred is not stored in the data area of the target system, it is determined that the target system is configured for the first time.
在一个示例性的实施方式中,所述待转移数据有效包括:In an exemplary embodiment, the data to be transferred effectively includes:
根系统中包含待转移数据的指定目录存在且有效。The specified directory containing the data to be transferred exists and is valid in the root system.
在本实施例中,判断数据分区下的各子目录是否存在并且有效,存在且有效说明双系统首次启动时数据分区已经有了数据,这些数据必然是升级前的单系统生成的,就可以确认此时是单系统升级双系统后双系统首次启动,需要转移数据。否则说明双系统是首次烧写版本、或整机恢复出厂设置等情况,这些场景都无需进行数据转移操作In this embodiment, it is judged whether each subdirectory under the data partition exists and is valid. The existence and validity indicate that the data partition already has data when the dual system is started for the first time. These data must be generated by the single system before the upgrade, and you can confirm This is the first time the dual system starts after the single system is upgraded to the dual system, and data needs to be transferred. Otherwise, it means that the dual system is the first time to burn the version, or the whole machine is restored to factory settings, etc., these scenarios do not require data transfer operations
本实施例提供的技术方案在单系统升级到双系统的过程中完成,双系统首次启动时,将根系统下的数据转移到目标系统的数据区域下, 来实现将单系统数据保留到目标系统的功能,转移时需要先进行相关判断,如是否是单系统升级双系统、用户数据是否有效等,以实现终端在从单系统版本升级到对应的双系统版本的同时将用户的数据保留到目标系统中,并且操作简单、不增加升级过程的时长,伴随着升级过程,在用户无感时就自动完成,保留的用户数据也很完整,不依赖额外的存储设备和网络,用户体验非常好。The technical solution provided in this embodiment is completed in the process of upgrading a single system to a dual system. When the dual system is started for the first time, the data under the root system is transferred to the data area of the target system to realize the retention of the single system data to the target system. When transferring, you need to make relevant judgments first, such as whether it is a single system upgrade to a dual system, whether user data is valid, etc., so that the terminal can upgrade from a single system version to the corresponding dual system version while retaining the user's data to the target In the system, it is easy to operate and does not increase the length of the upgrade process. With the upgrade process, it is automatically completed when the user is insensible. The retained user data is also complete. It does not rely on additional storage devices and networks, and the user experience is very good.
在一个应用性的实施方式中,提供一种单系统升级双系统用户数据转移过程,图2是申请提供的单系统升级双系统用户数据转移过程的结构示意图,如图2所示,单系统用户数据升级后首先转移到双系统根系统下的数据分区下,再经过本申请提供的数据转移方案,其中一部分由根系统转移到目标系统的数据区域下,用以实现单系统用户数据在升级后保留到双系统的目标系统下。In an applicable implementation manner, a single-system upgrade dual-system user data transfer process is provided. Figure 2 is a structural schematic diagram of the single-system upgrade dual-system user data transfer process provided by the application. As shown in Figure 2, a single-system user After the data is upgraded, it is first transferred to the data partition under the dual-system root system, and then after the data transfer scheme provided by this application, part of the data is transferred from the root system to the data area of the target system to realize the single-system user data after the upgrade. Keep it under the target system of the dual system.
需要说明的是,另一系统是双系统下除目标系统和根系统外的另外一个系统,目标系统中的数据是根系统中的待转移数据转移后的数据。It should be noted that the other system is a system other than the target system and the root system under the dual system, and the data in the target system is the data after the transfer of the data to be transferred in the root system.
在一个应用性的实施方式中,提供一种单系统升级双系统的流程,图3是本申请提供的单系统升级双系统的流程图,如图3所示,本申请提供的单系统升级双系统的流程主要包括步骤S31、S32、S33、S34。In an applicable implementation manner, a process for upgrading a single system to a dual system is provided. FIG. 3 is a flowchart of the single system upgrading dual system provided by this application. As shown in FIG. 3, the single system upgrading dual system provided by this application The flow of the system mainly includes steps S31, S32, S33, and S34.
S31、单系统升级模块检测到双系统升级包进行升级操作。S31. The single-system upgrade module detects the dual-system upgrade package and performs an upgrade operation.
S32、升级模块重启终端。S32. The upgrade module restarts the terminal.
S33、双系统启动,在根系统的数据分区加载成功并且全局设备加密密钥安装后创建子目录前,进行数据检查和移动流程。该流程会进行一系列判断检查,当检查通过时会进行数据移动操作,否则就直接执行S34。S33. The dual system is started. After the data partition of the root system is successfully loaded and the global device encryption key is installed, the data check and movement process is performed before the subdirectory is created. The process will perform a series of judgment checks. When the checks pass, data movement operations will be performed; otherwise, S34 will be executed directly.
S34、双系统继续进行后续流程,包括创建数据分区下缺少的子目录,启动工作和生活系统等。S34. The dual system continues the follow-up process, including creating missing subdirectories under the data partition, and starting the work and life systems.
在一个应用性的实施方式中,提供一种判断是否满足数据转移条件的方法,图4是本申请提供的判断是否满足数据转移条件的方法的流程图,如图4所示,本申请提供的判断是否满足数据转移条件方法的流程主要包括步骤S41、S42、S43、S44。In an applicable implementation manner, a method for judging whether the data transfer condition is met is provided. FIG. 4 is a flowchart of the method provided by this application for judging whether the data transfer condition is met. As shown in FIG. 4, the method provided by this application The process of the method for determining whether the data transfer condition is met mainly includes steps S41, S42, S43, and S44.
S41、判断是否是双系统首次启动,即判断双系统启动后的特有标志是否存在(比如双系统启动后会创建的特有目录、设置的特有属性等),若双系统启动后的特有标志存在,说明不是双系统首次启动,则执行S45,如果是首次启动,则执行S42。S41. Determine whether it is the first startup of the dual system, that is, determine whether the unique mark after the dual system is started (such as the unique directory that will be created after the dual system is started, the unique attribute set, etc.), if the unique mark exists after the dual system is started, Note that it is not the first startup of the dual system, then execute S45, if it is the first startup, execute S42.
S42、判断目标系统是不是第一次创建,即目标系统数据区域是否存在数据目录,若目标系统数据区域存在数据目录,则说明目标系统已有数据,不能进行数据转移操作,则执行S45,如果是第一次创建,则执行S43。S42. Determine whether the target system is created for the first time, that is, whether there is a data directory in the data area of the target system. If there is a data directory in the data area of the target system, it means that the target system already has data and the data transfer operation cannot be performed, then execute S45, if If it is the first time to create, go to S43.
S43、判断数据分区下需要移动的子目录是否有效,比如用户设备加密密钥和用户凭据加密密钥存储目录是否存在、准备被移动的目录是否存在等,目录不存在或者无效时,则执行S45。若是目录都有效,则说明这些单系统待恢复的数据有效,检查通过,执行S44。S43. Determine whether the subdirectory to be moved under the data partition is valid, such as whether the user device encryption key and user credential encryption key storage directory exists, whether the directory to be moved exists, etc., if the directory does not exist or is invalid, execute S45 . If the directories are all valid, it means that the data to be restored in these single systems is valid, the check is passed, and S44 is executed.
S44、进行转移数据操作,需移动的目录路径是预先进行配置的。S44. Perform the data transfer operation, and the directory path to be moved is configured in advance.
S45、双系统继续进行后续流程,启动工作系统和生活系统。S45. The dual system continues the follow-up process and starts the working system and the living system.
在一个实施例中,本申请提供一种数据转移装置,图5为本申请提供的一种数据转移装置的结构示意图。该装置可以适用于单系统升级双系统的过程中将单系统数据转移至双系统中用户使用的系统中的情况。该数据转移装置可以由软件和/或硬件实现。In one embodiment, this application provides a data transfer device, and FIG. 5 is a schematic structural diagram of a data transfer device provided in this application. The device can be suitable for the situation that the data of the single system is transferred to the system used by the user in the dual system in the process of upgrading the single system to the dual system. The data transfer device can be implemented by software and/or hardware.
如图5所示,本申请实施例提供的数据转移装置主要包括检测模块51和转移模块52。As shown in FIG. 5, the data transfer device provided by the embodiment of the present application mainly includes a detection module 51 and a transfer module 52.
检测模块51被配置为在接收到双系统启动指令后,检测系统状态和数据有效性。The detection module 51 is configured to detect the system status and data validity after receiving the dual system start instruction.
转移模块52被配置为在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。The transfer module 52 is configured to transfer the data to be transferred in the root system to the target system when the system status and data validity meet the data transfer conditions.
在一个示例性的实施方式中,所述将根系统中的待转移数据转 移到目标系统中包括:In an exemplary implementation, the transferring the data to be transferred in the root system to the target system includes:
采用移动方式将根系统中的待转移数据转移到目标系统中。The data to be transferred in the root system is transferred to the target system in a mobile mode.
在一个示例性的实施方式中,所述将根系统中的待转移数据转移到目标系统中,包括:In an exemplary implementation, the transferring the data to be transferred in the root system to the target system includes:
所述将根系统中包含待转移数据的指定目录转移到目标系统中。The specified directory containing the data to be transferred in the root system is transferred to the target system.
在一个示例性的实施方式中,所述指定目录包括如下一个或多个:In an exemplary embodiment, the designated directory includes one or more of the following:
使用用户设备加密密钥加密的目录;Directory encrypted with user device encryption key;
使用用户凭据加密密钥加密的目录;Directory encrypted with user credential encryption key;
使用全局加密密钥加密且存储待转移数据的目录;以及The directory where the global encryption key is used to encrypt and store the data to be transferred; and
非加密且待转移用户数据的目录。The directory of unencrypted user data to be transferred.
在一个示例性的实施方式中,所述系统状态和数据有效性满足数据转移条件包括:In an exemplary implementation, the system status and data validity satisfying data transfer conditions include:
所述双系统首次启动;The dual system is started for the first time;
所述目标系统首次配置;以及The first configuration of the target system; and
所述待转移数据有效。The data to be transferred is valid.
在一个示例性的实施方式中,所述双系统首次启动的确定包括:In an exemplary embodiment, the determination of the first startup of the dual system includes:
在检测到首次启动标识后,确定双系统首次启动;After detecting the first boot logo, confirm that the dual system is booted for the first time;
其中,所述首次启动标识包括如下一个或多个:双系统首次启动创建的目录,双系统首次启动创建的文件,双系统首次启动设置的属性标识。Wherein, the first startup identifier includes one or more of the following: a directory created for the first startup of the dual system, a file created for the first startup of the dual system, and an attribute identifier set for the first startup of the dual system.
在一个示例性的实施方式中,所述双系统首次启动的确定包括:In an exemplary embodiment, the determination of the first startup of the dual system includes:
在检测到预设标识位后,确定双系统首次启动;After detecting the preset identification position, confirm that the dual system starts for the first time;
其中,所述预设标识位由系统升级模块识别出待升级系统是双系统的情况下设置。Wherein, the preset identification bit is set when the system upgrade module recognizes that the system to be upgraded is a dual system.
在一个示例性的实施方式中,所述目标系统首次配置的确定包括:In an exemplary implementation, the determination of the first configuration of the target system includes:
在检测到目标系统的数据区域中未存储所述待转移数据的情况下,确定目标系统首次配置。When it is detected that the data to be transferred is not stored in the data area of the target system, it is determined that the target system is configured for the first time.
在一个示例性的实施方式中,所述待转移数据有效包括:In an exemplary embodiment, the data to be transferred effectively includes:
根系统中包含待转移数据的指定目录存在且有效。The specified directory containing the data to be transferred exists and is valid in the root system.
本实施例中提供的数据转移装置可执行本公开任意实施例所提供的数据转移方法,具备执行该方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本公开任意实施例所提供的数据转移方法。The data transfer device provided in this embodiment can execute the data transfer method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in this embodiment, please refer to the data transfer method provided in any embodiment of the present disclosure.
值得注意的是,上述数据转移装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。It is worth noting that, in the embodiment of the data transfer device, the units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, each The specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application.
本申请实施例还提供一种终端,图6是本申请提供的一种终端的结构示意图,如图6所示,该终端包括处理器61、存储器62、输入装置63、输出装置64;终端中,处理器61的数量可以是一个或多个,图6中以一个处理器61为例;终端中的处理器61、存储器62、输入装置63和输出装置64可以通过总线或其他方式连接,图6中以通过总线连接为例。An embodiment of the present application also provides a terminal. FIG. 6 is a schematic structural diagram of a terminal provided by the present application. As shown in FIG. 6, the terminal includes a processor 61, a memory 62, an input device 63, and an output device 64; The number of processors 61 can be one or more. In Figure 6, one processor 61 is taken as an example; the processor 61, the memory 62, the input device 63 and the output device 64 in the terminal can be connected by a bus or other means. Take the bus connection as an example in 6.
存储器62作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的数据转移方法对应的程序指令/模块(例如,数据转移装置中的检测模块51和转移模块52)。处理器61通过运行存储在存储器62中的软件程序、指令以及模块,从而执行终端的各种功能应用以及数据处理,即实现本申请实施例提供的任一方法。As a computer-readable storage medium, the memory 62 can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the data transfer method in the embodiment of the present application (for example, the detection module in the data transfer device). 51 and transfer module 52). The processor 61 executes various functional applications and data processing of the terminal by running software programs, instructions, and modules stored in the memory 62, that is, implements any method provided in the embodiments of the present application.
存储器62可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器62可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器62可进一步包括相对于处理器61远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 62 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some examples, the memory 62 may further include a memory remotely provided with respect to the processor 61, and these remote memories may be connected to the terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置63可用于接收输入的数字或字符信息,以及产生与终端的用户设置以及功能控制有关的键信号输入。输出装置64可包括显示屏等显示设备。The input device 63 can be used to receive inputted digital or character information, and generate key signal input related to user settings and function control of the terminal. The output device 64 may include a display device such as a display screen.
本申请实施例还提供一种包含计算机可执行指令的计算机可读存储介质,所述计算机可执行指令在由计算机处理器执行时执行一种数据转移方法,所述数据转移方法包括:An embodiment of the present application also provides a computer-readable storage medium containing computer-executable instructions that, when executed by a computer processor, perform a data transfer method, and the data transfer method includes:
在接收到双系统启动指令后,检测系统状态和数据有效性;以及After receiving the dual system start command, check the system status and data validity; and
在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。When the system status and data validity meet the data transfer conditions, the data to be transferred in the root system is transferred to the target system.
当然,对于本申请实施例所提供的包含计算机可执行指令的计算机可读存储介质,其计算机可执行指令不限于执行如上所述的操作,还可以执行本申请任意实施例所提供的数据转移方法中的相关操作。Of course, for the computer-readable storage medium containing computer-executable instructions provided by the embodiments of the present application, the computer-executable instructions are not limited to performing the operations described above, and can also perform the data transfer method provided by any embodiment of the present application Related operations in.
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the implementation manners, those skilled in the art can clearly understand that this application can be implemented by software and general hardware, of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of this application essentially or the part that contributes to the related technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, Read-Only Memory (ROM), Random Access Memory (RAM), Flash memory (FLASH), hard disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, A server, or a network device, etc.) execute the method described in each embodiment of the present application.
以上所述仅为本申请的示例性实施例而已,并非用于限定本申请的保护范围。The foregoing descriptions are only exemplary embodiments of the present application, and are not used to limit the protection scope of the present application.
本领域内的技术人员应明白,术语用户终端涵盖任何适合类型的无线用户设备,例如移动电话、便携数据处理装置、便携网络浏览器或车载移动台等。Those skilled in the art should understand that the term user terminal encompasses any suitable type of wireless user equipment, such as mobile phones, portable data processing devices, portable web browsers, or vehicle-mounted mobile stations.
一般来说,本申请的多种实施例可以在硬件或专用电路、软件、 逻辑或其任何组合中实现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本申请不限于此。In general, the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.
本申请的实施例可以通过移动装置的数据处理器执行计算机程序指令来实现,例如在处理器实体中,或者通过硬件,或者通过软件和硬件的组合。计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码。The embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example, in a processor entity, or by hardware, or by a combination of software and hardware. Computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code written in any combination of one or more programming languages or Object code.
本申请附图中的任何逻辑流程的框图可以表示程序步骤,或者可以表示相互连接的逻辑电路、模块和功能,或者可以表示程序步骤与逻辑电路、模块和功能的组合。计算机程序可以存储在存储器上。存储器可以具有任何适合于本地技术环境的类型并且可以使用任何适合的数据存储技术实现,例如但不限于只读存储器(ROM)、随机访问存储器(RAM)、光存储器装置和系统(数码多功能光碟DVD或CD光盘)等。计算机可读介质可以包括非瞬时性存储介质。数据处理器可以是任何适合于本地技术环境的类型,例如但不限于通用计算机、专用计算机、微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、可编程逻辑器件(FGPA)以及基于多核处理器架构的处理器。The block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program can be stored on the memory. The memory can be of any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read only memory (ROM), random access memory (RAM), optical storage devices and systems (digital multi-function optical discs) DVD or CD) etc. Computer-readable media may include non-transitory storage media. The data processor can be any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSP), application-specific integrated circuits (ASIC), programmable logic devices (FGPA) And processors based on multi-core processor architecture.
通过示范性和非限制性的示例,上文已提供了对本申请的示范实施例的详细描述。但结合附图和权利要求来考虑,对以上实施例的多种修改和调整对本领域技术人员来说是显而易见的,但不偏离本公开的范围。因此,本公开的恰当范围将根据权利要求确定。By way of exemplary and non-limiting examples, a detailed description of the exemplary embodiments of the present application has been provided above. However, considering the accompanying drawings and claims, various modifications and adjustments to the above embodiments are obvious to those skilled in the art, but they do not deviate from the scope of the present disclosure. Therefore, the proper scope of the present disclosure will be determined according to the claims.

Claims (12)

  1. 一种数据转移方法,包括:A method of data transfer including:
    在接收到双系统启动指令后,检测系统状态和数据有效性;After receiving the dual system start command, check the system status and data validity;
    在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。When the system status and data validity meet the data transfer conditions, the data to be transferred in the root system is transferred to the target system.
  2. 根据权利要求1所述的方法,其中,所述将根系统中的待转移数据转移到目标系统中包括:The method according to claim 1, wherein the transferring the data to be transferred in the root system to the target system comprises:
    采用移动方式将根系统中的待转移数据转移到目标系统中。The data to be transferred in the root system is transferred to the target system in a mobile mode.
  3. 根据权利要求1或2所述的方法,其中,所述将根系统中的待转移数据转移到目标系统中包括:The method according to claim 1 or 2, wherein the transferring the data to be transferred in the root system to the target system comprises:
    所述将根系统中包含待转移数据的指定目录转移到目标系统中。The specified directory containing the data to be transferred in the root system is transferred to the target system.
  4. 根据权利要求3所述的方法,其中,所述指定目录包括如下一个或多个:The method according to claim 3, wherein the designated directory includes one or more of the following:
    使用用户设备加密密钥加密的目录;Directory encrypted with user device encryption key;
    使用用户凭据加密密钥加密的目录;Directory encrypted with user credential encryption key;
    使用全局加密密钥加密且存储待转移数据的目录;以及The directory where the global encryption key is used to encrypt and store the data to be transferred; and
    非加密且待转移用户数据的目录。The directory of unencrypted user data to be transferred.
  5. 根据权利要求1所述的方法,其中,所述系统状态和数据有效性满足数据转移条件包括:The method according to claim 1, wherein the system status and data validity satisfying data transfer conditions comprises:
    所述双系统首次启动;The dual system is started for the first time;
    所述目标系统首次配置;以及The first configuration of the target system; and
    所述待转移数据有效。The data to be transferred is valid.
  6. 根据权利要求5所述的方法,其中,所述双系统首次启动的确定包括:The method according to claim 5, wherein the determination of the first startup of the dual system comprises:
    在检测到首次启动标识后,确定双系统首次启动;After detecting the first boot logo, confirm that the dual system is booted for the first time;
    其中,所述首次启动标识包括如下一个或多个:双系统首次启动创建的目录、双系统首次启动创建的文件、以及双系统首次启动设置的属性标识。Wherein, the first startup identifier includes one or more of the following: a directory created for the first startup of the dual system, a file created for the first startup of the dual system, and an attribute identifier set for the first startup of the dual system.
  7. 根据权利要求5所述的方法,其中,所述双系统首次启动的确定包括:The method according to claim 5, wherein the determination of the first startup of the dual system comprises:
    在检测到预设标识位后,确定双系统首次启动;After detecting the preset identification position, confirm that the dual system starts for the first time;
    其中,所述预设标识位由系统升级模块识别出待升级系统是双系统的情况下设置。Wherein, the preset identification bit is set when the system upgrade module recognizes that the system to be upgraded is a dual system.
  8. 根据权利要求5所述的方法,其中,所述目标系统首次配置的确定包括:The method according to claim 5, wherein the determination of the first configuration of the target system comprises:
    在检测到目标系统的数据区域中未存储所述待转移数据的情况下,确定目标系统首次配置。When it is detected that the data to be transferred is not stored in the data area of the target system, it is determined that the target system is configured for the first time.
  9. 根据权利要求5所述的方法,其中,所述待转移数据有效包括:The method according to claim 5, wherein the data to be transferred effectively comprises:
    根系统中包含待转移数据的指定目录存在且有效。The specified directory containing the data to be transferred exists and is valid in the root system.
  10. 一种数据转移装置,包括:A data transfer device includes:
    检测模块,被配置为在接收到双系统启动指令后,检测系统状态和数据有效性;以及The detection module is configured to detect the system status and data validity after receiving the dual system start instruction; and
    转移模块,被配置为在所述系统状态和数据有效性满足数据转移条件的情况下,将根系统中的待转移数据转移到目标系统中。The transfer module is configured to transfer the data to be transferred in the root system to the target system when the system status and data validity meet the data transfer conditions.
  11. 一种终端,包括:A terminal, including:
    一个或多个处理器;One or more processors;
    存储器,配置为存储一个或多个程序,Memory, configured to store one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得 所述一个或多个处理器实现如权利要求1-9中任一项所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method according to any one of claims 1-9.
  12. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如权利要求1-9中任一项所述的方法。A computer-readable storage medium with a computer program stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1-9 is realized.
PCT/CN2021/094701 2020-05-19 2021-05-19 Data transfer method and device, and terminal and computer-readable storage medium WO2021233351A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010426148.7 2020-05-19
CN202010426148.7A CN112817932A (en) 2020-05-19 2020-05-19 Data transfer method, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021233351A1 true WO2021233351A1 (en) 2021-11-25

Family

ID=75853029

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094701 WO2021233351A1 (en) 2020-05-19 2021-05-19 Data transfer method and device, and terminal and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN112817932A (en)
WO (1) WO2021233351A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817932A (en) * 2020-05-19 2021-05-18 中兴通讯股份有限公司 Data transfer method, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050059A (en) * 2014-06-30 2014-09-17 珠海市君天电子科技有限公司 Method and system for data backup and recovery
CN106250172A (en) * 2016-07-18 2016-12-21 北京理工大学 A kind of Android double startup method of shared kernel subregion
US20170286321A1 (en) * 2014-10-24 2017-10-05 Yulong Computer Telecommunication Scientific (Shenzhen) Co., Ltd. Dual-system-based data storage method and terminal
CN107515790A (en) * 2016-06-16 2017-12-26 成都鼎桥通信技术有限公司 The system of electronic equipment
CN107766145A (en) * 2016-08-18 2018-03-06 成都鼎桥通信技术有限公司 EMS memory management process and device under dual system
CN112817932A (en) * 2020-05-19 2021-05-18 中兴通讯股份有限公司 Data transfer method, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050059A (en) * 2014-06-30 2014-09-17 珠海市君天电子科技有限公司 Method and system for data backup and recovery
US20170286321A1 (en) * 2014-10-24 2017-10-05 Yulong Computer Telecommunication Scientific (Shenzhen) Co., Ltd. Dual-system-based data storage method and terminal
CN107515790A (en) * 2016-06-16 2017-12-26 成都鼎桥通信技术有限公司 The system of electronic equipment
CN106250172A (en) * 2016-07-18 2016-12-21 北京理工大学 A kind of Android double startup method of shared kernel subregion
CN107766145A (en) * 2016-08-18 2018-03-06 成都鼎桥通信技术有限公司 EMS memory management process and device under dual system
CN112817932A (en) * 2020-05-19 2021-05-18 中兴通讯股份有限公司 Data transfer method, equipment and storage medium

Also Published As

Publication number Publication date
CN112817932A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
US8694981B2 (en) Shared resource dependencies
US10210085B2 (en) Leveraging non-volatile memory for persisting data
WO2019201011A1 (en) System startup method and apparatus, electronic device and storage medium
CN101578609B (en) Secure booting a computing device
EP3273351B1 (en) System operation method and smart terminal
US10324744B2 (en) Triggering application attachment based on service login
JP6201049B2 (en) System and method for updating system level services in a read-only system image
US9270339B2 (en) Method, apparatus and system of recovering an operating system on a portable communication device
US9654454B2 (en) Coerced encryption on connected devices
CN107632872B (en) Desktop layout processing method, user data processing method and device and computer storage medium
WO2019015491A1 (en) Application program cloning method and apparatus, device and medium
CN104731593A (en) Information processing method and electronic equipment
WO2021233351A1 (en) Data transfer method and device, and terminal and computer-readable storage medium
WO2022135215A1 (en) Method and apparatus for repairing abnormal power-on
US20230198775A1 (en) Memory device with secure boot updates and self-recovery
WO2016107219A1 (en) Data recovery method and apparatus
CN116700768B (en) Application processing method and related device
CN108804258B (en) Data recovery method and device, mobile terminal and storage medium
CN104346299A (en) Updating control method and device of mobile terminal
KR20190033930A (en) Electronic device for encrypting security information and method for controlling thereof
WO2018171145A1 (en) Data processing method, system and pos terminal
US11288361B1 (en) Systems and methods for restoring applications
WO2020078430A1 (en) Information storage and memory card recovery method and apparatus, electronic device, and storage medium
CN111381892B (en) Data processing method, device, equipment and machine-readable medium
US10740021B1 (en) Systems and methods for recovery of computing environments via a replication solution

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21807525

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 170423)

122 Ep: pct application non-entry in european phase

Ref document number: 21807525

Country of ref document: EP

Kind code of ref document: A1