CN116049095A - Data migration method, electronic equipment and storage medium - Google Patents

Data migration method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116049095A
CN116049095A CN202210482824.1A CN202210482824A CN116049095A CN 116049095 A CN116049095 A CN 116049095A CN 202210482824 A CN202210482824 A CN 202210482824A CN 116049095 A CN116049095 A CN 116049095A
Authority
CN
China
Prior art keywords
data
migration
electronic device
target
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210482824.1A
Other languages
Chinese (zh)
Inventor
郎如辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210482824.1A priority Critical patent/CN116049095A/en
Publication of CN116049095A publication Critical patent/CN116049095A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/119Details of migration of file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The application provides a data migration method, electronic equipment and a storage medium, relates to the technical field of electronics, and can solve the problem that a first electronic equipment receives data migrated by a second electronic equipment and occupies a memory space of the first electronic equipment; the method comprises the following steps: after the first electronic device receives M pieces of migration data migrated by the second electronic device, if the target storage path of the first migration data in the M pieces of migration data includes target data, the first electronic device detects whether the content of the target data is the same as that of the first migration data; wherein the second data identifier of the target data is the same as the first data identifier of the first migration data; if the content of the target data is the same as that of the first migration data, the first electronic equipment stores one of the target data or the first migration data; and if the target data is different from the first migration data in content, the first electronic equipment stores the target data and the first migration data.

Description

Data migration method, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a data migration method, an electronic device, and a storage medium.
Background
At present, the frequency of replacing electronic devices (such as computers) is higher and higher, but after replacing the electronic devices, applications (APP) used daily on old devices, important files, documents, other important contents and the like are not available on new devices. In order to solve the problem, the data in the old equipment can be cloned to the new equipment through data migration, so that the aim of changing machines is fulfilled.
Disclosure of Invention
The embodiment of the application provides a data migration method, electronic equipment and a storage medium, which can solve the problem that a first electronic equipment receives data migrated by a second electronic equipment and occupies a memory space of the first electronic equipment.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, a data migration method is provided, where the method is applied to a first electronic device, and the first electronic device is communicatively connected with a second electronic device; the method comprises the following steps: the first electronic device sends first migration information to the second electronic device; the first migration information includes: a first data identifier of each of the M pieces of migration data, and a target storage path of the migration data indicated by the first data identifier; the target storage path is to indicate that the migration data is to be stored on the first electronic device; m is a positive integer; the first electronic equipment receives M pieces of migration data sent by the second electronic equipment according to the first migration information; if the target storage path of the first migration data in the M migration data comprises target data, the first electronic equipment detects whether the content of the target data is the same as that of the first migration data; wherein the second data identifier of the target data is the same as the first data identifier of the first migration data; if the content of the target data is the same as that of the first migration data, the first electronic equipment stores one of the target data or the first migration data; and if the target data is different from the first migration data in content, the first electronic equipment stores the target data and the first migration data.
Based on the first aspect, when the new device receives the M pieces of migration data sent by the old device, in the case that the target data is included in the target storage path of the first migration data in the M pieces of migration data, since the second data identifier of the target data is the same as the first data identifier of the first migration data, the new device determines that the target data having the same name as the first data of the first migration data is included in the target storage path of the first migration data; on the basis, the new device detects whether the contents of the target data and the first migration data are the same, if the contents of the target data and the first migration data are the same, the new device stores one of the target data or the first migration data, namely, the target data and the first migration data are the same, and the new device stores only one of the target data and the first migration data, so that the problem that the storage space of the new device is occupied due to the fact that the data with the same contents are stored on the new device in the related art is solved.
In one possible design of the first aspect, before the first electronic device detects whether the content of the target data and the first migration data is the same, the method further includes: the first electronic equipment stores first migration data in a target storage path of the first migration data, and updates a first data identifier of the first migration data into a third data identifier; if the content of the target data is the same as that of the first migration data, the first electronic device stores one of the target data and the first migration data, including: and if the content of the target data is the same as that of the first migration data, deleting the first migration data corresponding to the third data identifier by the first electronic equipment, and reserving the target data.
In the design manner, after receiving M pieces of migration data sent by an old device, the new device firstly stores first migration data in a target storage path corresponding to the first migration data, and then, the new device detects whether the content of the target data is the same as that of the first migration data. Therefore, the process of detecting the contents of the target data and the first migration data by the new device does not influence the storage speed of the first migration data, and the data migration effect is improved.
In one possible design of the first aspect, the method further comprises: if the content of the target data is different from that of the first migration data, the first electronic equipment sends out first prompt information; the first prompt information is used for prompting a user that the data identifier of the first migration data is updated from the first data identifier to the third data identifier.
In the design mode, under the condition that the contents of the target data and the first migration data are different, the new device can send out first prompt information, and because the first prompt information is used for prompting the user that the data identification of the first migration data is updated to the third data identification by the first data identification, namely, the new device can prompt the user that the migration data are renamed through the prompt information, the user can conveniently search the migration data in the new device, and the user experience is improved.
In one possible design of the first aspect, if the target data is included in the target storage path of the first migration data, the method further includes: the first electronic device adds the second data identifier and the third data identifier as a group of messages into a data queue to be migrated; the first electronic device detecting whether the content of the target data is the same as the content of the first migration data, including: the first electronic device detects whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same according to the first-in first-out principle.
In the design manner, under the condition that the target data is included in the target storage path of the first migration data, the new device adds the second data identifier and the third data identifier as a group of messages into the data queue to be migrated, and the data queue to be migrated has a first-in first-out principle, namely, the second data identifier and the third data identifier enter the queue first, the new device can detect whether the content of the first migration data corresponding to the second identifier is the same as that of the first migration data corresponding to the third data identifier or not, the storage speed of the first migration data is not influenced, and the data migration efficiency is further improved.
In one possible design of the first aspect, detecting whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in the set of messages of the data queue to be migrated are the same includes: the first electronic equipment inputs a second data identifier in a group of messages into a preset algorithm model and outputs a first message identifier; the first electronic device inputs a third data identifier in a group of messages into a preset algorithm model and outputs a second message identifier; when the first message identifier is the same as the second message identifier, the first electronic device determines that the contents of the target data and the first migration data are the same; when the first message identifier is different from the second message identifier, the first electronic device determines that the contents of the target data and the first migration data are different.
In one possible design of the first aspect, detecting whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a set of messages of the data queue to be migrated are the same includes: the first electronic equipment runs a plurality of threads, and the threads respectively detect whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same in parallel.
In the design mode, the new device runs a plurality of threads to detect whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same in parallel, so that the time for the new device to detect the content of the target data and the content of the first migration data is reduced, and the power consumption of the device is reduced.
In one possible design of the first aspect, the method further comprises: and if the target storage path of the first migration data does not include the target data in the plurality of migration data, the first electronic equipment stores the first migration data in the target storage path of the first migration data.
In one possible design of the first aspect, before the first electronic device sends the first migration information to the second electronic device, the method further includes: the first electronic device receives second migration information from the second electronic device; the second migration information comprises a first data identifier of each migration data in the N migration data and a storage path of each migration data on the second electronic device; n is a positive integer, N is greater than or equal to M; the first electronic device determines a target storage path of each migration data in the M migration data according to the second migration information and a preset storage rule; the preset storage rule is used for indicating the corresponding relation between the storage path of the migration data on the second electronic device and the storage path of the corresponding migration data to be stored on the first electronic device.
In a second aspect, an electronic device is provided, where the electronic device may be a first electronic device or a second electronic device; the electronic device has the functionality to implement the method described in the first aspect above. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In a third aspect, an electronic device is provided, the electronic device being a first electronic device; the first electronic device includes a display screen, a memory, and one or more processors; the display screen, the memory and the processor are coupled; the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the first electronic device to perform the steps of: the first electronic device sends first migration information to the second electronic device; the first migration information includes: a first data identifier of each of the M pieces of migration data, and a target storage path of the migration data indicated by the first data identifier; the target storage path is to indicate that the migration data is to be stored on the first electronic device; m is a positive integer; the first electronic equipment receives M pieces of migration data sent by the second electronic equipment according to the first migration information; if the target storage path of the first migration data in the M migration data comprises target data, the first electronic equipment detects whether the content of the target data is the same as that of the first migration data; wherein the second data identifier of the target data is the same as the first data identifier of the first migration data; if the content of the target data is the same as that of the first migration data, the first electronic equipment stores one of the target data or the first migration data; and if the target data is different from the first migration data in content, the first electronic equipment stores the target data and the first migration data.
In one possible design of the third aspect, before the first electronic device detects whether the target data and the first migration data are identical in content, the computer instructions, when executed by the processor, cause the first electronic device to further perform the steps of: the first electronic equipment stores first migration data in a target storage path of the first migration data, and updates a first data identifier of the first migration data into a third data identifier; if the content of the target data is the same as that of the first migration data, the first electronic device stores one of the target data and the first migration data, including: and if the content of the target data is the same as that of the first migration data, deleting the first migration data corresponding to the third data identifier by the first electronic equipment, and reserving the target data.
In one possible design of the third aspect, the computer instructions, when executed by the processor, cause the first electronic device to further perform the steps of: if the content of the target data is different from that of the first migration data, the first electronic equipment sends out first prompt information; the first prompt information is used for prompting a user that the data identifier of the first migration data is updated from the first data identifier to the third data identifier.
In one possible design of the third aspect, if the target data is included in the target storage path of the first migration data, the computer instructions, when executed by the processor, cause the first electronic device to further perform the steps of: the first electronic device adds the second data identifier and the third data identifier as a group of messages into a data queue to be migrated; the first electronic device detecting whether the content of the target data is the same as the content of the first migration data, including: the first electronic device detects whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same according to the first-in first-out principle.
In one possible design of the third aspect, the computer instructions, when executed by the processor, cause the first electronic device to specifically perform the steps of: the first electronic equipment inputs a second data identifier in a group of messages into a preset algorithm model and outputs a first message identifier; the first electronic device inputs a third data identifier in a group of messages into a preset algorithm model and outputs a second message identifier; when the first message identifier is the same as the second message identifier, the first electronic device determines that the contents of the target data and the first migration data are the same; when the first message identifier is different from the second message identifier, the first electronic device determines that the contents of the target data and the first migration data are different.
In one possible design of the third aspect, the computer instructions, when executed by the processor, cause the first electronic device to specifically perform the steps of: the first electronic equipment runs a plurality of threads, and the threads respectively detect whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same in parallel.
In one possible design of the third aspect, the computer instructions, when executed by the processor, cause the first electronic device to further perform the steps of: and if the target storage path of the first migration data does not include the target data in the plurality of migration data, the first electronic equipment stores the first migration data in the target storage path of the first migration data.
In one possible design of the third aspect, before the first electronic device sends the first migration information to the second electronic device, the computer instructions, when executed by the processor, cause the first electronic device to further perform the steps of: the first electronic device receives second migration information from the second electronic device; the second migration information comprises a first data identifier of each migration data in the N migration data and a storage path of each migration data on the second electronic device; n is a positive integer, N is greater than or equal to M; the first electronic device determines a target storage path of each migration data in the M migration data according to the second migration information and a preset storage rule; the preset storage rule is used for indicating the corresponding relation between the storage path of the migration data on the second electronic device and the storage path of the corresponding migration data to be stored on the first electronic device.
In a fourth aspect, there is provided a computer readable storage medium having stored therein computer instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects above.
The technical effects of any one of the design manners of the second aspect to the fifth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an interface of a data migration method according to an embodiment of the present disclosure;
fig. 4 is a second interface schematic diagram of a data migration method according to an embodiment of the present application;
fig. 5 is an interface schematic diagram III of a data migration method according to an embodiment of the present application;
fig. 6 is an interface schematic diagram of a data migration method according to an embodiment of the present application;
Fig. 7 is a schematic flow chart of a data migration method according to an embodiment of the present application;
fig. 8 is an interface schematic diagram of a data migration method according to an embodiment of the present application;
fig. 9 is a sixth interface schematic diagram of a data migration method according to an embodiment of the present application;
fig. 10 is an interface schematic diagram seven of a data migration method according to an embodiment of the present application;
FIG. 11 is a second flow chart of a data migration method according to an embodiment of the present disclosure;
fig. 12 is a flowchart third of a data migration method according to an embodiment of the present application;
fig. 13 is a flow chart diagram of a data migration method according to an embodiment of the present application;
fig. 14 is an interface schematic diagram eight of a data migration method according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the embodiments of the present application, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
Message queue (Message queue): is a communication mode between processes or between different threads of the same process. The message queue can be used as a container for storing the message in the transmission process, and a process with writing permission on the message queue can add new message into the message queue; a process having read rights to the message queue may then read the message from the message queue. Where the message queue has a first-in first-out principle, i.e. the message that first enters the message queue is read (or sent) first.
The process comprises the following steps: is the basic unit of resource allocation and scheduling by an operating system (such as an android system) regarding one running activity of an application program on a certain data set. Each process occupies an address space, and an application program runs on an operating system in the form of one or more processes to realize corresponding functions.
Thread: is an entity of a process that is a smaller, independently operable basic unit than the process. A thread may share all of the resources owned by a process with other threads that belong to the same process. One thread may create and cancel another thread and multiple threads in the same process may execute concurrently.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application. As shown in connection with fig. 1, the scenario includes a first electronic device and a second electronic device; the first electronic device may be, for example, a new device, and the second electronic device may be, for example, an old device. The old device and the new device may be communicatively coupled via a wireless or wired connection. The wired communication connection may be, for example, a universal serial bus (universal serial bus, USB) connection; the wireless connection may be, for example, a wireless fidelity (wireless fidelity, wi-Fi) connection, a bluetooth (bluetooth) connection, a bluetooth mesh connection, a peer-to-peer (P2P) connection, etc. Fig. 1 illustrates an example of a notebook computer as a first electronic device and a second electronic device.
Generally, in order to improve the use experience of a user, the electronic device may respond to the operation of the user to select to migrate all or part of the data stored on the old device to the new device, so as to facilitate the user to continue to use daily important applications, files and the like on the new device. The data stored on the old device may include, for example: video, pictures, documents, APP, and other device configuration. In the related art, when data of the same name is stored on both the new device and the old device, after the old device migrates the data onto the new device, the new device stores the data and updates the name of the data to the duplicate name. However, if the content of the data with the same name stored on the new device is the same as that of the old device, the old device will cause the new device to store the data with the same content when migrating the data to the new device, thereby occupying the storage space of the new device.
Illustratively, the new device has stored thereon data named xxx.t.txt, and the old device has stored thereon data named xxx.t.txt; it can be seen that the data stored on the new device is the same name as the data stored on the old device. Then, when the old device migrates data named xxx.t.txt onto the new device, the new device stores the data and updates the name of the data to xxx.t.txt (1). Thus, the new device has stored thereon data named xxx.t.txt and data named xxx.t.txt (1); however, in the case where the content of the data named xxx.t.txt and the content of the data named xxx.t.txt (1) are the same, this results in that the new device stores the same content of data, and thus occupies the storage space of the new device.
The embodiment of the application provides a data migration method, which can solve the problem that the storage space of new equipment is occupied when data with the same content are stored on the new equipment. Specifically, after the old device sends a plurality of migration data to the new device, the new device may detect whether the data on the new device with the same name is the same as the content of the migration data; if so, the new device stores one of the two data with the same name, which is beneficial to reducing the storage space of the new device.
The data migration method provided by the embodiment of the application can be applied to the communication system described in fig. 1. The first electronic device and the second electronic device shown in the communication system may be, for example, one of a mobile phone, a notebook computer, a tablet computer, a large screen display device, a desktop, a laptop, a handheld computer, a vehicle-mounted device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) \virtual reality (VR) device, and the like, and the specific form of the electronic device is not particularly limited in the embodiments of the present application.
As shown in fig. 2, a schematic structural diagram of the electronic device 100 is shown, and the electronic device 100 may be, for example, the first electronic device and the second electronic device described in the foregoing embodiments. Wherein the electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc.
It is to be understood that the structure illustrated in the present embodiment does not constitute a specific limitation on the electronic apparatus 100. In other embodiments, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device. In other embodiments, the electronic device may also use different interfacing manners in the foregoing embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, and so on.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of electronic devices can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110. The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, audio, video, etc. files are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may include a storage program area and a storage data area by executing instructions stored in the internal memory 121, and the internal memory 121 may include a storage program area and a storage data area.
The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device (e.g., audio data, phonebook, etc.), and so forth. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device. The electronic device may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of hardware and software.
The following describes a specific implementation procedure of the data migration method provided in the embodiment of the present application with reference to the accompanying drawings.
In the embodiment of the application, the old device and the new device can perform data migration through a data migration application or an application with a data migration function. It should be appreciated that prior to the old device and the new device performing data migration, the old device and the new device first establish a communication connection, and then the old device and the new device initiate a data migration function to perform data migration.
Taking the old device and the new device with data migration applications installed thereon as an example for illustration, in some embodiments, the old device and the new device automatically launch the data migration applications to launch the data migration functions when the old device and the new device are powered on. In other embodiments, the home page of the computer manager application of the old device and the new device includes a data migration setting item, and the old device and the new device may initiate a data migration function in response to a user operating the data migration setting item. In still other embodiments, a data migration application is installed on desktops of the old device and the new device, and the old device and the new device may initiate data migration functions in response to user operations on the data migration application.
Taking the example where the home page of the computer manager application of the old device and the new device includes a data migration setting item as an illustration, the old device and the new device display an interface 201 as shown in (1) of fig. 3 in response to a user's operation of the data migration setting item, the interface 201 including a start control. Wherein the launch control may be, for example, "immediate migration". The old device and the new device then display an interface 202 as shown in fig. 3 (2) in response to the user's operation of the launch control, the interface 202 including first prompting information for prompting the user for data migration user protocols. For example, the first prompt information may be: the service needs to turn on WLAN and Bluetooth, and occupies WLAN channels in the migration process, so that the network cannot be accessed temporarily, the service can automatically recover after the migration is completed, and 'consent' is clicked, namely, consent to the content and data migration user protocol is indicated.
Still as with interface 202 shown in fig. 3 (2), in some embodiments, the interface 202 further includes an consent control and a cancel control, the old device and the new device opening a data migration function in response to a user operation of the consent control; the old device and the new device exit the data migration in response to a user operation to cancel the control.
When the old device and the new device respond to the user's operation of the consent control, the old device and the new device display an interface 203 as shown in (3) of fig. 3, the interface 203 including a first icon and a second icon; wherein the first icon is used to indicate a new device and the second icon is used to indicate an old device. Illustratively, the old device responds to the operation of the user on the second icon, and selects the old device as the local device to serve as a data sender; and the new device responds to the operation of the user on the first icon, and selects the local device as the new device to serve as a data receiving party.
Also shown as interface 203 in fig. 3 (3), in some embodiments, the interface 203 further includes a second hint information that is used to hint the installation path of the data migration application to the user. The second prompt information may be, for example: please go to official website: http:// www.xxx.com downloads the install data migration application. In some embodiments, interface 203 further includes an exit control, which the old device and the new device exit data migration functionality in response to user operation of the exit control.
In some embodiments, the old device displays an interface 204 as shown in fig. 4 (1) in response to a user operation of the second icon; the interface 204 is the interface where the old device waits to be discovered. Illustratively, the old device sends a broadcast to the new device, and the "old device" in the display interface 204 is waiting for a reminder to be found. In some embodiments, interface 204 also includes a third hint information that is used to hint to the user to launch the data migration application on the new device. The third prompt information may be, for example: a data migration application is launched on the new device, selecting "this is the new device". If the new device does not install the data migration application, please go to the official website: http:// www.xxx.com downloads the install data migration application. In some embodiments, interface 204 also includes a prompt for "WLAN channel is occupied during migration, device cannot use network". In other embodiments, interface 204 also includes a "cancel" control; on this basis, the old device exits the data migration in response to a user operation of the "cancel" control.
In other embodiments, the new device displays an interface 205 as shown in fig. 4 (2) in response to a user operation of the first icon; the interface 205 is the interface where the new device is looking for the old device. Illustratively, the new device receives the broadcast sent by the old device and displays a prompt in interface 205 that device … is being looked up. In some embodiments, interface 205 also includes fourth hints information for prompting the user to launch a data migration application on the old device. The fourth prompt information may be, for example: a data migration application is launched on the old device, selecting "this is the old device". If the old device does not install the data migration application, please go to the official website: http:// www.xxx.com downloads the install data migration application. In some embodiments, interface 205 also includes a "continue" control and a "cancel" control. It should be noted that when the new device does not find the old device, the "continue" control is not clickable. If the user clicks the cancel control, the new device responds to the operation of the cancel control by the user, and the new device exits from data migration.
In some embodiments, after the new device finds the old device, the new device responds to the user's operation of the "continue" control in interface 205, the old device and the new device display a connection authentication interface, and if the connection authentication passes, the old device and the new device establish a communication connection. On this basis, the old device and the new device can perform data migration.
Illustratively, the old device and the new device may perform connection authentication by checking the connection code. For example, in response to operation of the "continue" control in user interface 205, the new device displays interface 206 as shown in FIG. 5 (1), which interface 206 includes a connection check code. The connection check code may be, for example, "078913". In some embodiments, interface 206 also includes a prompt such as "please see if the following connection code is displayed on the old device". In other embodiments, the interface 206 also includes a "cancel" control, e.g., the new device exits the data migration in response to a user's operation of the "cancel" control.
Accordingly, the old device displays an interface 207 as shown in fig. 5 (2), the interface 207 including a connection check code. The connection check code may be, for example, "078913". In some embodiments, interface 207 also includes a prompt such as "find that a new device is requesting a connection to the local, please confirm whether the following connections are consistent. In other embodiments, interface 207 also includes a "continue" control and a "cancel" control; under the condition that the connection check code on the old equipment is consistent with the connection check code on the new equipment, if the old equipment responds to the operation of the 'continue' control by the user, the old equipment and the new equipment are in communication connection; if the old device responds to the user operation of the "cancel" control, the old device exits the data migration.
Illustratively, in response to a user's operation of the "continue" control, the old device and the new device display an interface 208 as shown in FIG. 6, the interface 208 being the interface to which the old device and the new device are being connected. For example, as shown in FIG. 6, the interface 208 may include, for example, a prompt for "in connection" and a "cancel" control. In some embodiments, the old or new device exits the data migration in response to a user operation of a "cancel" control.
In connection with the above-described embodiments and the interfaces shown in fig. 3-6, data migration between the old device and the new device may begin after the old device and the new device establish a communication connection. The process of data migration between the old device and the new device may be implemented, for example, in conjunction with the flow diagram shown in fig. 7 and the method described in the embodiments below. Specifically, as shown in fig. 7, the process of the data migration method may include S301 to S306.
S301, the old device sends migration information I to the new device.
The first migration information comprises a first data identifier of each migration data in N migration data and a storage path of each migration data on old equipment; n is a positive integer. In the embodiment of the present application, the first migration information may also be referred to as second migration information. In addition, the storage path of migration data on the old device may also be referred to as a source path.
The first data identifier refers to a unique identifier code capable of characterizing the migration data. The first data identification may be, for example, a file name of the migration data.
Taking the file name of the first data identifier as migration data as an example, assuming that N migration data includes data a, data b, and data c, migration information one of the old device sends to the new device may be shown in table 1 below, for example.
Migrating data Data identification Source Path
Data a xxx-a D\\AAA\t.txt
Data b xxx-b E:\\BBB\t.txt
Data c xxx-c C:\\AAA\t.txt
TABLE 1
In some embodiments, during the process of the old device sending migration information one to the new device, the old device displays an interface 209 as shown in FIG. 8, the interface 209 including a progress bar for the old device to send migration information one to the new device, and a "cancel" control. Meanwhile, a prompt interface for successful connection is displayed on a display screen of the new equipment. The progress bar is used for prompting a user of the progress of the old equipment for sending migration information I to the new equipment.
In some embodiments, the old device exits the data migration in response to a user operation of a "cancel" control.
S302, the new device determines a target storage path of each migration data in the M migration data according to a preset storage rule according to the first migration information.
The preset storage rule is used for indicating the corresponding relation between the storage path of the migration data on the old equipment and the storage path of the corresponding migration data to be stored on the new equipment. M is a positive integer, M is less than or equal to N.
In some embodiments, after the new device receives the migration information one sent by the old device, the new device displays the first interface. The first interface is used for selecting one or more migration data from N migration data to obtain M migration data; and then, the new device determines a target storage path of each migration data in the M migration data according to a preset disk storage rule.
Illustratively, as shown in FIG. 9, after the new device receives migration information one sent by the old device, the new device displays an interface 210 (i.e., a first interface); the interface 210 includes the name of the storage partition of the old device and a first data identification (e.g., file name) of the N pieces of migration data stored under the storage partition of the old device. In some embodiments, interface 210 also includes hints for the storage space size of the new device, hints for the file size of the selected migration data, hints for the number of selected migration data, hints for the expected migration duration, and the like. In some embodiments, interface 210 also includes a "begin migration" control and a "cancel" control.
For example, as shown in FIG. 9, interface 210 includes a "local disk C" selection and a "local disk D" selection; wherein, the selection items of the local disk D comprise a My file selection item and a My Drive selection item; the My File sub-selections include "index" and "image" files. For example, the new device responds to the user selection operation of the selection item "local disk C" in the interface 210, and all migration data stored in "local disk C" is selected. Accordingly, the new device may also select M pieces of migration data from the N pieces of migration data in response to a user selection operation of other options in the interface 210.
It should be noted that, when the new device responds to the selection operation of all the options in the interface 210 by the user, the M pieces of migration data selected by the new device are all the data on the old device, i.e., n=m. When the new device responds to the selection operation of the partial selection item in the interface 210 by the user, the M migration data selected by the new device are the partial data on the old device, i.e. M < N.
In some embodiments, assuming that the M migration data includes data a, data b, and data c, the preset inventory rules may be as shown in table 2 below, for example.
Migrating data Data identification Source Path Target storage path
Data a xxx-a D\\AAA\t.txt C:\\AAA\t.txt
Data b xxx-b E:\\BBB\t.txt E:\\BBB\t.txt
Data c xxx-c C:\\AAA\t.txt D:\\AAA\t.txt
TABLE 2
Illustratively, as shown in table 2, the new device searches the target storage path of the corresponding migration data in the preset storage rule according to the first data identifier and the source path of each of the M migration data. For example, the data mark of the data a is xxx-a, the source path is D\AAA\t.txt, and then the new device determines that the target storage path of the data a is C\AAA\t txt according to the preset storage rule. Accordingly, the new device may also search the preset storage rule for the target storage path of other data, which is not described herein.
And S303, the new equipment sends migration information II to the old equipment.
The migration information II comprises: the first data identification of each of the M pieces of migration data, and the first data identification indicates a target storage path of the migration data. In the embodiment of the present application, the second migration information may also be referred to as first migration information.
The migration information two sent by the new device to the old device may be shown in table 3 below, for example.
Migrating data Data identification Target storage path
Data a xxx-a C:\\AAA\t.txt
Data b xxx-b E:\\BBB\t.txt
Data c xxx-c D:\\AAA\t.txt
TABLE 3 Table 3
S304, the old equipment sends M pieces of migration data to the new equipment according to the migration information.
Accordingly, the new device receives M pieces of migration data sent by the old device according to the migration information II.
Illustratively, in the process of the old device sending M pieces of migration data to the new device, the old device and the new device display an interface 211 as shown in FIG. 10; the interface 211 includes prompt information for prompting the user for data migration progress. For example, interface 211 includes migration progress (e.g.,%), size of migrated data, migration rate, and remaining time, etc.
S305, the new device judges whether target data is included in the target storage path of the first migration data in the M migration data.
Wherein the second data identification of the target data is the same as the first data identification of the first migration data. That is, after receiving the M pieces of migration data, the new device determines whether the data identical to the first data identification of the first migration data is included in the target storage path of the first migration data.
In some embodiments, if the target data is included in the target storage path of the first migration data, the new device performs S306; and if the target storage path of the first migration data does not comprise the target data, the new device stores the first migration data in the target storage path of the first migration data.
It should be appreciated that the first migration data is any one of the M migration data. In the embodiment of the application, for each migration data in M migration data, the new device determines whether the target data is included in the target storage path of each migration data; if so, the new device executes S306.
S306, the new device judges whether the contents of the target data and the first migration data are the same.
In some embodiments, the new device stores one of the target data or the first migration data if the target data is the same as the first migration data. Illustratively, the new device stores the first migration data under the target storage path of the first migration data and deletes the target data; or the new device does not store the first migration data under the target storage path of the first migration data, and the target data is reserved.
In other embodiments, if the target data is different from the first migration data, the new device stores the first migration data under the target storage path of the first migration data and retains the target data.
Illustratively, the new device may determine whether the target data and the first migration data are the same content by comparing the sha256 (i.e., hash value) of the target data with the sha256 of the first migration data.
It should be noted that sha256 is an algorithm subdivided under sha-2 (secure hash algorithm 2). Wherein sha-2 is a cryptographic hash function algorithm. In some embodiments, the input to sha256 is a message of arbitrary length and the output of sha256 is a256 bit hash value.
In summary, in the embodiment of the present application, when the new device receives the M pieces of migration data sent by the old device, and when the target data is included in the target storage path of the first migration data in the M pieces of migration data, the second data identifier of the target data is the same as the first data identifier of the first migration data, so that the new device determines that the target data having the same name as the first data of the first migration data is included in the target storage path of the first migration data; on the basis, the new device detects whether the contents of the target data and the first migration data are the same, if the contents of the target data and the first migration data are the same, the new device stores one of the target data or the first migration data, namely, the target data and the first migration data are the same, and the new device stores only one of the target data and the first migration data, so that the problem that the storage space of the new device is occupied due to the fact that the data with the same contents are stored on the new device in the related art is solved.
Considering that the new device calculates that the sha256 of the target data and the sha256 of the first migration data are time-consuming, after receiving the M migration data sent by the old device, the new device first stores the first migration data in a target storage path corresponding to the first migration data, and then the new device judges whether the content of the target data is the same as that of the first migration data. In this way, the new device calculates the sha256 of the target data and the sha256 of the first migration data, so that the storage speed of the first migration data is not affected, and the efficiency of data migration is improved.
In some embodiments, as shown in fig. 11, before the new device detects whether the target data and the first migration data are identical in content, the method further includes:
and S3051, the new device stores the first migration data under the target storage path of the first migration data, and updates the first data identification of the first migration data into the third data identification.
Taking the first data identification as a file name as an example, illustratively, after the new device stores the first migration data, the file name of the first migration data is modified to be a copy name. For example, the first data identification of the first migration data is xxx-a, and then the third data identification of the first migration data may be xxx-a (1), for example.
On the basis, if the new device detects that the content of the target data is the same as that of the first migration data, the new device can delete the first migration data corresponding to the third data identifier, namely the new device deletes the first migration data of the new storage disk, and the target data is reserved.
As shown in connection with fig. 11, in some embodiments, where target data is included in the target storage path of the first migration data, the new device may add the second data identifier and the third data identifier as a set of messages to the data queue to be migrated; on the basis, the new device detects whether the content of the target data corresponding to the second identifier and the content of the first migration data corresponding to the third identifier in a group of messages of the data queue to be migrated are the same according to the first-in first-out principle.
It should be noted that, the explanation of the data queue to be migrated may refer to the explanation of the message queue in the above embodiment, which is not described herein.
For example, it is assumed that among the M pieces of migration data, the target data a1 is included in the target storage path of the data a, the target data b1 is included in the target storage path of the data b, and the target data c1 is included in the target storage path of the data c. On this basis, as shown in fig. 12, the new device adds the second data identifier corresponding to the target data a1 and the third data identifier corresponding to the data a as a group of data into the data queue to be migrated; adding a second data identifier corresponding to the target data b1 and a third data identifier corresponding to the data b into a data queue to be migrated as a group of data; and the second data identifier corresponding to the target data c1 and the third data identifier corresponding to the data c are used as a group of data to be added into a data queue to be migrated.
Thus, the data queue to be migrated includes three sets of messages, each set of messages corresponding to a second data identifier and a third data identifier. It should be appreciated that each time the new device determines that the target data is included in the target storage path of the migrated data, a set of messages is added to the queue of data to be migrated.
It should be noted that the data queue to be migrated has a first-in first-out principle, i.e. data that enters the queue first-out. In this embodiment of the present application, first, the second data identifier and the third data identifier in the data queue to be migrated first, and then the new device will first detect whether the content of the first migration data corresponding to the second data identifier and the content of the target data corresponding to the third data identifier are the same.
In this embodiment, under the condition that the target data is included in the target storage path of the first migration data, since the new device adds the second data identifier and the third data identifier as a group of messages into the data queue to be migrated, and the data queue to be migrated has the first-in first-out principle, that is, the second data identifier and the third data identifier enter the queue first, the new device will detect whether the content of the first migration data corresponding to the second identifier and the content of the first migration data corresponding to the third data identifier are the same first, so that the storage speed of the first migration data is not affected, and the data migration efficiency is further improved.
In some embodiments, as shown in connection with fig. 12, the new device sequentially detects whether the contents of the target data and the first migration data corresponding to each group of messages in the data queue to be migrated are the same. For each group of messages in the data queue to be migrated, the new device inputs a second data identifier in a group of messages into a preset algorithm model and outputs a first message identifier; inputting a third data identifier in a group of messages into a preset algorithm model, and outputting a second message identifier; when the first message identifier is the same as the second message identifier, the new device determines that the contents of the target data and the first migration data are the same; when the first message identifier and the second message identifier are different, the new device determines that the contents of the target data and the first migration data are different.
The first packet identifier and the second packet identifier may be, for example, 256-bit hash values.
When the first message identifier is the same as the second message identifier, the new device deletes the first migration data of the new storage disc, that is, the new device deletes the first migration data corresponding to the third data identifier, and the target data is reserved. When the first message identifier is different from the second message identifier, the new device reselects a group of messages from the data queue to be migrated, and detects whether the contents of the target data of the second data identifier corresponding to the group of messages and the first migration data of the third data identifier are the same.
In some embodiments, in conjunction with fig. 12, the new device may run multiple threads that detect in parallel whether the contents of the target data corresponding to the second data identifier and the first migration data corresponding to the third data identifier in a set of messages of the data queue to be migrated are the same, respectively.
Illustratively, as shown in FIG. 13, the new device runs with thread A, thread B, and thread C; the method comprises the steps that a new device running thread A detects whether target data corresponding to a second data identifier and first migration data corresponding to a third data identifier in a group of messages of a data queue to be migrated are the same in content or not; meanwhile, the new equipment operating thread B detects whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same or not; meanwhile, the new device running thread C detects whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same.
In this way, the new device runs a plurality of threads to detect whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same in parallel, so that the time for the new device to detect the content of the target data and the content of the first migration data is reduced, and the power consumption of the device is reduced.
In some embodiments, when the old device sends M pieces of migration data to the new device, if the new device detects that the content of the target data is different from that of the first migration data, the new device sends out first prompt information; the first prompt information is used for prompting a user that the data identifier of the first migration data is updated from the first data identifier to the third data identifier.
Taking the first data identifier of the first migration data as xxx-a and the third data identifier of the first migration data as xxx-a (1) as an example for illustration, the first prompt information may be voice prompt information or text prompt information.
When the first prompt information is voice prompt information, the new device can play the voice message through the loudspeaker, and prompt the user that the data identification of the first migration data is updated from the first data identification to the third data identification. The voice prompt message may be, for example, "the name of the first migration data is updated from xxx-a to xxx-a (1)".
When the first prompt is a text prompt, as shown in fig. 14, the new device displays an interface 212, and the interface 212 includes the text prompt. The text prompt may be, for example, "the name of the first migration data is updated from xxx-a to xxx-a (1)".
In this embodiment, when the content of the target data is different from that of the first migration data, the new device may send the first prompt message, and since the data identifier of the first migration data used for prompting the user by the first prompt message is updated to the third data identifier by the first data identifier, that is, the new device may prompt the user through the prompt message which migration data is renamed, it is convenient for the user to find the migration data in the new device, and user experience is improved.
The embodiment of the application provides an electronic device, which can be a first electronic device or a second electronic device. The electronic device may include a display screen, a memory, and one or more processors; the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the functions or steps performed by the old device and the new device in the above-described embodiments. The structure of the electronic device may refer to the structure of the electronic device 100 shown in fig. 2.
Embodiments of the present application also provide a chip system, as shown in fig. 15, the chip system 1800 includes at least one processor 1801 and at least one interface circuit 1802. The processor 1801 may be the processor 110 shown in fig. 2 in the above embodiment. Interface circuit 1802 may be, for example, an interface circuit between processor 110 and external memory 120; or as an interface circuit between the processor 110 and the internal memory 121.
The processor 1801 and interface circuit 1802 described above may be interconnected by wires. For example, interface circuit 1802 may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, interface circuit 1802 may be used to send signals to other devices (e.g., processor 1801). The interface circuit 1802 may, for example, read instructions stored in a memory and send the instructions to the processor 1801. The instructions, when executed by the processor 1801, may cause the electronic device to perform the steps performed by the handset 180 in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
The embodiment of the application also provides a computer readable storage medium, which comprises computer instructions, when the computer instructions run on the electronic device, the electronic device is caused to execute the functions or steps executed by the mobile phone in the embodiment of the method.
The present application also provides a computer program product, which when run on a computer, causes the computer to perform the functions or steps performed by the mobile phone in the above-mentioned method embodiments.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The data migration method is characterized by being applied to first electronic equipment, wherein the first electronic equipment is in communication connection with second electronic equipment; the method comprises the following steps:
the first electronic device sends first migration information to the second electronic device; the first migration information includes: a first data identifier of each of the M migration data, and a target storage path of the migration data indicated by the first data identifier; the target storage path is to indicate a path over which the migration data is to be stored on the first electronic device; m is a positive integer;
the first electronic device receives M pieces of migration data sent by the second electronic device according to the first migration information;
if the target storage path of the first migration data in the M migration data comprises target data, the first electronic equipment detects whether the content of the target data is the same as that of the first migration data; wherein the second data identification of the target data is the same as the first data identification of the first migration data;
If the content of the target data is the same as that of the first migration data, the first electronic device stores one of the target data or the first migration data;
and if the target data is different from the first migration data in content, the first electronic equipment stores the target data and the first migration data.
2. The method of claim 1, wherein before the first electronic device detects whether the target data is the same as the first migration data, the method further comprises:
the first electronic equipment stores the first migration data in a target storage path of the first migration data, and updates a first data identifier of the first migration data into a third data identifier;
wherein if the target data and the first migration data have the same content, the first electronic device stores one of the target data or the first migration data, including:
and if the content of the target data is the same as that of the first migration data, deleting the first migration data corresponding to the third data identifier by the first electronic equipment, and reserving the target data.
3. The method according to claim 2, wherein the method further comprises:
if the content of the target data is different from that of the first migration data, the first electronic equipment sends out first prompt information;
the first prompt message is used for prompting a user that the data identifier of the first migration data is updated from the first data identifier to the third data identifier.
4. A method according to claim 2 or 3, wherein if the target data is included in the target storage path of the first migration data, the method further comprises:
the first electronic device adds the second data identifier and the third data identifier as a group of messages to a data queue to be migrated;
the first electronic device detecting whether the target data and the first migration data have the same content, including:
and the first electronic equipment detects whether the target data corresponding to the second data identifier and the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same in content according to the first-in first-out principle.
5. The method of claim 4, wherein the detecting whether the target data corresponding to the second data identifier and the first migration data corresponding to the third data identifier in the set of messages of the data queue to be migrated are the same includes:
The first electronic equipment inputs the second data identifiers in the group of messages into a preset algorithm model and outputs first message identifiers;
the first electronic device inputs the third data identifier in the group of messages into the preset algorithm model and outputs a second message identifier;
when the first message identifier is the same as the second message identifier, the first electronic device determines that the contents of the target data and the first migration data are the same;
and when the first message identifier is different from the second message identifier, the first electronic equipment determines that the contents of the target data and the first migration data are different.
6. The method according to claim 4 or 5, wherein the detecting whether the target data corresponding to the second data identifier and the first migration data corresponding to the third data identifier in the set of messages of the data queue to be migrated are identical in content includes:
and the first electronic equipment runs a plurality of threads, and the threads respectively detect whether the content of the target data corresponding to the second data identifier and the content of the first migration data corresponding to the third data identifier in a group of messages of the data queue to be migrated are the same in parallel.
7. The method according to any one of claims 1-6, further comprising:
and if the target storage path of the first migration data does not include the target data, the first electronic device stores the first migration data in the target storage path of the first migration data.
8. The method of any of claims 1-7, wherein prior to the first electronic device sending first migration information to the second electronic device, the method further comprises:
the first electronic device receives second migration information from the second electronic device; the second migration information comprises a first data identifier of each migration data in N migration data and a storage path of each migration data on the second electronic device; n is a positive integer, N is greater than or equal to M;
the first electronic device determines a target storage path of each migration data in the M migration data according to a preset storage rule according to the second migration information; the preset storage rule is used for indicating the corresponding relation between the storage path of the migration data on the second electronic device and the storage path of the corresponding migration data to be stored on the first electronic device.
9. An electronic device, comprising: a display screen, a memory, and one or more processors; the display screen, the memory and the processor are coupled; the memory is used for storing computer program codes, and the computer program codes comprise computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-8.
10. A computer-readable storage medium comprising computer instructions; the computer instructions, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-8.
CN202210482824.1A 2022-05-05 2022-05-05 Data migration method, electronic equipment and storage medium Pending CN116049095A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210482824.1A CN116049095A (en) 2022-05-05 2022-05-05 Data migration method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210482824.1A CN116049095A (en) 2022-05-05 2022-05-05 Data migration method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116049095A true CN116049095A (en) 2023-05-02

Family

ID=86113876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210482824.1A Pending CN116049095A (en) 2022-05-05 2022-05-05 Data migration method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116049095A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412033A (en) * 2016-09-14 2017-02-15 广东欧珀移动通信有限公司 Data migration method and terminal
CN106446111A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Data migration method and terminal
CN106446114A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Data migration method and device
CN113992663A (en) * 2021-12-29 2022-01-28 荣耀终端有限公司 Method for sending file, electronic device and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412033A (en) * 2016-09-14 2017-02-15 广东欧珀移动通信有限公司 Data migration method and terminal
CN106446111A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Data migration method and terminal
CN106446114A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Data migration method and device
CN113992663A (en) * 2021-12-29 2022-01-28 荣耀终端有限公司 Method for sending file, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
US11611863B2 (en) Method and apparatus for low energy discovery
EP4319169A1 (en) Screen projection method for electronic device, and electronic device
JP6742465B2 (en) Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
CN113778663B (en) Scheduling method of multi-core processor and electronic equipment
EP3986008A1 (en) Method for using remote sim module, and electronic apparatus
US20220353819A1 (en) Method for Reducing Power Consumption of Mobile Terminal and Mobile Terminal
CN114996168B (en) Multi-device cooperative testing method, testing device and readable storage medium
KR102109883B1 (en) Content transmission method and apparatus
JP2022548734A (en) DEVICE CAPABILITY SCHEDULING METHOD AND ELECTRONIC DEVICE
KR102133514B1 (en) Status message service providing method of electronic apparatus and electronic apparatus thereof
WO2023088209A1 (en) Cross-device audio data transmission method and electronic devices
KR102137686B1 (en) Method for controlling an content integrity and an electronic device
CN104052801B (en) A kind of information processing method and electronic equipment
KR102133012B1 (en) Media streaming method and electronic device thereof
CN116049096B (en) Data migration method, electronic equipment and storage medium
US20220311700A1 (en) Method for multiplexing http channels and terminal
CN116049095A (en) Data migration method, electronic equipment and storage medium
CN115086888B (en) Message notification method and device and electronic equipment
WO2022001192A1 (en) Method for transmitting application data, and terminal and system
CN116048562B (en) Data updating method, electronic equipment and storage medium
WO2023005348A1 (en) Split-screen recommendation method and apparatus
CN117013660B (en) Charging icon display method and electronic equipment
CN109660610B (en) Data processing method, device, equipment and storage medium
CN116414782B (en) Method for identifying repeated file and electronic equipment

Legal Events

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