CN105356989A - MTP mode-based data synchronization method, system and device - Google Patents

MTP mode-based data synchronization method, system and device Download PDF

Info

Publication number
CN105356989A
CN105356989A CN201410406663.3A CN201410406663A CN105356989A CN 105356989 A CN105356989 A CN 105356989A CN 201410406663 A CN201410406663 A CN 201410406663A CN 105356989 A CN105356989 A CN 105356989A
Authority
CN
China
Prior art keywords
data
equipment
operation information
update operation
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.)
Pending
Application number
CN201410406663.3A
Other languages
Chinese (zh)
Inventor
胡专门
朱少杰
周佳
杜国楹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Eren Eben Information Technology Co Ltd
Original Assignee
Beijing Eren Eben Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Eren Eben Information Technology Co Ltd filed Critical Beijing Eren Eben Information Technology Co Ltd
Priority to CN201410406663.3A priority Critical patent/CN105356989A/en
Publication of CN105356989A publication Critical patent/CN105356989A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a MTP mode-based data synchronization method, system and device which can be applied to systems of a master device and a slave device which are connected by an MTP. The method includes the steps that: an event report source for monitoring that data in the slave device executes a data upgrade operation is set in a system kernel of the slave device; a daemon for responding to the event report source is set in an application layer of the slave device; the event report source sends data upgrade operation information to the daemon after monitoring that the data in the slave device executes the data upgrade operation; the daemon sends the data upgrade operation information to the MTP after receiving the data upgrade operation information; the MTP sends the data upgrade operation information to the master device after receiving the data upgrade operation information; and the master device synchronously upgrades data according to the data upgrade operation information. Data synchronous update of the master device and the slave device can be achieved, and data synchronization is timely and fast.

Description

A kind of method of data synchronization based on MTP pattern, system and equipment
Technical field
The present invention relates to data processing field, more particularly, relate to a kind of method of data synchronization based on MTP pattern, system and equipment.
Background technology
Media transmission protocol (MediaTransferProtocol, MTP) is the Extended Protocol based on picture transfer protocol (PictureTransferProtocol, PTP), is mainly used in transmission medium file.
The existing equipment based on the interconnection of MTP pattern, be divided into main equipment (PC) and from equipment (embedded device such as panel computer, smart mobile phone, digital camera), user can delete on the master, revise, increase from the file in equipment, also can modify to the file of himself from equipment.And at present, deleting the file in it from equipment, amendment, when increase waits and revises, main equipment can not show amended file from equipment in real time, such as: when the A file in panel computer or smart mobile phone being deleted on panel computer or smart mobile phone, the data that PC shows can not synchronized update, namely simultaneous display PC can not delete A file, under A file is still presented at the catalogue of PC, so need panel computer or smart mobile phone cold start-up again, could show after PC re-starts digital independent and delete A file, this Method compare is loaded down with trivial details, and due to PC can not simultaneous display, use to user and bring a lot of inconvenience.
In order to the master and slave device data realized based on the interconnection of MTP pattern is synchronous, also have by realizing main equipment from each APK (AndroidPackage) in equipment to the mode that MTP report data upgrades and from data syn-chronization between equipment, but this kind of data syn-chronization mode efficiency is lower, be difficult to the real-time ensureing data syn-chronization.
Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, provides a kind of method of data synchronization based on MTP pattern, system and equipment.
The technical solution adopted for the present invention to solve the technical problems is: provide a kind of method of data synchronization based on MTP pattern, and be applied in the system of the master and slave equipment connected by MTP, it is characterized in that, described method comprises:
Arranging one to perform data renewal rewards theory event report source for monitoring in equipment data from the system kernel of equipment; One is being arranged for responding the demons in this event report source from device systems application layer;
Described Data Update operation information, after listening in equipment data and performing data renewal rewards theory, is sent to described demons by described event report source; This Data Update operation information is sent to described MTP by described demons after receiving this Data Update operation information; This Data Update operation information is sent to main equipment by described MTP after receiving this Data Update operation information; Main equipment is according to these Data Update operation information synchronized update data.
Further, described MTP comprises an index data base, described MTP is after receiving this Data Update operation information, upgrade index data base the index data base after this renewal is sent to main equipment according to this Data Update operation information, main equipment receives and according to the index data base synchronized update data after this renewal.
Further, described index data base at least comprises title and the address of each file in equipment.
Further, described index data base at least comprises title and the address of the file of Data Update in equipment.
Further, user when revising the data from the file equipment from equipment, main equipment forbids that user revises the data of this file on the master simultaneously.
Further, described user when revising these data from the file equipment from equipment, main equipment forbids that user revises the data of this file on the master simultaneously, specifically comprise: listening to user when revising the data from the file equipment from equipment, from equipment, the value of the semaphore arranged for this file is in advance set to read-only, and this semaphore is sent to main equipment by MTP; When listening to user and revising the data of described file on the master, main equipment, after the up-to-date value of the semaphore determining this file is read-only, forbids the data writing user's amendment.
Further, determine at main equipment the up-to-date value of the semaphore of this file be read-only after, comprise further: main equipment sends this file from the information that equipment is modified, this file can not be revised at main equipment to point out user simultaneously.
For solving the problems of the technologies described above, the present invention also provides a kind of data synchronous system based on MTP pattern, and described system comprises main equipment, from equipment and connect main equipment and the MTP module from equipment;
Comprise time reports unit from equipment, guard unit;
Event report unit, for monitoring system Data Update operation, listen in system occur Data Update operation time, Data Update operation information is sent to and guards unit;
Guard unit, for response events reporting unit, after the Data Update operation information receiving the transmission of event report unit, Data Update operation information is sent to MTP module;
MTP module, for receiving the Data Update operation information guarded unit and send, and is sent to main equipment by this Data Update operation information.
Main equipment, for receiving this Data Update operation information and carrying out Data Update according to the Data Update operation information that receives, with to make in main equipment data with from data synchronization updating in equipment.
For solving the problems of the technologies described above, the present invention also provide a kind of based on MTP pattern connect from equipment, comprise from equipment:
Event report unit, for monitoring system Data Update operation, listen in system occur Data Update operation time, Data Update operation information is sent to and guards unit;
Guard unit, for response events reporting unit, after the Data Update operation information receiving the transmission of event report unit, Data Update operation information is sent to MTP module;
For solving the problems of the technologies described above, the present invention also provides a kind of main equipment connected based on MTP pattern, and main equipment comprises:
Receiving element: for receiving the Data Update operation information that MTP sends, and Data Update operation information is sent to updating block;
Updating block: for performing renewal rewards theory according to the Data Update operation information that receives, to make main equipment and synchronous from device data.
The invention has the beneficial effects as follows: arranging one to perform data renewal rewards theory event report source for monitoring in equipment data from the system kernel of equipment, the demons for responding this event report source are being arranged at from device systems application layer, event report source is listening to after device data renewal rewards theory, Data Update operation information is sent to demons, this Data Update operation information is sent to MTP by demons after receiving this Data Update operation information, and MTP notifies main equipment synchronized update data after receiving this Data Update operation information.By arranging event report source and come the renewal rewards theory of monitoring system data from device core, and by renewal rewards theory by demons and MTP fast report main equipment, thus realize main equipment and the data synchronization updating from equipment, and data syn-chronization is quick in time.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the flow chart of the first embodiment of the method for data synchronization that the present invention is based on MTP pattern;
Fig. 2 is the flow chart of the second embodiment of the method for data synchronization that the present invention is based on MTP pattern;
Fig. 3 is the structural representation of the first embodiment of the data synchronous system that the present invention is based on MTP pattern
Fig. 4 is the structural representation that the present invention is based on the first embodiment from equipment that MTP pattern connects;
Fig. 5 is the structural representation of the first embodiment that the present invention is based on the main equipment that MTP pattern connects.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
For the purpose of quoting and know, the explanation of technical term hereinafter, write a Chinese character in simplified form or abridge and be summarized as follows:
MTP:MediaTransferProtocol, media transmission protocol;
PTP:PictureTransferProtocol, picture transfer protocol;
APK:AndroidPackage, Android installation kit;
IP:InternetProtocol, interconnection agreement between network;
USB:UniversalSerialBus, USB;
PC: personalcomputer, personal computer.
Refer to Fig. 1, for the present invention is based on the flow chart of the first embodiment of the method for data synchronization of MTP pattern, the invention provides a kind of method of data synchronization based on MTP pattern, be applied to the main equipment that connected by MTP and from the system of equipment, the method comprises:
Arranging one to perform data renewal rewards theory event report source for monitoring in equipment data from the system kernel of equipment; The demons for responding this event report source are being arranged at from device systems application layer;
Event report source is after listening in equipment data and performing data renewal rewards theory, Data Update operation information is sent to demons, this Data Update operation information is sent to MTP by demons after receiving this Data Update operation information, this Data Update operation information is sent to main equipment by MTP after receiving this Data Update operation information, and main equipment is according to these Data Update operation information synchronized update data.
In the present embodiment, this main equipment is PC, should be the embedded devices such as mobile phone, panel computer, digital camera from equipment.The mode carrying out connecting based on MTP pattern can be: 1, by USB data line interconnect based on MTP connect master and slave equipment; 2, by IP mode interconnect based on MTP connect master and slave equipment; 3, by bluetooth approach interconnect based on MTP connect master and slave equipment etc.
Be PC below with main equipment, be mobile phone from equipment, mobile phone is connected by USB data line and USB interface with PC, and the two to carry out file transfer based on MTP be that example is described:
Arrange one section at cell phone system kernel and perform the event report source program of data renewal rewards theory for monitoring data in mobile phone, simultaneously arrange one for the demons in response events report source in cell phone system application layer, after PC and mobile phone carry out data cube computation by USB data line, event report source program starts the Data Update operation that data in real-time listening mobile phone perform, after listening in mobile phone the operation of data generation Data Update, the Data Update operation information listened to is sent to demons, Data Update operation information is sent to MTP by these demons after receiving Data Update operation information, this Data Update operation information is sent to PC by MTP, PC carries out synchronized update according to this Data Update operation information.As, when certain file in mobile phone is modified, PC direct simultaneous display mobile phone can have modified this certain file, could show this file amended after not needing that mobile phone again cold start-up, PC are re-started digital independent, uses bring a lot of convenience to user.
For saving resource, event report source only, after listening to Data Update operation occurs in equipment, just can notify demons.Otherwise, do not notify demons.Wherein Data Update operation comprises the operation such as increase, deletion, amendment of the file to mobile phone EMS memory storage.
Refer to Fig. 2, for the present invention is based on the flow chart of the second embodiment of the method for data synchronization of MTP pattern, the invention provides a kind of method of data synchronization based on MTP pattern, be applied to based on the main equipment of MTP pattern connection with from the system of equipment, the method comprises:
Arranging one to perform data renewal rewards theory event report source for monitoring in equipment data from the system kernel of equipment; The demons for responding this event report source are being arranged at from device systems application layer;
Event report source is after listening in equipment data and performing data renewal rewards theory, Data Update operation information is sent to demons, this Data Update operation information is sent to MTP by demons after receiving this Data Update operation information, MTP upgrades index data base this renewal index data base is sent to main equipment according to this Data Update operation information after receiving this Data Update operation information, and main equipment receives and according to these renewal index data base synchronized update data.
In the present embodiment, this main equipment is PC, should be the embedded devices such as mobile phone, panel computer, digital camera from equipment.The mode carrying out connecting based on MTP pattern can be: 1, by USB data line interconnect based on MTP connect master and slave equipment; 2, by IP mode interconnect based on MTP connect master and slave equipment; 3, by bluetooth approach interconnect based on MTP connect master and slave equipment etc.
This index data base at least comprises the file attribute information such as title, address, creation-time, update time, size of data of All Files in equipment.Or this index data base at least comprises the file attribute information such as title, address, creation-time, update time, size of data of the file that Data Update operation occurs in equipment.
Be PC below with main equipment, be mobile phone from equipment, mobile phone is connected by USB data line and USB interface with PC, and the two to carry out file transfer based on MTP be that example is described:
Arrange one section at cell phone system kernel and perform the event report source program of data renewal rewards theory for monitoring data in mobile phone, simultaneously arrange one for the demons in response events report source in cell phone system application layer, after PC and mobile phone carry out data cube computation by USB data line, event report source program starts the Data Update operation that data in real-time listening mobile phone perform, when event report source listen in mobile phone have Data Update to operate time, Data Update operation information is sent to demons, this Data Update operation information is sent to MTP by demons after receiving this Data Update operation information, MTP also comprises an index data base, MTP upgrades index data base according to this Data Update operation information after receiving this Data Update operation information, and the data directory database after upgrading is sent to PC, PC receives and carries out contrast synchronized update data according to the index data base after this renewal.
Wherein, the operation that MTP upgrades index data base according to this Data Update operation information after receiving this Data Update operation information comprises: the increase that the file that MTP stores up according to mobile phone EMS memory occurs, deletion, amendment fileinfo, carries out corresponding data list information increase, deletion, amendment in index data base.
Further, PC receives and comprises according to the method that the index data base after this renewal carries out contrasting synchronized update data:
The file attribute information such as title, address, creation-time, update time, size of data (comprise file that Data Update operation occurs and the file that Data Update operates does not occur) of All Files in carrying mobile phone in index data base after the renewal that MTP sends, after the index data base of PC after receiving this renewal, in comparison PC file with upgrade after index data base and carry out synchronized update according to the index data base after upgrading.
Or, the file attribute information such as title, address, creation-time, update time, size of data of the file of only carrying mobile phone interior generation Data Update operation in index data base after the renewal that MTP sends, here, the address of carrying in the index data base after renewal can be specifically the storing path that the data place file changed occurs, after the index data base of PC after receiving this renewal, first from mobile phone, again read the data of file corresponding to this storing path, then the data of this file read are replaced with the data of this file again read.The method only again need read and upgrade the data changed, and remainder data remains unchanged, and reduces and again reads data volume, speed.
Further, in order to avoid main equipment and the error in data caused when equipment is modified to identical file simultaneously, when user revises the data of the file read from this from equipment on the master, forbid that user is in the data revising this file from equipment simultaneously from equipment;
Or,
User when revising these data from the file equipment from equipment, main equipment forbids that user revises the data of this file on the master simultaneously.
Such as, when user revises A file on PC, do not allow user to modify to A file on mobile phone simultaneously, when revising the A end of file and after closing A file on PC, user just can modify to A file on mobile phone, but when user revises A file on PC, can at mobile phone open A file, to check the content of A file.Same, when user revises A file on mobile phone, do not allow user to modify to A file on PC simultaneously, when the mobile phone amendment A end of file after closing A file, user just can modify to A file on PC, but when user revises A file on mobile phone, A file can be opened at PC, to check the content in A file.
Concrete, when user revises the data of the file read from mobile phone on PC, mobile phone forbids that user revises the data of this file on mobile phone simultaneously, specific implementation can be as follows: listen to user on PC, revise the data of the file read from mobile phone time, the value of the semaphore arranged for this file is in advance set to read-only by PC, and this semaphore is sent to mobile phone by MTP; Listen to user on mobile phone, revise the data of this file time, mobile phone after the up-to-date value of the semaphore determining this file is read-only, forbid write user amendment data; Further, PC is after this file is closed, the value of this semaphore is re-set as and can edits, and again this semaphore is sent to mobile phone by MTP, mobile phone listens to user when revising the data of this file on mobile phone, after the up-to-date value of the semaphore determining this file is to edit, the data of user's amendment can be write.
Concrete, when user revises the data of the file in this mobile phone on mobile phone, PC forbids that user revises the data of this file on PC simultaneously, specific implementation can be as follows: listen to user on mobile phone, revise the data of the file in mobile phone time, the value of the semaphore arranged for this file is in advance set to read-only by mobile phone, and this semaphore is sent to PC by MTP; Listen to user on PC, revise the data of described file time, PC after the up-to-date value of the semaphore determining this file is read-only, forbid write user amendment data.Further, mobile phone is after this file is closed, the value of this semaphore is re-set as and can edits, and again this semaphore is sent to PC by MTP, PC listens to user when revising the data of this file on PC, after the up-to-date value of the semaphore determining this file is to edit, the data of user's amendment can be write.
Preferably, after the up-to-date value of the semaphore of mobile phone determination file is read-only, mobile phone sends the information that this file is just being modified on PC, can not revise this file to point out user at mobile phone simultaneously;
After the up-to-date value of the semaphore of PC determination file is read-only, PC sends the information that this file is just being modified on mobile phone, can not revise this file to point out user at PC simultaneously.
Thus effectively prevent main equipment and the error in data caused when equipment is modified to identical file simultaneously.
Refer to Fig. 3, for the present invention is based on the structural representation of the first embodiment of the data synchronous system of MTP pattern, the invention provides a kind of data synchronous system based on MTP pattern, this system comprises main equipment, from equipment and connect main equipment and the MTP module from equipment;
Time reports unit should be comprised, guarded unit from equipment;
Event report unit, performs data renewal rewards theory for monitoring from data in equipment, when listening to data execution data renewal rewards theory in equipment, being sent to by Data Update operation information and guarding unit;
Guard unit, for response events reporting unit, after the Data Update operation information receiving the transmission of event report unit, Data Update operation information is sent to MTP module;
MTP module, for receiving the Data Update operation information guarded unit and send, and is sent to main equipment by this Data Update operation information.
Further, this MTP module also for: receive guard unit send Data Update operation information, and according to this Data Update operation information upgrade index data base, and by upgrade after index data base be sent to main equipment.
Main equipment, for receiving this Data Update operation information and carrying out Data Update according to the Data Update operation information that receives, with to make in main equipment data with from data synchronization updating in equipment.
Further, this main equipment also for: receive the index data base after this renewal and carry out Data Update according to the index data base after the renewal that receives, with to make in main equipment data with from data synchronization updating in equipment.
Further, from equipment also for: when user revises the data from the file read from equipment on the master, forbid that user is in the data revising this file from equipment simultaneously.Concrete, when user revises the data from the file read from equipment on the master, forbid that the data that user is revising this file from equipment are simultaneously: when listening to the data that user revises on the master from the file read from equipment, the value of the semaphore arranged for this file is in advance set to read-only, and this semaphore is sent to from equipment by MTP; From equipment for: listening to user when revising the data of described file from equipment, after the up-to-date value of the semaphore determining this file is read-only, forbid write user amendment data.
Further, from equipment also for: after the up-to-date value of the semaphore determining this file is read-only, send the information that this file is just being modified on main equipment, this file can not revised from equipment to point out user simultaneously.
Main equipment also for: user when revising these data from the file equipment from equipment, forbid that user revises the data of this file on the master simultaneously.Concrete, user when revising these data from the file equipment from equipment, forbid that the data that user revises this file on the master are simultaneously: listening to user when revising the data from the file equipment from equipment, the value of the semaphore arranged for this file is in advance set to read-only, and this semaphore is sent to main equipment by MTP; Main equipment 31 for: when listening to user and revising the data of described file on the master, after the up-to-date value of the semaphore determining this file is read-only, forbid write user amendment data.
Further, main equipment also for: after the up-to-date value of the semaphore determining this file is read-only, send this file from the information that equipment is modified, this file can not be revised at main equipment to point out user simultaneously.
Refer to Fig. 4, for the present invention is based on the structural representation of the first embodiment from equipment that MTP pattern connects, the invention provides a kind of based on MTP pattern connect from equipment, should comprise from equipment:
Event report unit, performs data renewal rewards theory for monitoring from data in equipment, when listening to data execution data renewal rewards theory in equipment, being sent to by Data Update operation information and guarding unit;
Guard unit, for response events reporting unit, after the Data Update operation information receiving the transmission of event report unit, Data Update operation information is sent to MTP module;
Further, also comprise from equipment:
Coordination unit, for when user revises the data from the file read from equipment on the master, forbids that user is in the data revising this file from equipment simultaneously.Concrete, described coordination unit is used for: receive main equipment by MTP and revise on the master after the data of the file read from equipment listening to user, and the value of transmission is set to read-only in advance for the semaphore that this file is arranged; Listening to user when revising the data of described file from equipment, after the up-to-date value of the semaphore determining this file is read-only, forbid the data writing user's amendment.
Further, described coordination unit also for:
Listening to user when revising the data from the file equipment from equipment, the value of the semaphore arranged for this file being in advance set to read-only, and this semaphore is sent to main equipment by MTP.
Further, described coordination unit also for:
After the up-to-date value of the semaphore determining this file is read-only, send the information that this file is being modified on the master, this file can not revised from equipment to point out user simultaneously.
Refer to Fig. 5, for the present invention is based on the structural representation of the first embodiment of the main equipment that MTP pattern connects, the invention provides a kind of main equipment connected based on MTP pattern, this main equipment comprises:
Receiving element: for receiving the Data Update operation information that MTP sends, and Data Update operation information is sent to updating block;
Updating block: for performing renewal rewards theory according to the Data Update operation information that receives, to make main equipment and synchronous from device data.
Further, this receiving element is used for:
Receive the index data base after the renewal of MTP transmission, and the index data base after this renewal is sent to updating block.
Further, updating block is used for:
Receive the index data base after this renewal and according to the Data Update main equipment data in the index data base after this renewal, to make main equipment and synchronous from device data.
Further, this main equipment also comprises:
Coordination unit, for user when revising these data from the file equipment from equipment, forbid that user revises the data of this file on the master simultaneously.Concrete, coordination unit for: from equipment revising this from the data of file equipment after from equipment listening to user by interface, the value of transmission is set to read-only in advance for the semaphore that this file is arranged; When listening to user and revising the data of described file on the master, after the up-to-date value of the semaphore determining this file is read-only, forbid the data writing user's amendment.
Further, this coordination unit also for:
When listening to the data that user revises on the master from the file read from equipment, the value of the semaphore arranged for this file is in advance set to read-only, and this semaphore is sent to from equipment by MTP.
Further, described coordination unit also for:
After the up-to-date value of the semaphore determining this file is read-only, send this file from the information that equipment is modified, this file can not be revised at main equipment to point out user simultaneously.
In sum, beneficial effect of the present invention: by arranging one to perform data renewal rewards theory event report source for monitoring in equipment data from the system kernel of equipment; The demons for responding this event report source are being arranged at from device systems application layer; Event report source is after listening in equipment data and performing data renewal rewards theory, Data Update operation information is sent to demons, this Data Update operation information is sent to MTP by demons after receiving this Data Update operation information, this Data Update operation information is sent to main equipment by MTP after receiving this Data Update operation information, and main equipment is according to these Data Update operation information synchronized update data.By operating in the Data Update arranging event report source to monitor data in equipment from device core, and by Data Update operation by demons and MTP fast report main equipment, thus realize main equipment and the data synchronization updating from equipment, and data syn-chronization is quick in time.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1., based on a method of data synchronization for MTP pattern, be applied in the system of the master and slave equipment connected by MTP, it is characterized in that, described method comprises:
Arranging one to perform data renewal rewards theory event report source for monitoring in equipment data from the system kernel of equipment; One is being arranged for responding the demons in this event report source from device systems application layer;
Described Data Update operation information, after listening in equipment data and performing data renewal rewards theory, is sent to described demons by described event report source; This Data Update operation information is sent to described MTP by described demons after receiving this Data Update operation information; This Data Update operation information is sent to main equipment by described MTP after receiving this Data Update operation information; Main equipment is according to these Data Update operation information synchronized update data.
2. method according to claim 1, it is characterized in that, described MTP comprises an index data base, described MTP is after receiving this Data Update operation information, upgrade index data base the index data base after this renewal is sent to main equipment according to this Data Update operation information, main equipment receives and according to the index data base synchronized update data after this renewal.
3. method according to claim 2, is characterized in that, described index data base at least comprises title and the address of each file in equipment.
4. method according to claim 2, is characterized in that, described index data base at least comprises title and the address of the file of Data Update in equipment.
5. the method according to any one of claim 1-4, is characterized in that,
User when revising the data from the file equipment from equipment, main equipment forbids that user revises the data of this file on the master simultaneously.
6. method according to claim 5, is characterized in that,
Described user when revising these data from the file equipment from equipment, main equipment forbids that user revises the data of this file on the master simultaneously, specifically comprise: listening to user when revising the data from the file equipment from equipment, from equipment, the value of the semaphore arranged for this file is in advance set to read-only, and this semaphore is sent to main equipment by MTP; When listening to user and revising the data of described file on the master, main equipment, after the up-to-date value of the semaphore determining this file is read-only, forbids the data writing user's amendment.
7. method according to claim 6, it is characterized in that, determine at main equipment the up-to-date value of the semaphore of this file be read-only after, comprise further: main equipment sends this file from the information that equipment is modified, this file can not be revised at main equipment to point out user simultaneously.
8. based on a data synchronous system for MTP pattern, it is characterized in that, described system comprises main equipment, from equipment and connect main equipment and the MTP module from equipment;
Comprise time reports unit from equipment, guard unit;
Event report unit, for monitoring system Data Update operation, listen in system occur Data Update operation time, Data Update operation information is sent to and guards unit;
Guard unit, for response events reporting unit, after the Data Update operation information receiving the transmission of event report unit, Data Update operation information is sent to MTP module;
MTP module, for receiving the Data Update operation information guarded unit and send, and is sent to main equipment by this Data Update operation information.
Main equipment, for receiving this Data Update operation information and carrying out Data Update according to the Data Update operation information that receives, with to make in main equipment data with from data synchronization updating in equipment.
9. based on MTP pattern connect from an equipment, it is characterized in that, comprise from equipment:
Event report unit, for monitoring system Data Update operation, listen in system occur Data Update operation time, Data Update operation information is sent to and guards unit;
Guard unit, for response events reporting unit, after the Data Update operation information receiving the transmission of event report unit, Data Update operation information is sent to MTP module.
10., based on the main equipment that MTP pattern connects, it is characterized in that, main equipment comprises:
Receiving element: for receiving the Data Update operation information that MTP sends, and Data Update operation information is sent to updating block;
Updating block: for performing renewal rewards theory according to the Data Update operation information that receives, to make main equipment and synchronous from device data.
CN201410406663.3A 2014-08-18 2014-08-18 MTP mode-based data synchronization method, system and device Pending CN105356989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410406663.3A CN105356989A (en) 2014-08-18 2014-08-18 MTP mode-based data synchronization method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410406663.3A CN105356989A (en) 2014-08-18 2014-08-18 MTP mode-based data synchronization method, system and device

Publications (1)

Publication Number Publication Date
CN105356989A true CN105356989A (en) 2016-02-24

Family

ID=55332869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410406663.3A Pending CN105356989A (en) 2014-08-18 2014-08-18 MTP mode-based data synchronization method, system and device

Country Status (1)

Country Link
CN (1) CN105356989A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107247735A (en) * 2017-05-08 2017-10-13 北京小米移动软件有限公司 Document transmission method and device
WO2017185693A1 (en) * 2016-04-29 2017-11-02 乐视控股(北京)有限公司 Electronic device and method for copying data from another directly connected electronic device
WO2018000621A1 (en) * 2016-06-27 2018-01-04 乐视控股(北京)有限公司 Communication data synchronization method and electronic device
CN107577822A (en) * 2017-10-13 2018-01-12 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN107770265A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN111200811A (en) * 2019-12-29 2020-05-26 歌尔科技有限公司 TWS earphone, upgrading method and device thereof and readable storage medium
CN111241194A (en) * 2020-01-02 2020-06-05 浙江口碑网络技术有限公司 Data synchronization method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350991A (en) * 2008-09-01 2009-01-21 深圳华为通信技术有限公司 Method, system, computer and terminal for data synchronization
CN101742632A (en) * 2009-12-25 2010-06-16 深圳华为通信技术有限公司 Synchronous method, host computer, mobile terminal and synchronous system
CN102033758A (en) * 2009-09-25 2011-04-27 深圳市福智软件技术有限公司 Firmware updating method of audio playing device and system using same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350991A (en) * 2008-09-01 2009-01-21 深圳华为通信技术有限公司 Method, system, computer and terminal for data synchronization
CN102033758A (en) * 2009-09-25 2011-04-27 深圳市福智软件技术有限公司 Firmware updating method of audio playing device and system using same
CN101742632A (en) * 2009-12-25 2010-06-16 深圳华为通信技术有限公司 Synchronous method, host computer, mobile terminal and synchronous system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017185693A1 (en) * 2016-04-29 2017-11-02 乐视控股(北京)有限公司 Electronic device and method for copying data from another directly connected electronic device
WO2018000621A1 (en) * 2016-06-27 2018-01-04 乐视控股(北京)有限公司 Communication data synchronization method and electronic device
CN107247735A (en) * 2017-05-08 2017-10-13 北京小米移动软件有限公司 Document transmission method and device
CN107577822A (en) * 2017-10-13 2018-01-12 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN107577822B (en) * 2017-10-13 2020-04-10 Oppo广东移动通信有限公司 Data synchronization method, data synchronization device and mobile terminal
CN107770265A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN107770265B (en) * 2017-10-17 2019-08-23 Oppo广东移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN111200811A (en) * 2019-12-29 2020-05-26 歌尔科技有限公司 TWS earphone, upgrading method and device thereof and readable storage medium
CN111241194A (en) * 2020-01-02 2020-06-05 浙江口碑网络技术有限公司 Data synchronization method and device

Similar Documents

Publication Publication Date Title
CN105356989A (en) MTP mode-based data synchronization method, system and device
CN102611745B (en) On-line file moving method, device and system
CN103473277B (en) The Snapshot Method and device of file system
CN104885055A (en) Method and device for application data synchronization
CN106293846B (en) The upgrade method and device of analog processor
CN102760131B (en) A kind of methods of exhibiting of network album and system
CN103049405A (en) Management method and system of android device files
CN106506215A (en) A kind of automation operational system based on CMDB
CN103870977A (en) Method and system thereof for data synchronizing of mobile advertising platform
WO2024077885A1 (en) Management method, apparatus and device for container cluster, and non-volatile readable storage medium
CN103716384A (en) Method and device for realizing cloud storage data synchronization in cross-data-center manner
WO2021227860A1 (en) Data synchronization method and apparatus, terminal, and storage medium
CN103166984B (en) System that Network Video Surveillance equipment control is controlled and automatically updates, method
CN102752294A (en) Method and system for synchronizing data of multiple terminals on basis of equipment capacity
CN115934855A (en) Full-link field level blood margin analysis method, system, equipment and storage medium
CN110532058B (en) Management method, device and equipment of container cluster service and readable storage medium
CN114079615A (en) Application synchronization method, system, medium and electronic device in multi-cluster environment
CN103631622A (en) Software online upgrade repairing method
CN104462342B (en) database snapshot synchronization processing method and device
CN104468419A (en) Method and system for recovering configuration of interchanger and interchanger
CN103559198A (en) Data synchronizing method and equipment
CN103577554A (en) Method and device for triggering multimedia database scanning of Android equipment
CN104516744A (en) Software updating method and system
CN104517067A (en) Method, device and system for data access
CN102737082A (en) Method and system for dynamically updating file data indexes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160224

WD01 Invention patent application deemed withdrawn after publication