CN117667506A - Drawing library cloning method, system and electronic equipment - Google Patents

Drawing library cloning method, system and electronic equipment Download PDF

Info

Publication number
CN117667506A
CN117667506A CN202211040549.4A CN202211040549A CN117667506A CN 117667506 A CN117667506 A CN 117667506A CN 202211040549 A CN202211040549 A CN 202211040549A CN 117667506 A CN117667506 A CN 117667506A
Authority
CN
China
Prior art keywords
image
electronic device
attribute
application
gallery
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
CN202211040549.4A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211040549.4A priority Critical patent/CN117667506A/en
Publication of CN117667506A publication Critical patent/CN117667506A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)

Abstract

The embodiment of the invention provides a gallery cloning method, a gallery cloning system and electronic equipment. In the technical scheme provided by the embodiment of the invention, the first electronic equipment displays at least one image in the first gallery application in an arrangement mode according to the first attribute; responding to the operation of a user, compressing and packaging the at least one image to generate a first image package, wherein the first image package carries a first attribute of the image; and the first image package is sent to a second cloning application of the second electronic device through the first cloning application, and the second electronic device displays the at least one image in the second gallery application according to the first attribute, so that the cloned images are not displayed in disorder in the gallery application, and the user experience is improved.

Description

Drawing library cloning method, system and electronic equipment
[ field of technology ]
The present invention relates to the field of computer technologies, and in particular, to a gallery cloning method, a gallery cloning system, and an electronic device.
[ background Art ]
The cloning technology is to perform point-to-point data transmission through a network (such as a WiFi hotspot), and transmit backup data in the user side electronic device to a pluggable storage device of the user side electronic device, another user side electronic device or a network side electronic device. For example, a memory card is inserted into the mobile phone, and the mobile phone transfers the data originally stored in the memory space of the mobile phone after leaving the factory to the memory card after backup; the old mobile phone backups the data in the old mobile phone and then transmits the data to the new mobile phone; and backing up the data in the mobile phone to a cloud server through cloud service.
In the current cloning technology, after the electronic equipment is cloned, the cloned images (i.e. pictures and videos) may be displayed out of order in the gallery application, so that the user experience is poor.
[ invention ]
In view of this, the embodiment of the invention provides a gallery cloning method, a gallery cloning system and electronic equipment, so that cloned images are not displayed in disorder in gallery application, and user experience is improved.
In a first aspect, an embodiment of the present invention provides a gallery cloning method, applied to a first electronic device, where the method includes:
displaying at least one image in the first gallery application in an arrangement mode according to the first attribute;
responding to the operation of a user, compressing and packaging the at least one image to generate a first image package, wherein the first image package carries a first attribute of the image;
and sending the first image package to a second cloning application of a second electronic device through the first cloning application so that the second electronic device displays the at least one image in a second gallery application according to the first attribute.
With reference to the first aspect, in certain implementations of the first aspect, the first image packet includes at least one first slice packet;
The compressing and packaging the at least one image applied to the first gallery to generate a first image package includes:
and carrying out fragment compression packaging on at least one image applied to the first gallery according to the first attribute and the first value to generate at least one first fragment packet.
With reference to the first aspect, in certain implementation manners of the first aspect, performing tile compression and packaging on at least one image applied by the first gallery according to the first attribute includes:
and carrying out fragment compression packaging on at least one image applied to the first gallery according to the at least one image and the arrangement sequence of the first attribute.
With reference to the first aspect, in certain implementation manners of the first aspect, the sending, by the first cloning application, the first image package to a second cloning application of a second electronic device includes:
and sequentially sending the at least one first fragment packet to the second clone application of the second electronic equipment through the first clone application according to the generation sequence of the first fragment packet.
With reference to the first aspect, in certain implementations of the first aspect, the first attribute includes a creation time, a shooting time, a modification time, a file name, or a file size of the image at the first electronic device.
With reference to the first aspect, in certain implementation manners of the first aspect, the first shard package further includes a target file, where the target file includes the first attribute and metadata information of the image in the first shard package.
With reference to the first aspect, in certain implementation manners of the first aspect, the target file is a DB file.
With reference to the first aspect, in certain implementations of the first aspect, the first value includes a maximum value of a number of the images in the first slice packet.
With reference to the first aspect, in certain implementations of the first aspect, the image includes a picture and/or a video.
With reference to the first aspect, in certain implementations of the first aspect, the first cloning application and the second cloning application are the same.
With reference to the first aspect, in certain implementations of the first aspect, a wireless connection is provided between the first electronic device and the second electronic device.
In a second aspect, an embodiment of the present invention provides a gallery cloning method, which is applied to a second electronic device, where the method includes:
receiving a first image package sent by a first electronic device through a second cloning application, wherein the first image package comprises at least one image and a first attribute of at least one image of a first gallery application of the first electronic device;
And displaying the at least one image in a second gallery application according to the first attribute.
With reference to the second aspect, in some implementations of the second aspect, the displaying the at least one image in a second gallery application according to the first attribute includes:
configuring a second attribute for the image in the first image package according to the first attribute, and generating a second image package;
and displaying the images in the image package in a second gallery application according to the second attribute.
With reference to the second aspect, in certain implementations of the second aspect, the first image package includes at least one first tile package;
the receiving, by the second cloning application, the first image packet sent by the first electronic device includes:
and sequentially receiving the at least one first fragment packet through the second cloning application.
With reference to the second aspect, in certain implementations of the second aspect, the second image package includes at least one second slice package;
the configuring a second attribute for the image in the first image packet according to the first attribute, and generating a second image packet includes:
and configuring the second attribute for the images in the first fragment packet according to the sequence of receiving the first fragment packet and the arrangement sequence of the first attribute by the images, and sequentially generating at least one second fragment packet.
With reference to the second aspect, in some implementations of the second aspect, displaying the image in the image package in the second gallery application according to the second attribute includes:
and sequentially displaying the images in the at least one second fragment packet in the second gallery application according to the generation sequence of the second fragment packet and the second attribute.
With reference to the second aspect, in certain implementations of the second aspect, the method further includes:
and sequentially storing the images in the at least one second fragment packet to a second database according to the generation sequence of the second fragment packet.
With reference to the second aspect, in some implementations of the second aspect, the first attribute includes a creation time, a shooting time, a modification time, a file name, or a file size of the image at the first electronic device.
With reference to the second aspect, in certain implementations of the second aspect, the second attribute corresponds to the first attribute.
With reference to the second aspect, in certain implementations of the second aspect, the first shard package further includes a target file, where the target file includes the first attribute and metadata information of the image in the first shard package.
With reference to the second aspect, in certain implementations of the second aspect, the target file is a DB file.
With reference to the second aspect, in certain implementations of the second aspect, the image includes a picture and/or a video.
With reference to the second aspect, in certain implementations of the second aspect, the first cloning application and the second cloning application are the same.
With reference to the second aspect, in certain implementations of the second aspect, the first electronic device and the second electronic device are connected wirelessly.
In a third aspect, an embodiment of the present invention provides a gallery cloning system, which includes the first electronic device according to any one of the first aspects and the second electronic device according to any one of the second aspects.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is configured to store a computer program, the computer program including program instructions that, when executed by the processor, cause the electronic device to perform a method as described above.
In a fifth aspect, embodiments of the present invention provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a computer, cause the computer to perform a method as described above.
In the technical scheme of the gallery cloning method, the gallery cloning system and the electronic equipment provided by the embodiment of the invention, the first electronic equipment performs arrangement display on at least one image in the first gallery application according to the first attribute; responding to the operation of a user, compressing and packaging the at least one image to generate a first image package, wherein the first image package carries a first attribute of the image; and the first image package is sent to a second cloning application of the second electronic device through the first cloning application, and the second electronic device displays the at least one image in the second gallery application according to the first attribute, so that the cloned images are not displayed in disorder in the gallery application, and the user experience is improved.
[ description of the drawings ]
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
FIG. 2 is a block diagram of the software architecture of an electronic device 100 according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a cloning application interface of a current electronic device during cloning;
FIG. 4 is a schematic diagram of an image arrangement sequence in a gallery application of a current old and new electronic device;
FIG. 5 is a schematic diagram of a gallery cloning system according to an embodiment of the present invention;
FIG. 6 is a signaling interaction diagram of a gallery cloning method according to an embodiment of the present invention;
FIG. 7 is a flowchart of a gallery cloning method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a first electronic device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a second electronic device according to an embodiment of the present invention.
[ detailed description ] of the invention
For a better understanding of the technical solution of the present invention, the following detailed description of the embodiments of the present invention refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one way of describing an association of associated objects, meaning that there may be three relationships, e.g., a and/or b, which may represent: the first and second cases exist separately, and the first and second cases exist separately. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Fig. 1 shows a schematic configuration of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, 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 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 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.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present invention is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
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 100. 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 to power the processor 110, the internal memory 121, 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 antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
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) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
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, electronic device 100 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 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
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 100 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 awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
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 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. 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 100 (e.g., audio data, phonebook, etc.), and so on. 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 processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
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. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
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 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 electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
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. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
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 100. The electronic device 100 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. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with capturing a photo scene.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as an example of a control of a camera application icon, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera driver by calling a kernel layer, and captures a still image or video by the camera 193.
The cloning technology is to perform point-to-point data transmission through a network (such as wifi hot spot), and transmit backup data in the user side electronic device to an pluggable storage device of the user side electronic device, another user side electronic device or a network side electronic device. FIG. 3 is a schematic diagram of a cloning application interface of a current electronic device during cloning. As shown in fig. 3, in the cloning process, a user side electronic device (for example, an old electronic device) is sending backup data to another user side electronic device (for example, a new electronic device), where the backup data includes information in applications such as a contact application, an information application, a call record application, a calendar application, and a gallery application; at this time, the cloning application interface prompts the user to "do not leave this page", because the current fault tolerance mechanism is unreliable, and if the electronic device runs other applications after leaving the cloning application interface, unpredictable effects may be generated on the cloning content. Thus, both the old electronic device and the new electronic device must leave the cloning application interface as shown in FIG. 1 after cloning is completed. If the amount of cloned data is large, the user waiting time is long. For example, cloning 100G data, a user typically needs to wait at least 20 minutes.
During the cloning process, the user still cannot view the image even if the new electronic device exits the cloning application to the background and launches the gallery application. The method is that when cloning and transmitting are performed at present, the old electronic equipment packs all images in the gallery application into a compressed package and transmits the compressed package to the new electronic equipment, so that a user can not view pictures and videos in the gallery application in the new electronic equipment until the new electronic equipment receives the whole compressed package.
And, the cloned images may be displayed out of order in the new electronic device. Fig. 4 is a schematic diagram of an image arrangement sequence in a gallery application of a new and old electronic device at present. The image arrangement sequence in the gallery application of the old electronic device is shown in fig. 4 (a); after cloning, the image arrangement sequence in the gallery application of the new electronic device is shown in fig. 4 (b). The main reasons for the out-of-order display of the images are related to the ordering rules of the images and the migration strategies of cloning application, and the ordering of the images according to different ordering rules and the adoption of different migration strategies can lead to inconsistent arrangement orders of the images in gallery application.
Illustratively, the ordering rules for images include ordering the images according to their capture time, creation time, modification time, file name or file size, etc. Wherein the photographing time is the time at which the image is photographed; the creation time is the time at which the image is generated in the electronic device; the modification time is the time when the electronic device edits the image to generate an edited image. For an image photographed by an electronic device through a camera, the same time is recorded in metadata of photographing time and creation time, namely, the time when the image is photographed. For an image downloaded through a network or a composite image, there is no photographing time, but there is a creation time, since it is not photographed by an electronic device through a camera.
Illustratively, the migration policy of the clone application includes preferentially migrating according to the shooting time, creation time, modification time, file name or file size of the image, and the like.
By way of example, images are typically ordered according to their creation time in a gallery application of an old electronic device, which results in the loss of old capture time and old creation time information of images during gallery cloning (the old capture time and old creation time of images are not packaged together by an electronic device when the images are compressed and packaged), and cloned images have new creation times due to a migration policy of a cloning application, such as the migration policy of the cloning application is preferentially migrated according to the file size of the images, so that cloned images in a new electronic device are created according to the file size, and since the gallery application of the new electronic device orders images according to the new creation time of cloned images, the picture arrangement order in the gallery application in the new electronic device actually orders images according to the file size. Therefore, the image arrangement sequence of the gallery application of the new and old electronic devices is inconsistent, resulting in poor user experience.
Based on the technical problems, the embodiment of the invention provides a gallery cloning system, which is suitable for a scene that a first electronic device transmits gallery cloning data to a second electronic device through cloning application. The hardware structure and the software structure of the first electronic device and the second electronic device provided by the embodiment of the present invention may be referred to in fig. 1 and fig. 2 for a related description of the electronic device 100. The first electronic device may be understood as the "old electronic device" described above and the second electronic device may be understood as the "new electronic device" described above. For example, the first electronic device may be a mobile phone, a tablet computer, a smart watch, or the like; the second electronic device may be a mobile phone, a tablet computer, a smart watch, or the like.
Fig. 5 is a schematic diagram of a gallery cloning system according to an embodiment of the present invention. As shown in fig. 5, the gallery cloning system includes a first electronic device 200 and a second electronic device 300. The first electronic device 200 comprises a first database 201, a first gallery application 202, a first backup service module 203 and a first cloning application 204. The second electronic device 300 comprises a second database 301, a second gallery application 302, a second backup service module 303, a second cloning application 304 and a second wireless connection module 305. The first electronic device 200 and the second electronic device 300 are wirelessly connected through the first wireless connection module 205 and the second wireless connection module 305. Illustratively, the wireless connection is established between the first wireless connection module 205 and the second wireless connection module 305 via a hotspot.
The first database 201 and the second database 301 are warehouses that organize, store, and manage data according to data structures. In the embodiment of the present invention, the first database 201 is used to store all the images in the first gallery application 202. The second database 301 is used to store all images in the second gallery application 302.
The first clone application 204 includes an application built into the system of the first electronic device 200 or a third party application. The second clone application 304 includes an application built into the system of the second electronic device 300 or a third party application. Illustratively, the first cloning application 204 and the second cloning application 304 are the same application.
The first gallery application 202 is configured to display at least one image in the first gallery application 202 in a ranked manner according to the first attribute. The first attribute includes a creation time, a photographing time, a modification time, a file name, or a file size of the image at the first electronic device.
The first cloning application 204 is configured to send a cloning request to the first backup service module 203 in response to an operation by a user. The user clicks a control for starting cloning in the interface of the first cloning application 204, and the first cloning application 204 sends a cloning request to the first backup service module 203 in response to an operation of the user.
The first backup service module 203 sends a packaging request to the first gallery application 202 according to the cloning request, the packaging request including the first attribute and the first value. The first value includes a maximum value of the number of images in each of the slice packets of the slice compression package.
For example, as shown in fig. 4 (a), a total of 32 preview images are displayed in the album preview interface of the gallery application of the electronic device 200, so that the first value may be set to 32, so that when the electronic device 200 performs the slice packaging on the images of the gallery application, a slice package may contain at most 32 images.
The first gallery application 202 is further configured to obtain, according to the packaging request, an image of the first gallery application 202 stored in the first database 201, compress and package the image of the first gallery application 202, generate a first image package, and send the first image package to the first backup service module 203. Wherein the first image package carries a first attribute of the image. The first image package includes at least one first slice package, and the first gallery application 202 is specifically configured to obtain, according to a packaging request, an image of the first gallery application 202 stored in the first database 201, compress and package the image of the first gallery application 202 according to a first attribute and a first value, generate at least one first slice package, and sequentially send the at least one first slice package to the first backup service module 203 according to a generation sequence of the first slice package. The first fragment packet further comprises a target file, wherein the target file comprises a DB file, and the DB file is a carrier for storing database information. In the embodiment of the invention, the target file comprises the first attribute and metadata information of the image in the first fragment packet. The performing the tile compression and packaging on the image of the first gallery application 202 according to the first attribute refers to performing the tile compression and packaging according to the arrangement order of at least one image displayed in the first gallery application 202. The step of sequentially transmitting at least one first fragment packet according to the generation sequence of the first fragment packet means that the first generated first fragment packet is transmitted first, then the second generated first fragment packet is transmitted, and so on, and finally the last generated first fragment packet is transmitted.
The first backup service module 203 is configured to receive the first image packet and send the first image packet to the first cloning application 204. Specifically, the first backup service module 203 is configured to sequentially receive at least one first slice packet, and sequentially send the at least one first slice packet to the first cloning application 204 according to an order of receiving the first slice packet.
The first cloning application 204 is configured to receive a first image packet and send the first image packet to the first wireless connection module 205. Specifically, the first cloning application 204 is configured to sequentially receive at least one first fragment packet, and sequentially send the at least one first fragment packet to the first wireless connection module 205 according to the order of receiving the first fragment packet.
The first wireless connection module 205 is configured to receive the first image packet and send the first image packet to the second wireless connection module 305. Specifically, the first wireless connection module 205 is configured to sequentially receive at least one first slice packet, and sequentially send the at least one first slice packet to the second wireless connection module 305 according to the sequence of receiving the first slice packet.
The second wireless connection module 305 is configured to receive the first image packet and send the first image packet to the second cloning application 304. Specifically, the second wireless connection module 305 is configured to sequentially receive at least one first slice packet, and sequentially send the at least one first slice packet to the second cloning application 304 according to the order of receiving the first slice packet.
The second cloning application 304 is configured to receive the first image package and send the first image package to the second backup service module 303. Specifically, the second cloning application 304 is configured to sequentially receive at least one first fragment packet, and sequentially send the at least one first fragment packet to the second backup service module 303 according to the order of receiving the first fragment packet.
The second backup service module 303 is configured to receive the first image package, configure a second attribute for the image in the first image package according to the first attribute, generate a second image package, and send the second image package to the second gallery application 302. The second image package includes at least one second slice package. Specifically, the second backup service module 303 is configured to sequentially receive at least one first fragment packet, configure a second attribute for an image in the first fragment packet according to an order of receiving the first fragment packet and an order of arranging the images according to the first attribute, sequentially generate at least one second fragment packet, and sequentially send the at least one second fragment packet to the second gallery application 302 according to a generation order of the second fragment packet. The second attribute includes a creation time of the image at the second electronic device 300.
The second attribute corresponds to the first attribute, and specifically, if the first attribute is the creation time of the image in the first electronic device, the second attribute is the creation time of the image in the second electronic device; if the first attribute is the shooting time of the image in the first electronic equipment, the second attribute is the shooting time of the image in the second electronic equipment; if the first attribute is the modification time of the image in the first electronic equipment, the second attribute is the modification time of the image in the second electronic equipment; if the first attribute is the file name of the image in the first electronic equipment, the second attribute is the file name of the image in the second electronic equipment; and if the first attribute is the file size of the image in the first electronic device, the second attribute is the file size of the image in the second electronic device.
The second gallery application 302 is configured to receive a second image package, and display images in the second image package according to a second attribute. Specifically, the second gallery application 302 is configured to sequentially receive at least one second slice packet, and sequentially display images in the at least one second slice packet according to the order in which the second slice packet is received and the second attribute. The second gallery application 302 is further configured to store images in at least one second tile package to the second database 301 sequentially according to an order in which the second tile packages are received.
In the gallery cloning process, when the first electronic device compresses and packages the images to generate the first image package, the first attribute of the images is added to the first image package, so that the second electronic device configures the second attribute for the images according to the first attribute of the images. Therefore, the arrangement order of the images in the second electronic device according to the second attribute is the same as the arrangement order of the images in the first electronic device according to the first attribute. Because the first gallery application and the second gallery application are both used for arranging the images according to the same attribute of the images, the arrangement sequence of the cloned images in the second gallery application is consistent with the arrangement sequence of the cloned images in the first gallery application.
Specifically, in the gallery cloning process, the first electronic device 200 performs slice compression and packaging on the image of the first gallery application 202 according to the first attribute to generate at least one first slice packet, and sequentially sends the at least one first slice packet to the second electronic device 300 according to the generation sequence of the first slice packet; the second electronic device 300 sequentially generates at least one second fragment packet according to the order in which the first fragment packets are received and the second attribute configured for the images in the first fragment packet according to the arrangement order of the first attribute, then sequentially stores the images in the at least one second fragment packet in the second database 301, and sequentially displays the images in the at least one second fragment packet. Therefore, in the whole process of gallery cloning, not only the ordering rules of the images in the first gallery application 202 and the second gallery application 302 are ordered according to the first attribute and the second attribute of the images, but also the migration policies of the first clone application 204 and the second clone application 304 are migrated according to the first attribute of the images, so that the ordering sequence of the images in the gallery application of the second electronic device 300 and the first electronic device 200 is consistent, and the user experience is improved.
On the other hand, in the gallery cloning process according to the embodiment of the present invention, the first electronic device 200 compresses and packages all the images of the first gallery application into at least one slice packet according to the first value, and transmits the at least one slice packet to the second electronic device 300, where the number of images in each slice packet is relatively small, the time consumed for compressing and packaging each slice packet, the time consumed for transmitting the compressed and packaged image to the second electronic device 300, and the time consumed for decompressing and displaying the compressed and packaged image in the second electronic device 300 are also very short, so long as the second electronic device 300 completes cloning of the first slice packet, the user can open the second gallery application 302 to view the images in the first slice packet, for example, the user can wait for 1.5s at maximum to view the cloned images. Thus, the user does not have to wait for all of the images of the gallery application to be cloned before viewing the cloned images in the second gallery application 302 while using the second electronic device 300.
Based on the gallery cloning system shown in fig. 5, the embodiment of the invention provides a gallery cloning method. Fig. 6 is a signaling interaction diagram of a gallery cloning method according to an embodiment of the present invention. As shown in fig. 6, the method includes:
step 402, the first gallery application displays at least one image in the first gallery application in a permutation manner according to the first attribute.
Step 404, the first cloning application sends a cloning request to the first backup service module in response to the user operation.
Step 406, the first backup service module sends a packaging request to the first gallery application according to the cloning request.
Wherein the packaging request includes a first attribute and a first value. The first attribute comprises creation time, shooting time, modification time, file name or file size of the image of the first gallery application in the first database; the first value includes a maximum value of the number of images in each of the slice packets of the slice compression package.
Step 408, the first gallery application obtains the image of the first gallery application stored in the first database according to the packaging request, compresses and packages the image of the first gallery application, and generates a first image package.
In the embodiment of the present invention, the first image packet includes at least one first slice packet, and step 408 specifically includes: the first gallery application obtains images of the first gallery application stored in the first database according to the packing request, and performs fragment compression packing on the images of the first gallery application according to the first attribute and the first value to generate at least one first fragment packet.
The maximum value of the number of images in the first slice packet is a first value.
The first fragment packet further comprises a target file, wherein the target file comprises a DB file, and the DB file is a carrier for storing database information. In the embodiment of the invention, the target file comprises the first attribute and metadata information of the image in the first fragment packet.
The step of performing the slice packing on the images applied to the first gallery according to the first attribute refers to performing the slice compression packing on the images according to the arrangement sequence of the first attribute. The step of sequentially transmitting at least one first fragment packet according to the generation sequence of the first fragment packet means that the first generated first fragment packet is transmitted first, then the second generated first fragment packet is transmitted, and so on, and finally the last generated first fragment packet is transmitted.
In step 410, the first gallery application sends the first image package to the first backup service module.
In the embodiment of the present invention, step 410 specifically includes: and the first gallery application sequentially sends at least one first fragment packet to the first backup service module according to the generation sequence of the first fragment packet.
Step 412, the first backup service module sends the first image package to the first cloning application.
In the embodiment of the present invention, step 412 specifically includes: the first backup service module sequentially sends at least one first fragment packet to the first cloning application according to the sequence of receiving the first fragment packets.
Step 414, the first cloning application sends the first image package to the first wireless connection module.
In the embodiment of the present invention, step 414 specifically includes: the first cloning application sequentially sends at least one first fragmented packet to the first wireless connection module according to the order in which the first fragmented packets were received.
Step 416, the first wireless connection module sends the first image packet to the second wireless connection module.
In the embodiment of the present invention, step 416 specifically includes: the first wireless connection module sequentially sends at least one first fragment packet to the second wireless connection module according to the sequence of receiving the first fragment packets.
Step 418, the second wireless connection module sends the first image package to the second cloning application.
In the embodiment of the present invention, step 418 specifically includes: the second wireless connection module sequentially sends at least one first fragment packet to the second cloning application according to the sequence of receiving the first fragment packets.
Step 420, the second cloning application sends the first image package to the second backup service module.
In the embodiment of the present invention, step 420 specifically includes: the second cloning application sequentially sends at least one first fragment packet to the second backup service module according to the order in which the first fragment packets were received.
In step 422, the second backup service module configures a second attribute for the image in the first image package according to the first attribute, and generates a second image package.
In the embodiment of the present invention, the second image packet includes at least one second slice packet, and step 422 specifically includes: the second backup service module configures a second attribute for the images in the first fragment packet according to the sequence of receiving the first fragment packet and the arrangement sequence of the images according to the first attribute, and sequentially generates at least one second fragment packet.
Wherein the second attribute corresponds to the first attribute.
In step 424, the second backup service module sends the second image package to the second gallery application.
In the embodiment of the present invention, step 424 specifically includes: and sequentially sending at least one second fragment packet to a second gallery application according to the generation sequence of the second fragment packets.
Step 426, the second gallery application will display the images in the second image package according to the second attribute.
In the embodiment of the present invention, step 426 specifically includes: the second gallery application sequentially displays images in at least one second tile package according to the order in which the second tile packages were received and the second attribute.
In the embodiment of the invention, the second gallery application also stores the images in at least one second fragment packet to the second database in turn according to the order in which the second fragment packets are received.
In the gallery cloning process, when the first electronic device compresses and packages the images to generate the first image package, the first attribute of the images, namely, the creation time of the images in the first electronic device is added to the first image package, so that the second electronic device configures the second attribute for the images according to the first attribute of the images. Therefore, the arrangement order of the images in the second electronic device according to the second attribute is the same as the arrangement order of the images in the first electronic device according to the first attribute. Because the first gallery application and the second gallery application are both used for arranging the images according to the same attribute of the images, the arrangement sequence of the cloned images in the second gallery application is consistent with the arrangement sequence of the cloned images in the first gallery application.
In the process of cloning a gallery, the first electronic device packs all images applied to the first gallery into at least one first fragment packet according to a first numerical value and a first attribute from old to new, and sequentially sends the at least one first fragment packet to the second electronic device according to the generation sequence of the first fragment packet; the second electronic device configures second attributes for the images in the first fragment packets according to the sequence of receiving the first fragment packets and the arrangement sequence of the first attributes, sequentially generates at least one second fragment packet, sequentially stores the images in the at least one second fragment packet in a second database, and sequentially displays the images in the at least one second fragment packet. On the one hand, the number of the images in each slice packet is a first value, the compression and packaging time of each slice packet, the time of transmission to the second electronic device and the time of decompression and display in the second electronic device are relatively small, so long as the second electronic device completes cloning of one slice packet, a user can open the second gallery application to view the images in the first slice packet, for example, the slice packaging is performed according to the first value of 32, and the user can view the cloned images after waiting for 1.5s at most. Therefore, the user can check the cloned images in the second gallery application without waiting for all the images of the gallery application to be cloned when using the second electronic device. On the other hand, in the whole process of gallery cloning, the ordering rules of the images in the first gallery application and the second gallery application are ordered according to the first attribute and the second attribute of the images, and the migration strategies of the first clone application and the second clone application are migrated according to the first attribute of the images, so that the ordering sequence of the images in the second electronic equipment and the gallery application of the first electronic equipment is consistent, and the user experience is improved.
Based on the gallery cloning system shown in fig. 5, the embodiment of the invention provides a gallery cloning method. FIG. 7 is a flowchart of a gallery cloning method according to an embodiment of the present invention. As shown in fig. 7, the method includes:
step 502, the first electronic device displays at least one image in the first gallery application in an arrangement mode according to the first attribute.
In step 504, the first electronic device compresses and packages at least one image applied by the first gallery in response to the operation of the user, and generates a first image package, where the first image package carries a first attribute of the image.
In the embodiment of the present invention, the first image packet includes at least one first slice packet, and step 504 specifically includes: and the first electronic equipment responds to the operation of the user, and performs fragment compression packaging on the image applied by the first gallery according to the first attribute and the first numerical value to generate at least one first fragment packet.
The first fragment package comprises a target file, wherein the target file comprises a DB file, and the DB file is a carrier for storing database information. In the embodiment of the invention, the target file comprises the first attribute and metadata information of the image in the first fragment packet.
The performing the slice compression and packaging on the images applied to the first gallery according to the first attribute refers to performing the slice compression and packaging on at least one image according to the arrangement sequence of the first attribute.
Step 506, the first electronic device sends the first image package to a second cloning application of the second electronic device through the first cloning application.
In the embodiment of the present invention, step 506 specifically includes: and the first electronic equipment sequentially sends at least one first fragment packet to a second clone application of the second electronic equipment through the first clone application according to the generation sequence of the first fragment packet.
The step of sequentially transmitting at least one first fragment packet according to the generation sequence of the first fragment packet means that the first generated first fragment packet is transmitted first, then the second generated first fragment packet is transmitted, and so on, and finally the last generated first fragment packet is transmitted.
Step 508, the second electronic device configures a second attribute for the image in the first image packet according to the first attribute, and generates a second image packet.
In the embodiment of the present invention, step 508 specifically includes: the second electronic device configures second attributes for the images in the first fragment packets according to the sequence of receiving the first fragment packets and the arrangement sequence of the images according to the first attributes, and sequentially generates at least one second fragment packet.
Wherein the second attribute comprises a creation time, a shooting time, a modification time, a file name, or a file size of the image at the second electronic device.
Step 510, the second electronic device displays the image in the second image package in the second gallery application according to the second attribute.
In the embodiment of the present invention, step 510 specifically includes: and the second electronic equipment sequentially displays images in at least one second fragment packet in the second gallery application according to the generation sequence of the second fragment packet and the second attribute. In the embodiment of the invention, the second electronic device further stores the images in at least one second fragment packet to the second database in sequence according to the generation sequence of the second fragment packet.
In the gallery cloning process, when the first electronic device compresses and packages the images to generate the first image package, the first attribute of the images is added to the first image package, so that the second electronic device configures the second attribute for the images according to the first attribute of the images. Therefore, the arrangement order of the images in the second electronic device according to the second attribute is the same as the arrangement order of the images in the first electronic device according to the first attribute. Because the first gallery application and the second gallery application are both used for arranging the images according to the same attribute of the images, the arrangement sequence of the cloned images in the second gallery application is consistent with the arrangement sequence of the cloned images in the first gallery application.
In the gallery cloning process, the first electronic device packs all the images of the first gallery application into at least one first fragment packet according to the first numerical value and the first attribute, and sequentially sends the at least one first fragment packet to the second electronic device according to the generation sequence of the first fragment packet; the second electronic device configures second attributes for the images in the first fragment packets according to the sequence of receiving the first fragment packets and the arrangement sequence of the first attributes according to the images, sequentially generates at least one second fragment packet, sequentially stores the images in the at least one second fragment packet in a second database, and sequentially displays the images in the at least one second fragment packet. On the one hand, the number of the images in each slice packet is a first value, the compression and packaging time of each slice packet, the time of transmission to the second electronic device and the time of decompression and display in the second electronic device are relatively small, so long as the second electronic device completes cloning of one slice packet, a user can open the second gallery application to view the images in the first slice packet, for example, the slice packaging is performed according to the first value of 32, and the user can view the cloned images after waiting for 1.5s at most. Therefore, the user can check the cloned images in the second gallery application without waiting for all the images of the gallery application to be cloned when using the second electronic device. On the other hand, in the whole process of gallery cloning, the ordering rules of the images in the first gallery application and the second gallery application are ordered according to the same attribute of the images, and the migration strategies of the first clone application and the second clone application are migrated according to the first attribute of the images, so that the ordering sequence of the images in the second electronic equipment and the gallery application of the first electronic equipment is consistent, and the user experience is improved.
Fig. 8 is a schematic structural diagram of a first electronic device according to an embodiment of the present invention, and it should be understood that the first electronic device 600 is capable of executing each step of the first electronic device in the gallery cloning method described above, and in order to avoid repetition, details are not described herein. The first electronic device 600 includes: a first display unit 601, a first processing unit 602, and a first transceiving unit 603.
The first display unit 601 is configured to display at least one image in the first gallery application in an aligned manner according to the first attribute;
the first processing unit 602 is configured to compress and package the at least one image in response to an operation of a user, and generate a first image package, where the first image package carries a first attribute of the image.
The first transceiver unit 603 is configured to send, by using the first cloning application, the first image package to a second cloning application of the second electronic device, so that the second electronic device displays the at least one image in a second gallery application according to the first attribute.
Optionally, the first image packet includes at least one first slice packet;
the first processing unit 602 is specifically configured to perform tile compression and packaging on at least one image applied by the first gallery according to the first attribute and the first value, so as to generate at least one first tile package.
Optionally, the first processing unit 602 is specifically configured to perform tile compression packaging on at least one image applied to the first gallery according to the at least one image in the arrangement order of the first attribute.
Optionally, the first transceiver unit 603 is specifically configured to sequentially send, according to the generation order of the first slice packets, the at least one first slice packet to the second cloning application of the second electronic device through the first cloning application.
Optionally, the first attribute includes a creation time, a shooting time, a modification time, a file name, or a file size of the image at the first electronic device.
Optionally, the first tile package further includes a target file, where the target file includes the first attribute and metadata information of the image in the first tile package.
Optionally, the target file is a DB file.
Optionally, the first value includes a maximum value of the number of images in the first slice packet.
Optionally, the image comprises a picture and/or a video.
Optionally, the first cloning application and the second cloning application are the same.
Optionally, the first electronic device and the second electronic device are connected wirelessly.
Fig. 9 is a schematic structural diagram of a second electronic device according to an embodiment of the present invention, and it should be understood that the second electronic device 700 is capable of executing the steps of the second electronic device in the gallery cloning method described above, and the details thereof are not repeated here. The second electronic device 700 includes: a second transceiver unit 701, a second display unit 702, and a second processing unit 703.
The second transceiver unit 701 is configured to receive, by using a second cloning application, a first image package sent by a first electronic device, where the first image package includes at least one image of a first gallery application of the first electronic device and a first attribute thereof.
The second display unit 702 is configured to display the at least one image in a second gallery application according to the first attribute.
Optionally, the second processing unit 703 is configured to configure a second attribute for an image in the first image packet according to the first attribute, and generate a second image packet; the second display unit 702 is specifically configured to display the images in the image package in the second gallery application according to the second attribute.
Optionally, the first image packet includes at least one first slice packet;
the second transceiver unit 701 is specifically configured to sequentially receive the at least one first fragment packet through the second cloning application.
Optionally, the second image package includes at least one second tile package;
the second processing unit 703 is specifically configured to sequentially generate at least one second slice packet according to the order of receiving the first slice packet and the second attribute configured for the image in the first slice packet according to the arrangement order of the first attribute.
Optionally, the second display unit 702 is specifically configured to sequentially display, in the second gallery application, the images in the at least one second slice packet according to the generation order of the second slice packet and the second attribute.
Optionally, the second processing unit 703 is further configured to store the images in the at least one second fragment packet to a second database sequentially according to the generation order of the second fragment packets.
Optionally, the first attribute includes a creation time, a shooting time, a modification time, a file name, or a file size of the image at the first electronic device.
Optionally, the second attribute corresponds to the first attribute.
Optionally, the first tile package further includes a target file, where the target file includes the first attribute and metadata information of the image in the first tile package.
Optionally, the target file is a DB file.
Optionally, the image comprises a picture and/or a video.
Optionally, the first cloning application and the second cloning application are the same.
Optionally, the first electronic device and the second electronic device are connected wirelessly.
It should be understood that the first electronic device 600 and the second electronic device 700 herein are embodied in the form of functional units. The term "unit" herein may be implemented in software and/or hardware, without specific limitation. For example, a "unit" may be a software program, a hardware circuit or a combination of both that implements the functions described above. The hardware circuitry may include application specific integrated circuits (application specific integrated circuit, ASICs), electronic circuits, processors (e.g., shared, proprietary, or group processors, etc.) and memory for executing one or more software or firmware programs, merged logic circuits, and/or other suitable components that support the described functions.
Thus, the elements of the examples described in the embodiments of the present invention can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The embodiment of the application provides electronic equipment, which can be terminal equipment or circuit equipment built in the terminal equipment. The electronic device may be adapted to perform the functions/steps of the method embodiments described above.
Embodiments of the present application provide a computer readable storage medium having instructions stored therein which, when executed on a terminal device, cause the terminal device to perform the functions/steps as in the method embodiments described above.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer or any of the at least one processor, cause the computer to perform the functions/steps as in the method embodiments described above.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In several embodiments provided herein, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method 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 specific embodiments of the present application, and any person skilled in the art may easily conceive of changes or substitutions within the technical scope of the present application, which should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (27)

1. A gallery cloning method, for use with a first electronic device, the method comprising:
displaying at least one image in the first gallery application in an arrangement mode according to the first attribute;
responding to the operation of a user, compressing and packaging the at least one image to generate a first image package, wherein the first image package carries a first attribute of the image;
and sending the first image package to a second cloning application of a second electronic device through the first cloning application so that the second electronic device displays the at least one image in a second gallery application according to the first attribute.
2. The method of claim 1, wherein the first image packet comprises at least one first slice packet;
the compressing and packaging the at least one image applied to the first gallery to generate a first image package includes:
And carrying out fragment compression packaging on at least one image applied to the first gallery according to the first attribute and the first value to generate at least one first fragment packet.
3. The method of claim 2, wherein the tile compression packaging of the at least one image of the first gallery application according to the first attribute comprises:
and carrying out fragment compression packaging on at least one image applied to the first gallery according to the at least one image and the arrangement sequence of the first attribute.
4. A method according to claim 2 or 3, wherein said sending the first image package by the first cloning application to the second cloning application of the second electronic device comprises:
and sequentially sending the at least one first fragment packet to the second clone application of the second electronic equipment through the first clone application according to the generation sequence of the first fragment packet.
5. A method according to any of claims 1-3, wherein the first attribute comprises a creation time, a shooting time, a modification time, a file name or a file size of the image at the first electronic device.
6. The method of any of claims 1-4, wherein the first shard package further comprises a target file, the target file comprising the first attribute and metadata information of the image in the first shard package.
7. The method of claim 6, wherein the object file is a DB file.
8. The method of claim 2, wherein the first value comprises a maximum value of the number of images in the first slice packet.
9. The method of claim 1, wherein the image comprises a picture and/or a video.
10. The method of claim 1, wherein the first cloning application and the second cloning application are the same.
11. The method of claim 1, wherein the first electronic device and the second electronic device are wirelessly connected.
12. A gallery cloning method, for use with a second electronic device, the method comprising:
receiving a first image package sent by a first electronic device through a second cloning application, wherein the first image package comprises at least one image and a first attribute of at least one image of a first gallery application of the first electronic device;
And displaying the at least one image in a second gallery application according to the first attribute.
13. The method of claim 12, wherein the displaying the at least one image in a second gallery application according to the first attribute comprises:
configuring a second attribute for the image in the first image package according to the first attribute, and generating a second image package;
and displaying the images in the image package in a second gallery application according to the second attribute.
14. The method of claim 13, wherein the first image packet comprises at least one first slice packet;
the receiving, by the second cloning application, the first image packet sent by the first electronic device includes:
and sequentially receiving the at least one first fragment packet through the second cloning application.
15. The method of claim 14, wherein the second image package comprises at least one second slice package;
the configuring a second attribute for the image in the first image packet according to the first attribute, and generating a second image packet includes:
and configuring the second attribute for the images in the first fragment packet according to the sequence of receiving the first fragment packet and the arrangement sequence of the first attribute by the images, and sequentially generating at least one second fragment packet.
16. The method of claim 15, wherein displaying the images in the image package in the second gallery application according to the second attribute comprises:
and sequentially displaying the images in the at least one second fragment packet in the second gallery application according to the generation sequence of the second fragment packet and the second attribute.
17. The method of claim 16, wherein the method further comprises:
and sequentially storing the images in the at least one second fragment packet to a second database according to the generation sequence of the second fragment packet.
18. The method of any of claims 12-17, wherein the first attribute comprises a creation time, a capture time, a modification time, a file name, or a file size of the image at the first electronic device.
19. The method of claim 18, wherein the second attribute corresponds to the first attribute.
20. The method of claim 14 or 15, wherein the first shard package further comprises a target file, the target file comprising the first attribute and metadata information of the image in the first shard package.
21. The method of claim 20, wherein the object file is a DB file.
22. The method of claim 12, wherein the image comprises a picture and/or a video.
23. The method of claim 12, wherein the first cloning application and the second cloning application are the same.
24. The method of claim 12, wherein the first electronic device and the second electronic device are wirelessly connected.
25. A gallery cloning system, characterized in that the system comprises a first electronic device according to any one of claims 1-11 and a second electronic device according to any one of claims 12-24.
26. An electronic device comprising a processor and a memory, wherein the memory is configured to store a computer program comprising program instructions that, when executed by the processor, cause the first electronic device to perform the method of any of claims 1-11 or any of claims 12-24.
27. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions, which when executed by a computer, cause the computer to perform the method of any one of claims 1-11 or any one of claims 12-24.
CN202211040549.4A 2022-08-29 2022-08-29 Drawing library cloning method, system and electronic equipment Pending CN117667506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211040549.4A CN117667506A (en) 2022-08-29 2022-08-29 Drawing library cloning method, system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211040549.4A CN117667506A (en) 2022-08-29 2022-08-29 Drawing library cloning method, system and electronic equipment

Publications (1)

Publication Number Publication Date
CN117667506A true CN117667506A (en) 2024-03-08

Family

ID=90073801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211040549.4A Pending CN117667506A (en) 2022-08-29 2022-08-29 Drawing library cloning method, system and electronic equipment

Country Status (1)

Country Link
CN (1) CN117667506A (en)

Similar Documents

Publication Publication Date Title
WO2020253719A1 (en) Screen recording method and electronic device
CN113885759B (en) Notification message processing method, device, system and computer readable storage medium
US11683850B2 (en) Bluetooth reconnection method and related apparatus
WO2021042978A1 (en) Theme switching method and theme switching apparatus
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
US20220353819A1 (en) Method for Reducing Power Consumption of Mobile Terminal and Mobile Terminal
CN113254409A (en) File sharing method, system and related equipment
CN112543447A (en) Device discovery method based on address list, audio and video communication method and electronic device
CN114079892A (en) Bluetooth communication method, wearable device and system
CN113973398A (en) Wireless network connection method, electronic equipment and chip system
CN115119048B (en) Video stream processing method and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment
CN116051351B (en) Special effect processing method and electronic equipment
CN116389884A (en) Thumbnail display method and terminal equipment
CN115686182B (en) Processing method of augmented reality video and electronic equipment
CN114691248B (en) Method, device, equipment and readable storage medium for displaying virtual reality interface
CN114630007B (en) Display synchronization method, electronic device and readable storage medium
CN117348894A (en) Software upgrading method, terminal equipment and system
CN117667506A (en) Drawing library cloning method, system and electronic equipment
CN116048629B (en) System service switching method, control device, electronic equipment and storage medium
CN116703689B (en) Method and device for generating shader program and electronic equipment
CN116662150B (en) Application starting time-consuming detection method and related device
WO2024093703A1 (en) Instance management method and apparatus, and electronic device and storage medium
CN116009960B (en) Target micro-service migration method, system and electronic equipment
CN114205318B (en) Head portrait display method 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