CN106502808B - A kind of method, apparatus and terminal of copied files - Google Patents

A kind of method, apparatus and terminal of copied files Download PDF

Info

Publication number
CN106502808B
CN106502808B CN201610971473.5A CN201610971473A CN106502808B CN 106502808 B CN106502808 B CN 106502808B CN 201610971473 A CN201610971473 A CN 201610971473A CN 106502808 B CN106502808 B CN 106502808B
Authority
CN
China
Prior art keywords
terminal
media library
file destination
copy
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610971473.5A
Other languages
Chinese (zh)
Other versions
CN106502808A (en
Inventor
王伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610971473.5A priority Critical patent/CN106502808B/en
Publication of CN106502808A publication Critical patent/CN106502808A/en
Application granted granted Critical
Publication of CN106502808B publication Critical patent/CN106502808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of method, apparatus of copied files and terminals, it is related to field of communication technology, wherein this method is used for first terminal, comprising: when the main thread in first terminal receives the copy instruction of file destination, detects the copy progress of file destination;If the main thread detects file destination, copy is completed, and the request for updating media library is sent to the subject thread being pre-created, so that the subject thread is updated the media library according to the request for updating media library;Wherein, the media library is for being managed the file stored in the first terminal;The information that the main thread is completed to second terminal feedback target file copy, so that the second terminal sends the copy instruction of next file destination.The embodiment of the present invention can be improved the speed for copying multiple files, save the time.

Description

A kind of method, apparatus and terminal of copied files
Technical field
The present invention relates to field of communication technology more particularly to the method, apparatus and terminal of a kind of copied files.
Background technique
With the rapid development of mobile Internet, terminal using more and more extensive.When progress file transmission between terminal When, it generallys use media transmission protocol (Media Transfer Protocol MTP) and is used as main transmission mode.
When carrying out file transmission when being based on MTP between terminal, and needing to transmit multiple files, first terminal is detected first After one file copy is completed, the request for updating media library is sent to main thread;Then main control line journey updates media library;When After media library updates completion, the result that copy is completed is fed back into second terminal, then next file is controlled by second terminal Copy.
But inventor, during executing the present invention, the discovery prior art has the following deficiencies: when file is transmitted across Cheng Zhong after the completion of each file copy, is required to send the request for updating media library to main thread, and only when media library is complete After updating and feeding back the result that copy is completed, the copy of next file just can be carried out.The side transmitted according to above-mentioned file Method seriously affects the copying speed of file, wastes time if copied files are more.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method of copied files, to improve the speed for copying multiple files, Save the time.
In a first aspect, the method is used for first terminal, packet the embodiment of the invention provides a kind of method of copied files It includes:
When the main thread in first terminal receives the copy instruction of file destination, detect the copy of file destination into Degree;
If the main thread detects file destination, copy is completed, and is sent to the subject thread being pre-created and is updated media library Request so that the subject thread according to it is described update media library request the media library is updated;Wherein, described Media library is for being managed the file stored in the first terminal;
The main thread feeds back the information that the file destination copy is completed to second terminal, so that the second terminal is sent out The copy of next file destination is sent to instruct.
Second aspect, the embodiment of the invention also provides a kind of device of copied files, described device configuration is whole first In end, comprising:
Detection module, for detecting the copy progress of file destination when the copy for receiving file destination instructs;
Sending module, if being sent more for detecting that the file destination copy is completed to the subject thread being pre-created The request in new media library;Wherein, the media library is for being managed the file stored in the first terminal;
Feedback module, for feeding back the information that the file destination copy is completed to second terminal, so that second terminal is sent out The copy of next file destination is sent to instruct.
The third aspect, the embodiment of the invention provides a kind of terminal, the terminal is integrated with provided in an embodiment of the present invention A kind of device of copied files.
Technical solution provided in an embodiment of the present invention, when the main thread in first terminal detects that file destination copy is completed When, the request of media library is updated by sending to the subject thread that is pre-created, so that subject thread updates media library, and to the The information that two terminal feedback target file copies are completed, so that second terminal sends the copy instruction of next file destination;When When needing to copy multiple files, main thread and subject thread in first terminal have clarification in certain roles, make the mesh in first terminal Graticule journey executes the operation for updating media library, and the operation for updating media library is no longer executed by main thread;And main thread is executing During copy targeting file, withouts waiting for media library and update the letter for completing just to complete later to second terminal feedback copy Breath, to carry out the copy of next file destination, improves copying speed, saves user time.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of method flow diagram for copied files that the embodiment of the present invention one provides;
Fig. 2 is a kind of method flow diagram of copied files provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of method flow diagram for copied files that the embodiment of the present invention three provides;
Fig. 4 is a kind of apparatus structure block diagram for copied files that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram for terminal that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just In description, only some but not all contents related to the present invention are shown in the drawings.
Embodiment one
Fig. 1 is a kind of method flow diagram for copied files that the embodiment of the present invention one provides, and the method is by copied files Device execute, described device is executed by software and/or hardware, and described device configures in the terminals such as mobile phone.Such as Shown in Fig. 1, technical solution provided in this embodiment is specific as follows:
S110: when the main thread in first terminal receives the copy instruction of file destination, copying for file destination is detected Shellfish progress.
In the present embodiment, optionally, first terminal is the terminals such as mobile phone.When first terminal and second terminal are attached When, the file destination in second terminal can be copied in first terminal.Second terminal can also control first terminal System, copies the file destination in first terminal memory in storage card to, or make the file destination in first terminal storage card Copy is in memory.Wherein, second terminal is the terminals such as laptop, tablet computer, computer.
In the present embodiment, after first terminal is connected with second terminal, and when progress copy targeting file, second eventually Hold the instruction that copy targeting file is sent to first terminal, wherein the form that second terminal sends copy instruction can be user Some button in second terminal in the application of management first terminal is clicked, or can also be other forms.When in first terminal Main thread when receiving the instruction of copy targeting file, detect the copy progress of file destination.
For example, for example, when in first terminal being mobile phone, when second terminal is laptop, in laptop Install managing mobile phone apply XXX, by using XXX may browse through and managing mobile phone in file.When needing notebook Click, which has, when in the file A copy mobile phone of computer, in the application XXX in laptop uploads to file A in mobile phone Function button, when user chooses the file A in laptop, laptop to mobile phone send copied files A finger It enables.When the main thread in mobile phone receives the instruction of copied files A, the copy progress of file A is detected.Wherein, for copy The detection of progress, which can be, determines the copy progress of file A according to the size of the data of the file A received, or can also be Other methods detect the copy progress of file A.
S120: if the main thread detects file destination, copy is completed, and is sent and is updated to the subject thread being pre-created The request of media library, so that the subject thread is updated the media library according to the request for updating media library.
In the present embodiment, if the main thread in first terminal detects that the copy progress of file destination reaches 100%, Determine that file destination copy is completed.In the present embodiment, when first terminal detects that file destination copy is completed, to preparatory wound The subject thread built sends the request for updating media library.Wherein, media library be used for the file stored in the first terminal into Row management.Specifically, media library can classify the file stored in first terminal, it can be with the file of record storage Related information, wherein related information includes store path information, timestamp information and the file type information of file, media Library can also carry out other management functions to the file stored in first terminal.
In the present embodiment, optionally, subject thread be used for cache at least one update media library request and according to The request for updating media library updates media library.It, can when subject thread is sequentially received multiple requests for updating media library To store the request, media library successively is updated according to the sequence of the request.Subject thread updates media library It specifically may is that subject thread calls the interface of media library, the related information of the file destination of copy or file destination recorded In media library, the update to media library is completed.The related information of file destination includes the routing information of the file destination, text Part type information and timestamp information.Wherein, other modes can also be to the update of media library for subject thread.
S130: the information that the main thread is completed to second terminal feedback target file copy, so that the second terminal Send the copy instruction of next file destination.
In the present embodiment, it after main thread sends the request for updating media library to subject thread, is sent to second terminal The message that file destination copy is completed.After second terminal receives the message that file destination copy is completed, sent to first terminal The copy of next file destination instructs, to copy to next file destination.
It should be noted that in the present embodiment, subject thread is according to the request for updating media library to the media The operation of the operation that library is updated, the information that can be completed with main thread to second terminal feedback target file copy is held simultaneously Row, or can also be executed after the operation for the information that main thread is completed to second terminal feedback target file copy.
It should be noted that the embodiment of the present invention illustratively uses file destination to say the process of file copy It is bright, but the present embodiment is only a kind of example, in other embodiments of the present invention, the copy method and this reality of destination folder It is identical for applying the copy method of file destination in example.
By above-mentioned method, when copying multiple files, the main thread in first terminal is sent to subject thread to be updated The request of media library, so that subject thread updates media library, and main thread is completed to second terminal feedback copy targeting file Message so that second terminal send next file destination copy instruction, to carry out copying next file destination.Cause This, main thread and subject thread have clarification in certain roles, so that subject thread is executed the operation for updating media library, update the behaviour of media library Work is no longer executed by main thread;And main thread withouts waiting for media library progress during executing copy targeting file It updates and just feeds back the information that copy is completed to second terminal after completing;The speed for copying multiple files is improved, when saving Between.
Technical solution provided in an embodiment of the present invention, when the main thread in first terminal detects that file destination copy is completed When, the request of media library is updated by sending to the subject thread that is pre-created, so that subject thread updates media library, and to the The information that two terminal feedback target file copies are completed, so that second terminal sends the copy instruction of next file destination.When When needing to copy multiple files, main thread and subject thread in first terminal have clarification in certain roles, make the mesh in first terminal Graticule journey executes the operation for updating media library, and the operation for updating media library is no longer executed by main thread;And main thread is executing During copy targeting file, withouts waiting for media library and update the letter for completing just to complete later to second terminal feedback copy Breath, to carry out the copy of next file destination, improves copying speed, saves the time of copied files.
Embodiment two
Fig. 2 is a kind of method flow diagram of copied files provided by Embodiment 2 of the present invention, in the base of above-described embodiment one On plinth, when the main thread when in first terminal receives the copy instruction of file destination, the copy of file destination is detected Before progress, also perform the following operations:
When first terminal, which is detected, establishes connection based on media transmission protocol MTP between second terminal, target is created Thread, the subject thread are used to cache the request that at least one updates media library and for according to the update media libraries Request updates media library.
As a result, by creation subject thread, can according to update media library at least one request to media library successively into Row updates, and reduces the workload of main thread in first terminal, and the main thread in first terminal is made to execute the next text of copy Part no longer needs that media is waited to update the information completed when operating, and improves the speed for copying multiple files.
As shown in Fig. 2, technical solution provided in this embodiment is specific as follows:
S210: when first terminal, which is detected, establishes connection based on media transmission protocol MTP between second terminal, creation Subject thread.
It in the present embodiment, can be by having in first terminal for establishing the detection of connection based on media transmission protocol MTP There is the application of detection linkage function to be detected, or can also be directly by having detection connection function in first terminal operating system The program of energy is detected, or the mode that can also have other to detect, and is not defined to detection mode.
In the present embodiment, the subject thread is used to cache the request and be used for basis that at least one updates media library The request updates media library.When file destination copy is completed, subject thread, which receives, to be updated the first of media library and asks It asks, subject thread updates media library according to the first request.If next file destination also copies completion, subject thread will be received The second request of media library is updated, at this point, if subject thread has not been completed according to the operation of the first request more new media, Second request is cached.When subject thread is completed and then according to the operation that the first request updates media library according to caching Second request update media library.If be cached with multiple requests for updating media library in subject thread, matchmaker is updated according to receiving The time sequencing of body library request successively updates media library.
S220: when the main thread in first terminal receives the copy instruction of file destination, copying for file destination is detected Shellfish progress.
S230: if the main thread detects file destination, copy is completed, and is sent and is updated to the subject thread being pre-created The request of media library, so that the subject thread is updated the media library according to the request for updating media library.
S240: the information that the main thread is completed to second terminal feedback target file copy, so that the second terminal Send the copy instruction of next file destination.
A kind of method of copied files provided in this embodiment can be according to update media library by creating subject thread At least one request media library is successively updated, reduce the workload of main thread in first terminal, make first terminal In main thread no longer need that media is waited to update the information completed when the operation for copying next file executing, when saving Between, improve the speed for copying multiple files.
Embodiment three
Fig. 3 is a kind of method flow diagram for copied files that the embodiment of the present invention three provides, on the basis of above-described embodiment On, if detecting that file destination copy is completed in the main thread, more new media is sent to the subject thread being pre-created After the request in library, also perform the following operations:
Subject thread described in the main line process control is updated the media library according to the request.
Media library is updated by controlling subject thread as a result, the efficiency of management to copied files is improved, reduces The workload of main thread in first terminal.
Further, the subject thread described in the main line process control is updated the media library according to the request Later, following operation is executed:
The main thread executes in the copy function of next file destination in addition to being updated to the media library Operation.
It is executed as a result, by main thread in the copy function of next file destination in addition to being updated to media library Operation, improves the copying speed of multiple files.
As shown in figure 3, technical solution provided in this embodiment is specific as follows:
S310: when the main thread in first terminal receives the copy instruction of file destination, copying for file destination is detected Shellfish progress.
S320: if the main thread detects file destination, copy is completed, and is sent and is updated to the subject thread being pre-created The request of media library.
S330: the information that the main thread is completed to second terminal feedback target file copy, so that the second terminal Send the copy instruction of next file destination.
S340: subject thread described in the main line process control is updated the media library according to the request.
In the present embodiment, optionally, subject thread described in the main line process control is according to the request to the media Library is updated, comprising: controls the interface that the subject thread calls the media library, and the association of the file destination is believed Breath is recorded in media library, wherein the related information of the file destination includes the routing information of file destination, file type letter Breath and timestamp information.The related information of file destination can also include the other information of file destination, it is not limited on The information stated.
In the present embodiment, it can browse through when user opens media library by the update to media library and copy first to The related information of file destination in terminal is managed file destination by the related information of file destination.For example, media The routing information of file destination in library in record copies to first terminal, when the user clicks when the routing information of file destination, Position of the file destination in first terminal can be linked to, file destination is opened convenient for user, modify or other Operation.
S350: the main thread, which executes to remove in the copy function of next file destination, is updated it to the media library Outer operation.
In the present embodiment, main thread, which executes to remove in the copy function of next file destination, is updated it to media library Outer operation includes: to receive the copy instruction of next file destination;Detect the copy progress of next file destination;To preparatory The subject thread of creation sends the request for updating media library;And the letter that next file destination is completed is sent to second terminal Breath.And main thread execute operation can also be in addition to being updated to media library other operation, and other operation and The process of copy targeting file is related.
By above-mentioned method, during copied files, carried out by main control line journey respectively and subject thread bright The true division of labor makes the subject thread in first terminal execute the operation for completing to update media library, makes the operation of update media library no longer It is executed by main thread;And makes main thread when executing the operation of copy targeting file, without waiting for media library and update completion Information, directly carry out the copy function of next file destination;Speed when copying multiple files is improved, when saving Between.
It should be noted that exemplary S340 is placed on after S330 of the embodiment of the present invention executes, but the present embodiment is only It is only a kind of example, in other embodiments of the present invention, S330 and S340 may also be performed simultaneously, but the time being finished It can be different.
It should be noted that S310-S350 is executed a kind of side of copied files by the embodiment of the present invention as an example Method, but the present embodiment is only a kind of example.In other embodiments of the present invention, S310-S350 can also be with embodiment two In S210 form an example a kind of execute copied files method;Or S310-S340 forms an example and executes one kind The method of copied files.
The embodiment of the invention provides a kind of methods of copied files, are carried out more by control subject thread to media library Newly, the efficiency of management to copied files is improved, the workload of main thread in first terminal is reduced;It is executed by main thread next Operation in the copy function of a file destination in addition to being updated to media library improves the copying speed of multiple files.
Example IV
Fig. 4 is a kind of apparatus structure block diagram for copied files that the embodiment of the present invention four provides, and described device is for executing A kind of method of copied files, described device configure in first terminal.As shown in figure 4, described device 400 includes detection module 410, sending module 420 and feedback module 430.
Wherein, detection module 410, for detecting the copy of file destination when the copy for receiving file destination instructs Progress;
Sending module 420, if sending and updating to the subject thread being pre-created for detecting that file destination copy is completed The request of media library, so that the subject thread is updated the media library according to the request for updating media library;Its In, the media library is for being managed the file stored in the first terminal;
Feedback module 430, the information for being completed to second terminal feedback target file copy, so that second terminal is sent The copy of next file destination instructs.
Further, described device further includes subject thread creation module 440, for that ought receive file destination described Copy instruction when, before the copy progress for detecting file destination, when first terminal detects between second terminal based on matchmaker When body transport protocol MTP establishes connection, subject thread is created.
Further, the subject thread is used to cache the request and be used for according to that at least one updates media library The request for updating media library updates media library.
Further, the subject thread is updated the media library according to the request for updating media library, wraps It includes
The subject thread calls the interface of the media library, and the related information of the file destination is recorded in media In library, wherein the related information of the file destination includes the routing information of file destination, file type information and timestamp Information.
The device of a kind of copied files provided in this embodiment, when the detection module in main thread detects that file destination is copied When shellfish is completed, the request for updating media library is sent to the subject thread being pre-created by sending module, so that subject thread is more New media library, and the information completed by feedback module to second terminal feedback target file copy, so that second terminal is sent The instruction of the copy of next file destination or next file destination.When needing to copy multiple files, update subject thread Media library, the operation for updating media library are no longer executed by main thread, and main thread is during executing copy targeting file, It withouts waiting for media library and updates the information for completing just to complete later to second terminal feedback copy, to carry out next target text The copy of part, improves copying speed, saves the time.
Embodiment five
Present invention implementation provides a kind of terminal, which is integrated with the device of copied files provided by the above embodiment, Fig. 5 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention, as shown in figure 5, the terminal may include: memory 501,502, Peripheral Interface 503, RF (Radio central processing unit (Central Processing Unit, hereinafter referred to as CPU) Frequency, radio frequency) circuit 505, voicefrequency circuit 506, loudspeaker 511, power management chip 508, input/output (I/O) System 509, touch screen 512, other input/control devicess 510 and outside port 504, these components pass through one or more Communication bus or signal wire 507 communicate.
It should be understood that graphic terminal 500 is only an example of terminal, and terminal 500 can have than figure Shown in more or less component, two or more components can be combined, or can have different portions Part configuration.Various parts shown in the drawings can be including one or more signal processings and/or specific integrated circuit Hardware, software or hardware and software combination in realize.
Just the terminal provided in this embodiment for copied files is described in detail below, which is with mobile phone Example.
Memory 501, the memory 501 can be accessed by CPU502, Peripheral Interface 503 etc., and the memory 501 can It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU502 and deposited by Peripheral Interface 503, the Peripheral Interface 503 Reservoir 501.
I/O subsystem 509, the I/O subsystem 509 can be by the input/output peripherals in equipment, such as touch screen 512 (being equivalent to the screen in above-described embodiment) and other input/control devicess 510, are connected to Peripheral Interface 503.I/O subsystem 509 may include display controller 5091 and one or more input controllers for controlling other input/control devicess 510 5092.Wherein, one or more input controllers 5092 from other input/control devicess 510 receive electric signal or to other Input/control devices 510 sends electric signal, other input/control devicess 510 may include physical button (push button, rocker arm Button etc.), dial, slide switch, control stick, click idler wheel.It is worth noting that input controller 5092 can with it is following Any one connection: the indicating equipment of keyboard, infrared port, USB interface and such as mouse.
Touch screen 512, the touch screen 512 are the input interface and output interface between user terminal and user, can It is shown to user depending on output, visual output may include figure, text, icon, video etc..
Display controller 5091 in I/O subsystem 509 receives electric signal from touch screen 512 or sends out to touch screen 512 Electric signals.Touch screen 512 detects the contact on touch screen, and the contact that display controller 5091 will test is converted to and is shown The interaction of user interface object on touch screen 512, i.e. realization human-computer interaction, the user interface being shown on touch screen 512 Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 505 is mainly used for establishing the communication of mobile phone Yu wireless network (i.e. network side), realizes mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuit 505 receives and sends RF letter Number, RF signal is also referred to as electromagnetic signal, and RF circuit 505 converts electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuit 505 may include for executing The known circuit of these functions comprising but it is not limited to antenna system, RF transceiver, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 506 is mainly used for receiving audio data from Peripheral Interface 503, which is converted to telecommunications Number, and the electric signal is sent to loudspeaker 511.
Loudspeaker 511 is reduced to sound for mobile phone to be passed through RF circuit 505 from the received voice signal of wireless network And the sound is played to user.
Power management chip 508, the hardware for being connected by CPU502, I/O subsystem 509 and Peripheral Interface are supplied Electricity and power management.
The executable following operation of CPU502 provided in an embodiment of the present invention:
When the main thread in first terminal receives the copy instruction of file destination, detect the copy of file destination into Degree;
If main thread detects file destination, copy is completed, and is sent to the subject thread being pre-created and is updated asking for media library It asks, so that the subject thread is updated the media library according to the request for updating media library;Wherein, the media Library is for being managed the file stored in first terminal;
The information that the main thread is completed to second terminal feedback target file copy, so that under the second terminal is sent The copy instruction of one file destination.
Method provided by any embodiment of the invention can be performed in above-mentioned terminal, has the corresponding functional module of execution method And beneficial effect.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (9)

1. a kind of method of copied files, which is characterized in that the method is used for first terminal, the method application first terminal In the scene for transmitting multiple files based on media transmission protocol MTP with second terminal, which comprises
When the main thread in first terminal receives the copy instruction of file destination, the copy progress of file destination is detected;
If the main thread detects that the file destination copy is completed, is sent to the subject thread being pre-created and update media library Request so that the subject thread according to it is described update media library request the media library is updated;Wherein, described Media library is for being managed the file stored in the first terminal;
The main thread feeds back the information that the file destination copy is completed to second terminal, so that under the second terminal is sent The copy instruction of one file destination.
2. the method according to claim 1, wherein receiving target in the main thread when in first terminal When the copy instruction of file, before the copy progress for detecting file destination, further includes:
When first terminal, which is detected, establishes connection based on media transmission protocol MTP between second terminal, subject thread is created.
3. according to the method described in claim 2, it is characterized in that, the subject thread is for caching at least one more new media The request in library and for according to it is described update media library request update media library.
4. the method according to claim 1, wherein the subject thread is according to the request for updating media library The media library is updated, comprising:
The subject thread calls the interface of the media library, and the related information of the file destination is recorded in media library In, wherein the related information of the file destination includes the routing information, file type information and time of the file destination Stab information.
5. a kind of device of copied files, which is characterized in that described device configures in first terminal, and described device applies first Terminal and second terminal are transmitted based on media transmission protocol MTP in the scene of multiple files, and described device includes:
Detection module, for detecting the copy progress of file destination when the copy for receiving file destination instructs;
Sending module, if being sent to the subject thread being pre-created for detecting that file destination copy is completed and updating media library Request so that the subject thread according to it is described update media library request the media library is updated;Wherein, described Media library is for being managed the file stored in the first terminal;
Feedback module, for feeding back the information that the file destination copy is completed to second terminal, so that the second terminal is sent out The copy of next file destination is sent to instruct.
6. device according to claim 5, which is characterized in that further include: subject thread creation module, for working as described When receiving the copy instruction of file destination, before the copy progress for detecting file destination, when first terminal detects and second When establishing connection based on media transmission protocol MTP between terminal, subject thread is created.
7. device according to claim 6, which is characterized in that the subject thread is for caching at least one more new media The request in library and for according to it is described update media library request update media library.
8. device according to claim 5, which is characterized in that the subject thread is according to the request for updating media library The media library is updated, comprising:
The subject thread calls the interface of the media library, and the related information of the file destination is recorded in media library In, wherein the related information of the file destination includes the routing information, file type information and time of the file destination Stab information.
9. a kind of terminal, which is characterized in that the terminal is integrated with a kind of dress of any copied files of claim 5-8 It sets.
CN201610971473.5A 2016-10-28 2016-10-28 A kind of method, apparatus and terminal of copied files Active CN106502808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610971473.5A CN106502808B (en) 2016-10-28 2016-10-28 A kind of method, apparatus and terminal of copied files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610971473.5A CN106502808B (en) 2016-10-28 2016-10-28 A kind of method, apparatus and terminal of copied files

Publications (2)

Publication Number Publication Date
CN106502808A CN106502808A (en) 2017-03-15
CN106502808B true CN106502808B (en) 2019-10-15

Family

ID=58323119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610971473.5A Active CN106502808B (en) 2016-10-28 2016-10-28 A kind of method, apparatus and terminal of copied files

Country Status (1)

Country Link
CN (1) CN106502808B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168855A (en) * 2017-03-24 2017-09-15 广东小天才科技有限公司 File copy monitoring method and device
CN107247735A (en) * 2017-05-08 2017-10-13 北京小米移动软件有限公司 Document transmission method and device
CN107436952A (en) * 2017-08-15 2017-12-05 郑州云海信息技术有限公司 A kind of document copying method and device based on distributed memory system
CN109617883A (en) * 2018-12-20 2019-04-12 努比亚技术有限公司 A kind of mobile terminal and its with computer shared file method, apparatus and storage medium
CN111522764B (en) * 2020-04-07 2023-02-28 Oppo(重庆)智能科技有限公司 Plug-in operation processing method, terminal and storage medium
CN112631796A (en) * 2020-12-17 2021-04-09 海信视像科技股份有限公司 Display device and file copying progress display method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957854A (en) * 2010-09-26 2011-01-26 宇龙计算机通信科技(深圳)有限公司 Data storage method of media files and mobile terminal
CN102289484A (en) * 2011-08-03 2011-12-21 Tcl集团股份有限公司 Method for scanning multimedia files of storage equipment based on android system
CN103577554A (en) * 2013-10-19 2014-02-12 广东欧珀移动通信有限公司 Method and device for triggering multimedia database scanning of Android equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019839B (en) * 2012-11-15 2015-10-28 广东欧珀移动通信有限公司 A kind of file fast display method, device and terminal
CN103605568B (en) * 2013-10-29 2017-10-31 北京奇虎科技有限公司 A kind of Multithread management method and device
CN104298609B (en) * 2014-08-14 2017-11-10 浪潮(北京)电子信息产业有限公司 Data copying method and device
CN105550899B (en) * 2015-12-15 2019-06-07 烽火通信科技股份有限公司 Media delivery service and method on intelligent terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957854A (en) * 2010-09-26 2011-01-26 宇龙计算机通信科技(深圳)有限公司 Data storage method of media files and mobile terminal
CN102289484A (en) * 2011-08-03 2011-12-21 Tcl集团股份有限公司 Method for scanning multimedia files of storage equipment based on android system
CN103577554A (en) * 2013-10-19 2014-02-12 广东欧珀移动通信有限公司 Method and device for triggering multimedia database scanning of Android equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Android中,SD卡上的媒体文件(图片、视频)的改变与通知 CSDN博客 https://blog.csdn.net/a345017062/article/details/6321403;农场老马;《Android中,SD卡上的媒体文件(图片、视频)的改变与通知》;20110413;正文第1页 *
初步理解android的MediaScanner(1) CSDN博客 https://blog.csdn.net/hellofeiya/article/details/8255898;hellofeiya;《初步理解android的MediaScanner(1)》;20121204;正文第1页 *

Also Published As

Publication number Publication date
CN106502808A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN106502808B (en) A kind of method, apparatus and terminal of copied files
CN110582017B (en) Video playing method, device, terminal and storage medium
RU2660948C2 (en) Message revoking method and apparatus thereof
WO2017202348A1 (en) Video playing method and device, and computer storage medium
CN106776385B (en) A kind of transmission method, device and the terminal of log log information
CN106686557B (en) Broadcast processing method, device and terminal device
WO2015014144A1 (en) Method and apparatus for installing application, and terminal device
WO2014206138A1 (en) Webpage data update method, apparatus and terminal device
CN113037929A (en) Information relay output method and device, electronic equipment and storage medium
WO2022100198A1 (en) Data transmission method and apparatus, storage medium, terminal, and network access point device
WO2018161788A1 (en) Multimedia data sharing method and device
CN112003978A (en) Conference management interface display method and device, storage medium and terminal equipment
CN111399874A (en) System upgrading method and device, storage medium and intelligent wearable device
CN111262737B (en) Port configuration management method and device, storage medium and terminal
CN110225106B (en) Data transmission method, device and storage medium
US20140267161A1 (en) User interface apparatus and method in user terminal with a capacitive touch input scheme
CN111935255A (en) Information processing method, device and storage medium
CN106919460A (en) A kind of method for controlling broadcast transmission, device and mobile terminal
CN105282628B (en) A kind of method and apparatus of video playing
CN107463524A (en) A kind of method and relevant device for accessing data
CN107798008B (en) Content pushing system, method and device
CN108549695A (en) Data interactive method, device, terminal device and storage medium
CN108563752B (en) Data interaction method and device, terminal equipment and storage medium
CN112492554A (en) Data transmission method, device, storage medium and terminal
CN106294553B (en) Data information is sent and big envelope information display method, device, speaker and terminal speaker

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant