[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106502808A - A kind of method of copied files, device and terminal - Google Patents

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

Info

Publication number
CN106502808A
CN106502808A CN201610971473.5A CN201610971473A CN106502808A CN 106502808 A CN106502808 A CN 106502808A CN 201610971473 A CN201610971473 A CN 201610971473A CN 106502808 A CN106502808 A CN 106502808A
Authority
CN
China
Prior art keywords
terminal
copy
media library
file destination
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.)
Granted
Application number
CN201610971473.5A
Other languages
Chinese (zh)
Other versions
CN106502808B (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

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 of copied files, device and terminal, are related to communication technical field, wherein the method is used for first terminal, including:When the copy that the main thread in first terminal receives file destination is instructed, the copy progress of file destination is detected;If the main thread detects file destination, copy is completed, and sends the request for updating media library to the subject thread being pre-created, so that the subject thread is updated to the media library according to the request for updating media library;Wherein, the media library is used 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 improve the speed for copying multiple files, time-consuming.

Description

A kind of method of copied files, device and terminal
Technical field
The present invention relates to communication technical field, more particularly to a kind of method of copied files, device and terminal.
Background technology
With developing rapidly for mobile Internet, the application of terminal is more and more extensive.When carrying out file transmission between terminal When, generally using media transmission protocol (Media Transfer Protocol MTP) as main transmission mode.
When carrying out file transmission based on MTP between terminal, and when 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 Media library is updated after completing, and the result that copy is completed is fed back to second terminal, then controls next file by second terminal Copy.
But inventor is during the present invention is executed, it is found that prior art has following defect: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 Into after updating and feeding back the result that copy is completed, the copy of next file can be just carried out.According to the side that above-mentioned file is transmitted Method, if copied files are more, have a strong impact on the copying speed of file, loses time.
Content 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, Time-consuming.
In a first aspect, embodiments providing a kind of method of copied files, methods described is used for first terminal, bag Include:
When the copy that the main thread in first terminal receives file destination is instructed, detect that the copy of file destination enters 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 described update media library request the media library is updated;Wherein, described Media library is used 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 present invention additionally provide a kind of device of copied files, and described device configuration is whole first In end, including:
Detection module, during for instructing when the copy for receiving file destination, detects the copy progress of file destination;
Sending module, if completing for detecting the file destination copy, sends more to the subject thread being pre-created The request in new media storehouse;Wherein, the media library is used 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, embodiments provides a kind of terminal, and the terminal is integrated with provided in an embodiment of the present invention A kind of device of copied files.
Technical scheme provided in an embodiment of the present invention, completes when the main thread in first terminal detects file destination copy When, by sending the request for updating media library to the subject thread that is pre-created, so that subject thread updates media library, and to the The information that two terminal feedback file destinations copy is 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 being executed During copy targeting file, it is not necessary to wait media library to update and complete just to feed back the letter that copy is completed to second terminal afterwards Breath, to carry out the copy of next file destination, improves copying speed, saves user time.
Description of the drawings
By reading the detailed description made by non-limiting example that is made with reference to the following drawings, other of the invention Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of method flow diagram of copied files that the embodiment of the present invention one is provided;
Fig. 2 is a kind of method flow diagram of copied files that the embodiment of the present invention two is provided;
Fig. 3 is a kind of method flow diagram of copied files that the embodiment of the present invention three is provided;
Fig. 4 is a kind of apparatus structure block diagram of copied files that the embodiment of the present invention four is provided;
Fig. 5 is a kind of structural representation of terminal that the embodiment of the present invention five is provided.
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 that states is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just Part related to the present invention rather than full content is illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is a kind of method flow diagram of copied files that the embodiment of the present invention one is provided, and methods described is by copied files Device executing, described device is executed by software and/or hardware, and described device is configured in the terminals such as mobile phone.Such as Shown in Fig. 1, the technical scheme that the present embodiment is provided is specific as follows:
S110:When the copy that the main thread in first terminal receives file destination is instructed, 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 be controlled to first terminal System, makes the file destination in first terminal internal memory copy in storage card, or makes the file destination in first terminal storage card Copy is in internal memory.Wherein, second terminal is the terminals such as notebook computer, panel computer, computer.
In the present embodiment, after first terminal and second terminal connection, and when carrying out copy targeting file, second eventually Hold the instruction that copy targeting file is sent to first terminal, wherein, it can be user that second terminal sends the form of copy instruction Certain button managed in second terminal in first terminal application is clicked on, or can also be other forms.When in first terminal Main thread receive copy targeting file instruction when, detect file destination copy progress.
Illustrate, for example, when in first terminal be mobile phone, second terminal be notebook computer when, in notebook computer Install managing mobile phone application XXX, by apply XXX may browse through and managing mobile phone in file.When needing notebook When in the file A copy mobile phones of computer, click in the application XXX in notebook computer has and uploads to file A in mobile phone Function button, when user chooses the file A in notebook computer, notebook computer to mobile phone send copied files A finger Order.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 can be the copy progress for determining file A according to the size of the data of the file A for receiving, or can also be Other methods are detected to the copy progress of file A.
S120:If the main thread detects file destination, copy is completed, and is sent to the subject thread being pre-created and is updated The request of media library, so that the subject thread is updated to the media library according to the request for updating media library.
In the present embodiment, if the main thread in first terminal detects the copy progress of file destination when reaching 100%, Determine that file destination copy is completed.In the present embodiment, when first terminal detects file destination copy to be completed, to wound in advance The subject thread that builds sends the request for updating media library.Wherein, media library is used for entering the file stored in the first terminal Row management.Specifically, the file stored in first terminal can be classified by media library, 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 Storehouse can also carry out other management functions to the file stored in first terminal.
In the present embodiment, optionally, subject thread be used for caching at least one update media library request and according to The request for updating media library updates media library.When subject thread is sequentially received the request of multiple renewal media libraries, can To be stored the request, media library is updated according to the order of the request successively.Subject thread updates media library Can be specifically:Subject thread calls the interface of media library, by the related information record of the file destination or file destination of copy In media library, the renewal 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, for subject thread can also be other modes to the renewal of media library.
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, after main thread sends the request for updating media library to subject thread, send to second terminal The message that file destination copy is completed.After second terminal receives the message that file destination copy is completed, send to first terminal The copy instruction of next file destination, 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 that storehouse is updated, the operation of the information that can be completed to second terminal feedback target file copy with main thread is while hold OK, or can also execute after the operation of 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 is exemplary being said to the process of file copy using file destination Bright, but the present embodiment is only a kind of example, in other embodiments of the present invention, the copy method of destination folder and this reality The copy method for applying file destination in example is identical.
By above-mentioned method, when multiple files are copied, the main thread in first terminal sends to subject thread and updates 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 sends the copy instruction of next file destination, carry out copying next file destination.Cause This, main thread and subject thread have clarification in certain roles, make subject thread execute the operation for updating media library, update the behaviour of media library Make no longer to be executed by main thread;And main thread is during copy targeting file is executed, it is not necessary to wait media library to carry out Update just the information that copy is completed is fed back to second terminal after completing;The speed for copying multiple files is improve, when saving Between.
Technical scheme provided in an embodiment of the present invention, completes when the main thread in first terminal detects file destination copy When, by sending the request for updating media library to the subject thread that is pre-created, so that subject thread updates media library, and to the The information that two terminal feedback file destinations copy is 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 being executed During copy targeting file, it is not necessary to wait media library to update and complete just to feed back the letter that copy is completed to second terminal afterwards 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 that the embodiment of the present invention two is provided, 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, following operation is also executed:
When first terminal is detected to be connected based on media transmission protocol MTP foundation between second terminal, target is created Thread, the subject thread are used for caching at least one and update the request of media library and for according to the renewal media library Request updates media library.
Thus, by creating subject thread, media library can be entered successively according at least one request for updating media library Row updates, and reduces the workload of main thread in first terminal, makes the main thread in first terminal execute the next text of copy Part no longer needs to wait media to update the information for completing when operating, and improves the speed for copying multiple files.
As shown in Fig. 2 the technical scheme that the present embodiment is provided is specific as follows:
S210:When first terminal is detected to be connected based on media transmission protocol MTP foundation between second terminal, create Subject thread.
In the present embodiment, for the detection for setting up connection based on media transmission protocol MTP, can be had by first terminal The application for having detection linkage function is detected, or directly can also connect work(by first terminal operating system with detection The program of energy is detected, or can also have the mode of other detections, and detection mode is not defined.
In the present embodiment, the subject thread is used for the request of at least one renewal media library of caching and is used for basis The request updates media library.When a file destination copy is completed, subject thread receives the first of renewal media library please Ask, subject thread updates media library according to the first request.If next file destination is also copied completing, subject thread will be received The second request of media library is updated, now, if subject thread is had not been completed according to the operation of the first request more new media, Second request is cached.After subject thread is completed according to the operation that the first request updates media library, further according to caching Second request update media library.If the request of multiple renewal media libraries is cached with subject thread, update matchmaker according to receiving The time sequencing of body storehouse request updates media library successively.
S220:When the copy that the main thread in first terminal receives file destination is instructed, copying for file destination is detected Shellfish progress.
S230:If the main thread detects file destination, copy is completed, and is sent to the subject thread being pre-created and is updated The request of media library, so that the subject thread is updated to 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 that the present embodiment is provided, by creating subject thread, can be according to renewal media library At least one request media library is updated successively, reduce the workload of main thread in first terminal, make first terminal In main thread no longer need to wait media to update the information for completing when the operation of the next file of copy is executed, when saving Between, improve the speed for copying multiple files.
Embodiment three
Fig. 3 is a kind of method flow diagram of copied files that the embodiment of the present invention three is provided, on the basis of above-described embodiment On, if file destination copy is detected in the main thread completing, send more new media to the subject thread being pre-created After the request in storehouse, following operation is also executed:
Subject thread described in the main line process control is updated to the media library according to the request.
Thus, media library is updated by control targe thread, improves the efficiency of management to copied files, reduce The workload of main thread in first terminal.
Further, the media library is updated according to the request in subject thread described in the main line process control Afterwards, following operation is executed:
In the copy function of the main thread execution next one file destination in addition to being updated to the media library Operation.
Thus, executed 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, the technical scheme that the present embodiment is provided is specific as follows:
S310:When the copy that the main thread in first terminal receives file destination is instructed, copying for file destination is detected Shellfish progress.
S320:If the main thread detects file destination, copy is completed, and is sent to the subject thread being pre-created and is updated 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 to the media library according to the request.
In the present embodiment, optionally, subject thread described in the main line process control is asked to the media according to described Storehouse is updated, including:The interface that the subject thread calls the media library is controlled, and the association of the file destination is believed In media library, wherein, the related information of the file destination includes the routing information of file destination, file type letter to breath record 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 that states.
In the present embodiment, by the renewal to media library, when user opens media library, can browse through and copy first to The related information of the file destination in terminal, is managed to file destination by the related information of file destination.For example, media The routing information of file destination of the record copies in first terminal in storehouse, when user clicks on the routing information of file destination, Position of the file destination in first terminal can be linked to, be easy to user that file destination is carried out opening, changed or other Operation.
S350:Remove in the copy function of the main thread execution next one file destination and it is updated to the media library Outer operation.
In the present embodiment, remove in the copy function of the next file destination of main thread execution and it is updated to media library Outer operation includes:Receive the copy instruction of next file destination;The copy progress of the next file destination of detection;To advance The subject thread of establishment 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 Really divide the work, make the subject thread in first terminal execute the operation for completing to update media library, make the operation of renewal media library no longer Executed by main thread;And main thread is made when the operation of copy targeting file is executed, it is not necessary to wait media library to update and complete Information, directly carry out the copy function of next file destination;Speed when copying multiple files is improve, 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 Only it is a kind of example, in other embodiments of the present invention, S330 and S340 can also be executed simultaneously, but the time being finished Can be with difference.
It should be noted that S310-S350 is executed a kind of side of copied files as an example by the embodiment of the present invention Method, but the present embodiment is only a kind of example.In other embodiments of the present invention, S310-S350 can with embodiment two In S210 constitute example and execute a kind of method of copied files;Or S310-S340 constitutes an example and executes one kind The method of copied files.
A kind of method of copied files is embodiments provided, media library is carried out more by control targe thread Newly, the efficiency of management to copied files is improved, the workload of main thread in first terminal is reduced;Executed by main thread next Operation in the copy function of individual file destination in addition to being updated to media library, improves the copying speed of multiple files.
Example IV
Fig. 4 be the embodiment of the present invention four provide a kind of copied files apparatus structure block diagram, described device be used for execute A kind of method of copied files, described device are configured in first terminal.As shown in figure 4, described device 400 includes detection module 410th, sending module 420 and feedback module 430.
Wherein, detection module 410, during for instructing when the copy for receiving file destination, detect the copy of file destination Progress;
Sending module 420, if completing for detecting file destination copy, sends to the subject thread being pre-created and updates The request of media library, so that the subject thread is updated to the media library according to the request for updating media library;Its In, the media library is used for being managed the file stored in the first terminal;
Feedback module 430, for the information completed to second terminal feedback target file copy, so that second terminal sends The copy instruction of next file destination.
Further, described device also includes subject thread creation module 440, for receiving file destination described Copy instruct when, detect file destination copy progress before, when first terminal detect between second terminal be based on matchmaker When body host-host protocol MTP sets up connection, subject thread is created.
Further, the subject thread is used for the request of at least one renewal media library of caching and is used for according to described The request for updating media library updates media library.
Further, the subject thread is updated to the media library according to the request for updating media library, is wrapped Include
The subject thread calls the interface of the media library, and the related information of the file destination is recorded in media In storehouse, wherein, the related information of the file destination includes routing information, file type information and the timestamp of file destination Information.
A kind of device of copied files that the present embodiment is provided, copies when the detection module in main thread detects file destination When shellfish completes, the request for updating media library is sent by sending module to the subject thread being pre-created, so that subject thread is more New media storehouse, and the information completed to second terminal feedback target file copy by feedback module, so that second terminal sends The copy instruction 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 copy targeting file is executed, Without waiting for media library and update the information for completing just to complete to second terminal feedback copy afterwards, to carry out next target text The copy of part, improves copying speed, saves the time.
Embodiment five
The present invention implements to provide a kind of terminal, and the terminal is integrated with the device of the copied files of above-described embodiment offer, Fig. 5 is a kind of structural representation of terminal provided in an embodiment of the present invention, as shown in figure 5, the terminal can include:Memory 501st, central processing unit (Central Processing Unit, hereinafter referred to as CPU) 502, Peripheral Interface 503, RF (Radio Frequency, radio frequency) circuit 505, voicefrequency circuit 506, loudspeaker 511, power management chip 508, input/output (I/O) son System 509, touch-screen 512, other input/control devicess 510 and outside port 504, these parts are by one or more Communication bus or holding wire 507 are communicating.
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 part, two or more parts can be combined, or can have different portions Part is configured.Various parts shown in figure can be including including one or more signal transactings and/or special IC Hardware, software or hardware and software combination in realize.
The terminal for copied files for providing with regard to the present embodiment below is described in detail, and the terminal with mobile phone is Example.
Memory 501, the memory 501 can be accessed by CPU502, Peripheral Interface 503 etc., and the memory 501 can With include high-speed random access memory, can also include nonvolatile memory, for example one or more disk memories, Flush memory device or other volatile solid-state parts.
The input of equipment and output peripheral hardware can be connected to CPU502 and be deposited by Peripheral Interface 503, the Peripheral Interface 503 Reservoir 501.
I/O subsystems 509, the I/O subsystems 509 can be by the input/output peripherals on equipment, such as touch-screen 512 (screen in equivalent to above-described embodiment) and other input/control devicess 510, are connected to Peripheral Interface 503.I/O subsystems 509 can include display controller 5091 and the one or more input controllers for controlling other input/control devicess 510 5092.Wherein, one or more input controllers 5092 receive electric signal or to other from other input/control devicess 510 Input/control devices 510 sends electric signal, and other input/control devicess 510 can include physical button (pressing button, rocking arm Button etc.), dial, slide switch, control stick, click on roller.What deserves to be explained is, input controller 5092 can with following Any one connection:The instruction equipment of keyboard, infrared port, USB interface and such as mouse.
Touch-screen 512, the touch-screen 512 are the input interfaces and output interface between user terminal and user, can Depending on output display to user, visual output can include figure, text, icon, video etc..
Display controller 5091 in I/O subsystems 509 receives electric signal or to touch-screen 512 from touch-screen 512 Electric signals.The contact for detecting is converted to and display by the contact on the detection touch-screen of touch-screen 512, display controller 5091 The interaction of the user interface object on touch-screen 512, that is, realize man-machine interaction, shows the user interface on touch-screen 512 Object can be the icon of running game, be networked to icon of corresponding network etc..What deserves to be explained is, equipment can also include light Mouse, light mouse are not show the visual touch sensitive surface for exporting, or the extension of the touch sensitive surface formed by touch-screen.
RF circuits 505, are mainly used in the communication for setting up mobile phone and wireless network (i.e. network side), realize mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuits 505 are received and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 505 convert electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated with communication network and other equipment by the electromagnetic signal.RF circuits 505 can be included for executing The known circuit of these functions, its include but is not limited to antenna system, RF transceivers, one or more amplifiers, tuner, one Individual or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, ID mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 506, is mainly used in receiving voice data from Peripheral Interface 503, the voice data is converted to telecommunications Number, and the electric signal is sent to loudspeaker 511.
Loudspeaker 511, for the voice signal for receiving mobile phone by RF circuits 505 from wireless network, is reduced to sound 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 operations of CPU502 provided in an embodiment of the present invention:
When the copy that the main thread in first terminal receives file destination is instructed, detect that the copy of file destination enters 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 Ask, so that the subject thread is updated to the media library according to the request for updating media library;Wherein, the media Storehouse is used 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 sends The copy instruction of one file destination.
Above-mentioned terminal can perform the method provided by any embodiment of the present invention, possess the corresponding functional module of execution method And beneficial effect.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes, Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also Other Equivalent embodiments more can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (9)

1. a kind of method of copied files, it is characterised in that methods described is used for first terminal, including:
When the copy that the main thread in first terminal receives file destination is instructed, the copy progress of file destination is detected;
If the main thread detects the file destination copy and completes, send to the subject thread being pre-created and update media library Request so that the subject thread according to described update media library request the media library is updated;Wherein, described Media library is used 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 sends The copy instruction of one file destination.
2. method according to claim 1, it is characterised in that receive target in the main thread when in first terminal When the copy of file is instructed, before detecting the copy progress of file destination, also include:
When first terminal is detected to be connected based on media transmission protocol MTP foundation between second terminal, subject thread is created.
3. method according to claim 2, it is characterised in that the subject thread is used for caching at least one more new media The request in storehouse and for according to described update media library request update media library.
4. method according to claim 1, it is characterised in that the subject thread is according to the request for updating media library The media library is updated, including:
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 routing information, file type information and the time of the file destination Stamp information.
5. a kind of device of copied files, it is characterised in that described device is configured in first terminal, including:
Detection module, during for instructing when the copy for receiving file destination, detects the copy progress of file destination;
Sending module, if completing for detecting file destination copy, sends to the subject thread being pre-created and updates media library Request so that the subject thread according to described update media library request the media library is updated;Wherein, described Media library is used 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, it is characterised in that also include:Subject thread creation module, for working as described Receive file destination copy instruct when, detect file destination copy progress before, when first terminal is detected and second When connection is set up based on media transmission protocol MTP between terminal, create subject thread.
7. device according to claim 6, it is characterised in that the subject thread is used for caching at least one more new media The request in storehouse and for according to described update media library request update media library.
8. device according to claim 5, it is characterised in that the subject thread is according to the request for updating media library The media library is updated, including:
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 routing information, file type information and the time of the file destination Stamp information.
9. a kind of terminal, it is characterised in that the terminal is integrated with a kind of arbitrary described copied files of claim 5-8 Device.
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 true CN106502808A (en) 2017-03-15
CN106502808B 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)

Cited By (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
CN111522764A (en) * 2020-04-07 2020-08-11 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 (7)

* 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
CN103019839A (en) * 2012-11-15 2013-04-03 广东欧珀移动通信有限公司 Fast document display method, fast document display device and fast document display terminal
CN103577554A (en) * 2013-10-19 2014-02-12 广东欧珀移动通信有限公司 Method and device for triggering multimedia database scanning of Android equipment
CN103605568A (en) * 2013-10-29 2014-02-26 北京奇虎科技有限公司 Multithread management method and device
CN104298609A (en) * 2014-08-14 2015-01-21 浪潮(北京)电子信息产业有限公司 Data copying method and device
CN105550899A (en) * 2015-12-15 2016-05-04 烽火通信科技股份有限公司 Media distribution system and method for intelligent terminal

Patent Citations (7)

* 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
CN103019839A (en) * 2012-11-15 2013-04-03 广东欧珀移动通信有限公司 Fast document display method, fast document display device and fast document display terminal
CN103577554A (en) * 2013-10-19 2014-02-12 广东欧珀移动通信有限公司 Method and device for triggering multimedia database scanning of Android equipment
CN103605568A (en) * 2013-10-29 2014-02-26 北京奇虎科技有限公司 Multithread management method and device
CN104298609A (en) * 2014-08-14 2015-01-21 浪潮(北京)电子信息产业有限公司 Data copying method and device
CN105550899A (en) * 2015-12-15 2016-05-04 烽火通信科技股份有限公司 Media distribution system and method for intelligent terminal

Non-Patent Citations (2)

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

Cited By (7)

* 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
CN111522764A (en) * 2020-04-07 2020-08-11 Oppo(重庆)智能科技有限公司 Plug-in operation processing method, terminal 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

Also Published As

Publication number Publication date
CN106502808B (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN106502808A (en) A kind of method of copied files, device and terminal
CN115357178B (en) Control method applied to screen-throwing scene and related equipment
CN109324749B (en) Drawing method, drawing device, storage medium and electronic equipment
CN106708407A (en) Method and device for preventing mistaken triggering of touch key and mobile terminal
CN110248228A (en) A kind of method and terminal based on small routine control smart machine
CN107678823A (en) Control method, device and the storage medium and mobile terminal of mobile terminal application
CN106686557A (en) Broadcast processing method and device and terminal device
CN109428839B (en) CDN scheduling method, device and system
CN106528158A (en) Method and device for mounting memory card and mobile terminal
CN106776259B (en) Mobile terminal frame rate detection method and device and mobile terminal
CN104169854B (en) A kind of icon arrangement method and terminal
WO2017128986A1 (en) Selection method, device and storage medium for multimedia menu item
WO2019000669A1 (en) Operating-mode switching method and apparatus, mirror display device, and storage medium
CN110209557A (en) User's operation records restoring method, device, equipment and readable storage medium storing program for executing
WO2017211260A1 (en) Data access method and related device
CN113721936B (en) Application management method, intelligent terminal, device and storage medium
CN106686100A (en) Storage method and apparatus of registry information, and terminal
CN106954191A (en) Broadcast transmission method, device and terminal device
CN109107148A (en) control method, device, storage medium and mobile terminal
CN108549695A (en) Data interactive method, device, terminal device and storage medium
CN118466811A (en) Media file editing method and device, electronic equipment and storage medium
CN106331097A (en) Information receiving and sending method and device, information synchronization method and device, terminal and server
CN108563752B (en) Data interaction method and device, terminal equipment and storage medium
CN106936828A (en) A kind of broadcast recipients' queue regulation method, device and terminal
CN106789530A (en) A kind of method for connecting network, device and mobile terminal

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

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.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant