CN104182370A - Data transmission method, data transmission device and mobile terminal - Google Patents

Data transmission method, data transmission device and mobile terminal Download PDF

Info

Publication number
CN104182370A
CN104182370A CN201410386652.3A CN201410386652A CN104182370A CN 104182370 A CN104182370 A CN 104182370A CN 201410386652 A CN201410386652 A CN 201410386652A CN 104182370 A CN104182370 A CN 104182370A
Authority
CN
China
Prior art keywords
data
transmission
mobile terminal
equipment
transmit
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
CN201410386652.3A
Other languages
Chinese (zh)
Other versions
CN104182370B (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.)
Guangzhou cheetah Network Technology Co., Ltd.
Original Assignee
Kingsoft Guangzhou Network 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 Kingsoft Guangzhou Network Technology Co Ltd filed Critical Kingsoft Guangzhou Network Technology Co Ltd
Priority to CN201410386652.3A priority Critical patent/CN104182370B/en
Publication of CN104182370A publication Critical patent/CN104182370A/en
Application granted granted Critical
Publication of CN104182370B publication Critical patent/CN104182370B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a data transmission method, a data transmission device and a mobile terminal. The data transmission method comprises the following steps: when the mobile terminal is detected to be connected with other equipment through a USB (Universal Serial Bus) port, whether a screen is unlocked by the mobile terminal or not is judged; if the screen is not unlocked by the mobile terminal, data is transmitted in a first manner with the other equipment; the first way is that the other equipment is connected through the ADB (Android Debug Bridge) interface of the mobile terminal; when the screen is detected to be unlocked by the mobile terminal, data transmission is subject to the first manner or data is retransmitted in a second manner according to the total size, the finished size, ADBspeed1 and MTPspeed1; the second manner is that the other equipment is connected according to an MTP (Media Transfer Protocol). According to the invention, the data transmission method, data transmission device and the mobile terminal are adopted, so that the data transmission time is shortest, and the time of users can be greatly saved.

Description

A kind of data transmission method, device and mobile terminal
Technical field
The present invention relates to field of data transmission, relate in particular to a kind of data transmission method, device and mobile terminal.
Background technology
Along with the raising of people's living standard, the popularity of mobile terminal is more and more higher.In the user that people bring at enjoyment mobile terminal experiences, usually need by the data on other equipment control mobile terminals.Common way is, mobile terminal is passed through to USB (Universal Serial BUS, USB (universal serial bus)) port and other equipment connections, then based on MTP (Media Transfer Protocol, media transmission protocol) or utilize the data transmission between ADB (Andriod Debug Bridge, Android debugging bridge) Interface realization mobile terminal and other equipment on mobile terminal.
Wherein, data transfer mode based on MTP has advantages of that transmission speed is fast, but the driver of installing on the system version of this mode to mobile terminal and other equipment of being connected with mobile terminal has certain requirement, even if meet above-mentioned requirements, also need the first unlock screen of mobile terminal, and unlock screen need to spend the regular hour; Utilize the data transfer mode of ADB interface to there is few, the easy enforcement of restrictive condition, but the mode of the velocity ratio of data transmission based on MTP is slow.Therefore, carry out data transmission between mobile terminal and other equipment time, should adopt which kind of data transfer mode could farthest save time cost be need thinking problem.
Summary of the invention
Technical matters to be solved by this invention is, a kind of data transmission method, device and mobile terminal are provided, and can save the time of transmitting data between mobile terminal and other equipment.
For solving the problems of the technologies described above, the embodiment of the present invention provides a kind of data transmission method, device and mobile terminal.
First aspect present invention provides a kind of data transmission method, can comprise:
Detect when mobile terminal is connected by general-purpose serial bus USB port with other equipment, judge whether unlock screen of described mobile terminal;
If not unlock screen of described mobile terminal, with first method and described other equipment transmission datas, wherein said first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal;
When detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method according to the total amount of data that will transmit, transmitted determine with first method and continue transmission data or again transmit data with second method, and wherein said second method is the mode connecting according to media transmission protocol MTP and described other equipment.
Alternatively, total amount of data that described basis will be transmitted, data volume, the data rate of first method and the data rate of second method transmitted are determined with first method and are continued transmission data or again transmit data with second method, comprising:
Read the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
If the direction of data transmission is for being transferred to described other equipment from described mobile terminal, read in described direction the speed MTPspeed1 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed1 and the described total amount of data that will transmit of described first method transmission;
Calculate with first method and continue the required time T 1 of transmission data and again transmit the required time T of data 2 with second method, wherein T1=(totalsize-finishedsize)/ADBspeed1, T2=totalsize/MTPspeed1;
If T2+errovalue>T1, determine with first method continue transmission data, otherwise determine again transmit data with second method, wherein errovalue is greater than zero, is default error time value.
Alternatively, total amount of data that described basis will be transmitted, data volume, the data rate of first method and the data rate of second method transmitted are determined with first method and are continued transmission data or again transmit data with second method, comprising:
Read the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
If the direction of data transmission is from described other device transmission to described mobile terminal, read in described direction the speed MTPspeed2 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed2 and the described total amount of data that will transmit of described first method transmission;
Calculate with first method and continue the required time T 3 of transmission data and again transmit the required time T of data 4 with second method, wherein T3=(totalsize-finishedsize)/ADBspeed2, T4=totalsize/MTPspeed2;
If T4+errovalue>T3, determine with first method continue transmission data, otherwise determine again transmit data with second method, wherein errovalue is greater than zero, is default error time value.
Alternatively, described during with first method and described other equipment transmission datas, described in detect that described mobile terminal is before unlock screen, described method also comprises:
Generate information, described information is carried out unlocking screen for reminding user;
Periodically detect whether unlock screen of described mobile terminal.
Alternatively, describedly judge that whether described mobile terminal after unlock screen, described method also comprises:
If described mobile terminal unlock screen, with second method and described other equipment transmission datas.
Alternatively, describedly judge that whether described mobile terminal before unlock screen, described method also comprises:
Judge whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data;
If be judged as YES, judge whether unlock screen of described mobile terminal.
Alternatively, described judge whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data after, described method also comprises:
If be judged as NO, with described first method and described other equipment transmission datas.
Alternatively, described and described other equipment transmission datas, comprising:
The data that will transmit are transferred to described other equipment from described mobile terminal; Or,
By the described data that will transmit from described other device transmission to described mobile terminal.
Second aspect present invention provides a kind of data transmission device, can comprise:
Whether the first judging unit, in the time detecting that mobile terminal is connected by general-purpose serial bus USB port with other equipment, judge described mobile terminal unlock screen;
The first transmission unit, for in the time that described the first judging unit is judged as NO, with first method and described other equipment transmission datas, wherein said first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal;
Determining unit, for detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method according to the total amount of data that will transmit, transmitted determine with first method and continue transmission data or again transmit data with second method, and wherein said second method is the mode connecting according to media transmission protocol MTP and described other equipment.
Alternatively, described determining unit, comprising:
The first reading unit, for reading the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
The second reading unit, being used in the direction of data transmission is while being transferred to described other equipment from described mobile terminal, read in described direction the speed MTPspeed1 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed1 and the described total amount of data that will transmit of described first method transmission;
The first computing unit, continue the required time T 1 of transmission data and again transmit the required time T of data 2 with second method for calculating with first method, wherein T1=(totalsize-finishedsize)/ADBspeed1, T2=totalsize/MTPspeed1;
First determines subelement, for when the T2+errovalue>T1, determines with first method and continues transmission data, otherwise determine and again transmit data with second method, and wherein errovalue is greater than zero, is default error time value.
Alternatively, described determining unit, comprising:
Third reading is got unit, for reading the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
The 4th reading unit, for being from described other device transmission during to described mobile terminal in the direction of data transmission, read in described direction the speed MTPspeed2 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed2 and the described total amount of data that will transmit of described first method transmission;
The second computing unit, continue the required time T 3 of transmission data and again transmit the required time T of data 4 with second method for calculating with first method, wherein T3=(totalsize-finishedsize)/ADBspeed2, T4=totalsize/MTPspeed2;
Second determines subelement, for when the T4+errovalue>T3, determines with first method and continues transmission data, otherwise determine and again transmit data with second method, and wherein errovalue is greater than zero, is default error time value.
Alternatively, described device also comprises:
Tip element, for during with first method and described other equipment transmission datas, detecting that described mobile terminal generates information before unlock screen at described the first transmission unit, described information is carried out unlocking screen for reminding user;
Whether detecting unit, for periodically detecting described mobile terminal unlock screen.
Alternatively, described device also comprises:
The second transmission unit, for judging that at described the first judging unit whether described mobile terminal after unlock screen, if described mobile terminal unlock screen, with second method and described other equipment transmission datas.
Alternatively, described device also comprises:
The second judging unit, for judging that at described the first judging unit whether described mobile terminal before unlock screen, judges whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data;
Whether described the first judging unit, specifically in the time that described the second judging unit is judged as YES, judge described mobile terminal unlock screen.
Alternatively, described the first transmission unit, also in the time that described the second judging unit is judged as NO, with described first method and described other equipment transmission datas.
Alternatively,, described and described other equipment transmission datas, comprising:
The data that will transmit are transferred to described other equipment from described mobile terminal; Or,
By the described data that will transmit from described other device transmission to described mobile terminal.
Third aspect present invention provides a kind of mobile terminal, can comprise the data transmission device as described in second aspect.
In the embodiment of the present invention, detect when mobile terminal and other equipment join by USB port, if due to mobile terminal not unlock screen cause movement to transmit data by MTP, mobile terminal and this other equipment first carry out data transmission by ADB interface, during Deng mobile terminal unlock screen, according to the total amount of data that will transmit, the speed of the data volume of having transmitted and two kinds of transmission modes is calculated respectively two kinds of follow-up required times of transmission mode and is determined follow-up data transfer mode, thereby guarantee the shortest time of data transmission, farthest save user's time.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of an embodiment of data transmission method provided by the invention;
Fig. 2 is the schematic flow sheet of another embodiment of data transmission method provided by the invention;
Fig. 3 is a schematic flow sheet of step S206 in the data transmission method described in Fig. 2;
Fig. 4 is another schematic flow sheet of step S206 in the data transmission method described in Fig. 2;
Fig. 5 is the structural representation of an embodiment of data transmission device provided by the invention;
Fig. 6 is a structural representation of determining unit 503 in data transmission device provided by the invention;
Fig. 7 is another structural representation of determining unit 503 in data transmission device provided by the invention;
Fig. 8 is the structural representation of another embodiment of data transmission device provided by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In the embodiment of the present invention, mobile terminal can comprise the terminals such as smart mobile phone, MP3 player, MP4 player, panel computer; Other equipment can comprise the equipment such as desk-top computer, panel computer, notebook computer.Wherein, mobile terminal can be connected by USB (universal serial bus) (USB) port with other equipment.
Referring to Fig. 1, it is the schematic flow sheet of an embodiment of data transmission method provided by the invention.As shown in Figure 1, this data transmission method can comprise:
Whether S101, detects when mobile terminal is connected by general-purpose serial bus USB port with other equipment, judge described mobile terminal unlock screen.
In the time detecting that mobile terminal is connected by Universal USB port with other equipment, alternatively, can first judge whether the system of mobile terminal and the driver of these other equipment meet the requirement of the data transfer mode based on MTP, if met, more further judge whether unlock screen of mobile terminal; Or, also can directly judge between mobile terminal and this other equipment and can carry out data transmission by MTP, if can not, then judge between mobile terminal and this other equipment whether the reason that cannot carry out data transmission by MTP is not unlock screen of mobile terminal.
In general, use MTP to carry out data transmission and need to meet three conditions: the first, the system version of mobile terminal will be higher than default a certain system version; The second, on these other equipment, need to be provided with Windows Media Player 10 above versions or other drivings; The 3rd, mobile terminal needs unlock screen.Along with technical progress, above-mentioned three conditions may change, and the present invention does not limit this.
Particularly, if the driver of the system of mobile terminal or these other equipment does not meet above condition,, directly by ADB interface and this other equipment transmission datas of mobile terminal, do not carry out subsequent step of the present invention.If the driver of the system of mobile terminal and these other equipment all meets above condition, and this mobile terminal unlock screen, mobile terminal directly uses MTP and this other equipment transmission datas, does not carry out subsequent step of the present invention.The embodiment of the present invention mainly for due to mobile terminal not unlock screen cause cannot using between mobile terminal and other equipment the situation of MTP transmission data.
Alternatively, mobile terminal and this other equipment transmission datas comprise: the data that will transmit are transferred to this other equipment from mobile terminal; Or the data that will transmit are from these other device transmission to mobile terminal.
S102, if not unlock screen of described mobile terminal, with first method and described other equipment transmission datas, wherein said first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal.
If mobile terminal is unlock screen not, connect by ADB interface and this other equipment of mobile terminal, thereby carry out data transmission with these other equipment.
S103, when detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method according to the total amount of data that will transmit, transmitted determine with first method and continue transmission data or again transmit data with second method, and wherein said second method is the mode connecting according to media transmission protocol MTP and described other equipment.
Meet and use MTP to carry out the first two condition of data transmission needs at the system of mobile terminal or the driver of these other equipment, when detecting that described mobile terminal is when unlock screen, mobile terminal and these other equipment have met and use MTP to carry out all conditions of data transmission.
Now partial data may complete transmission by ADB interface, alternatively, can continue to complete by ADB interface the transmission of remaining data; Or, use MTP instead and again transmit all data that will transmit.In concrete enforcement, data volume, the data rate of first method and the data rate of second method that can according to the total amount of data that will transmit, transmit calculated respectively by ADB interface and continued transmission required time of data and use the MTP required time of transmit data set again, determines follow-up data transfer mode according to calculate two kinds of times.
Wherein, the data rate of first method comprise by ADB interface by data from mobile terminal be transferred to these other equipment speed and by ADB interface by data the speed from these other device transmission to mobile terminal; The data rate of second method comprise use MTP by data from mobile terminal be transferred to these other equipment speed and use MTP by data the speed from these other device transmission to mobile terminal.Above-mentioned four kinds of speed are all relevant with the total amount of data that will transmit, and general data amount is larger, and speed is slower.Above-mentioned four kinds of speed can obtain according to former data transfer operation with the corresponding empirical value of the total amount of data that will transmit.
In the data transmission method of the present embodiment, detect when mobile terminal and other equipment join by USB port, if due to mobile terminal not unlock screen cause movement to transmit data by MTP, mobile terminal and this other equipment first carry out data transmission by ADB interface, during Deng mobile terminal unlock screen, according to the total amount of data that will transmit, the speed of the data volume of having transmitted and two kinds of transmission modes is calculated respectively two kinds of follow-up required times of transmission mode and is determined follow-up data transfer mode, thereby guarantee the shortest time of data transmission, farthest save user's time.
Referring to Fig. 2, it is the schematic flow sheet of another embodiment of data transmission method provided by the invention.As shown in Figure 2, this data transmission method can comprise:
S201, detects when mobile terminal is connected by general-purpose serial bus USB port with other equipment, judges whether the system of mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data; If so, forward S202 to, otherwise, forward S208 to.
In general, use MTP to carry out data transmission and need to meet three conditions: the first, the system version of mobile terminal will be higher than default a certain system version; The second, on these other equipment, need to be provided with Windows Media Player 10 above versions or other drivings; The 3rd, mobile terminal needs unlock screen.Along with technical progress, above-mentioned three conditions may change, and the present invention does not limit this.
Whether S202, judge described mobile terminal unlock screen; If so, forward S207 to, otherwise, forward S203 to.
S203, with first method and described other equipment transmission datas.
Wherein, described first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal.
Alternatively, mobile terminal and this other equipment transmission datas comprise: the data that will transmit are transferred to this other equipment from mobile terminal; Or the data that will transmit are from these other device transmission to mobile terminal.
S204, generates information, and described information is carried out unlocking screen for reminding user.
Alternatively, this information can be interface information, such as bright screen, Word message, pattern-information etc.; In addition, this information can also be audio-frequency information or vibration information, can be also the combination of above-mentioned several information, includes but not limited to above-mentioned situation about enumerating.
Whether S205, periodically detect described mobile terminal unlock screen.
When with first method and this other equipment transmission datas, can periodically detect the whether release of screen of mobile terminal simultaneously.Wherein, sense cycle can, by User Defined, also can set in advance.
S206, when detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method of according to the total amount of data that will transmit, having transmitted determined with first method and continued transmission data or again transmit data with second method.
Meet and use MTP to carry out the first two condition of data transmission needs at the system of mobile terminal or the driver of these other equipment, when detecting that described mobile terminal is when unlock screen, mobile terminal and these other equipment have met and use MTP to carry out all conditions of data transmission.
Now partial data may complete transmission by ADB interface, alternatively, can continue to complete by ADB interface the transmission of remaining data; Or, use MTP instead and again transmit all data that will transmit.In concrete enforcement, data volume, the data rate of first method and the data rate of second method that can according to the total amount of data that will transmit, transmit calculated respectively by ADB interface and continued transmission required time of data and use the MTP required time of transmit data set again, determines follow-up data transfer mode according to calculate two kinds of times.
Wherein, the data rate of first method comprise by ADB interface by data from mobile terminal be transferred to these other equipment speed and by ADB interface by data the speed from these other device transmission to mobile terminal; The data rate of second method comprise use MTP by data from mobile terminal be transferred to these other equipment speed and use MTP by data from these other device transmission to moving
The speed of moving terminal.Above-mentioned four kinds of speed are all relevant with the total amount of data that will transmit, and general data amount is larger, and speed is slower.Above-mentioned four kinds of speed can obtain according to former data transfer operation with the corresponding empirical value of the total amount of data that will transmit.
S207, with second method and described other equipment transmission datas.
S208, with first method and described other equipment transmission datas.
In a kind of possible implementation, as shown in Figure 3, step S206 can comprise:
S301, reads the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
S302, if the direction of data transmission is for being transferred to described other equipment from described mobile terminal, read in described direction the speed MTPspeed1 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed1 and the described total amount of data that will transmit of described first method transmission;
S303, calculates with first method and continues the required time T 1 of transmission data and again transmit the required time T of data 2 with second method, wherein T1=(totalsize-finishedsize)/ADBspeed1, T2=totalsize/MTPspeed1;
S304, if T2+errovalue>T1, determine with first method continue transmission data, otherwise determine again transmit data with second method, wherein errovalue is greater than zero, is default error time value.
In the possible implementation of another kind, as shown in Figure 4, step S206 can comprise:
S401, reads the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
S402, if the direction of data transmission is from described other device transmission to described mobile terminal, read in described direction the speed MTPspeed2 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed2 and the described total amount of data that will transmit of described first method transmission;
S403, calculates with first method and continues the required time T 3 of transmission data and again transmit the required time T of data 4 with second method, wherein T3=(totalsize-finishedsize)/ADBspeed2, T4=totalsize/MTPspeed2;
S404, if T4+errovalue>T3, determine with first method continue transmission data, otherwise determine again transmit data with second method, wherein errovalue is greater than zero, is default error time value.
In the data transmission method of the present embodiment, detect when mobile terminal and other equipment join by USB port, if due to mobile terminal not unlock screen cause movement to transmit data by MTP, mobile terminal and this other equipment first carry out data transmission by ADB interface, can point out user's unlock screen and periodically detect whether release of screen simultaneously, during Deng mobile terminal unlock screen, according to the total amount of data that will transmit, the speed of the data volume of having transmitted and two kinds of transmission modes is calculated respectively two kinds of follow-up required times of transmission mode and is determined follow-up data transfer mode, thereby guarantee the shortest time of data transmission, farthest save user's time.
Participating in Fig. 3, is the structural representation of an embodiment of data transmission device provided by the invention.As shown in Figure 3, this data transmission device can comprise:
Whether the first judging unit 501, in the time detecting that mobile terminal is connected by general-purpose serial bus USB port with other equipment, judge described mobile terminal unlock screen.
The first transmission unit 502, for in the time that described the first judging unit is judged as NO, with first method and described other equipment transmission datas, wherein said first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal.
Determining unit 503, for detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method according to the total amount of data that will transmit, transmitted determine with first method and continue transmission data or again transmit data with second method, and wherein said second method is the mode connecting according to media transmission protocol MTP and described other equipment.
In the time detecting that mobile terminal is connected by Universal USB port with other equipment, alternatively, can first judge whether the system of mobile terminal and the driver of these other equipment meet the requirement of the data transfer mode based on MTP, if met, whether the first judging unit 501 further judges mobile terminal unlock screen again; Or, also can directly judge between mobile terminal and this other equipment and can carry out data transmission by MTP, if can not, then judge between mobile terminal and this other equipment whether the reason that cannot carry out data transmission by MTP is not unlock screen of mobile terminal.
In general, use MTP to carry out data transmission and need to meet three conditions: the first, the system version of mobile terminal will be higher than default a certain system version; The second, on these other equipment, need to be provided with Windows Media Player 10 above versions or other drivings; The 3rd, mobile terminal needs unlock screen.Along with technical progress, above-mentioned three conditions may change, and the present invention does not limit this.
Particularly, if the driver of the system of mobile terminal or these other equipment does not meet above condition,, directly by ADB interface and this other equipment transmission datas of mobile terminal, do not carry out subsequent step of the present invention.If the driver of the system of mobile terminal and these other equipment all meets above condition, and this mobile terminal unlock screen, mobile terminal directly uses MTP and this other equipment transmission datas, does not carry out subsequent step of the present invention.The embodiment of the present invention mainly for due to mobile terminal not unlock screen cause cannot using between mobile terminal and other equipment the situation of MTP transmission data.
Alternatively, mobile terminal and this other equipment transmission datas comprise: the data that will transmit are transferred to this other equipment from mobile terminal; Or the data that will transmit are from these other device transmission to mobile terminal.
If mobile terminal is unlock screen not, connect by ADB interface and this other equipment of mobile terminal, thereby carry out data transmission with these other equipment.
Meet and use MTP to carry out the first two condition of data transmission needs at the system of mobile terminal or the driver of these other equipment, when detecting that described mobile terminal is when unlock screen, mobile terminal and these other equipment have met and use MTP to carry out all conditions of data transmission.
Now partial data may complete transmission by ADB interface, alternatively, can continue to complete by ADB interface the transmission of remaining data; Or, use MTP instead and again transmit all data that will transmit.In concrete enforcement, data volume, the data rate of first method and the data rate of second method that can according to the total amount of data that will transmit, transmit calculated respectively by ADB interface and continued transmission required time of data and use the MTP required time of transmit data set again, determines follow-up data transfer mode according to calculate two kinds of times.
Wherein, the data rate of first method comprise by ADB interface by data from mobile terminal be transferred to these other equipment speed and by ADB interface by data the speed from these other device transmission to mobile terminal; The data rate of second method comprise use MTP by data from mobile terminal be transferred to these other equipment speed and use MTP by data the speed from these other device transmission to mobile terminal.Above-mentioned four kinds of speed are all relevant with the total amount of data that will transmit, and general data amount is larger, and speed is slower.Above-mentioned four kinds of speed can obtain according to former data transfer operation with the corresponding empirical value of the total amount of data that will transmit.
In a kind of feasible embodiment, as shown in Figure 6, if the direction of data transmission is for to be transferred to this other equipment from mobile terminal, determining unit 503 can comprise:
The first reading unit 5031, for reading the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
The second reading unit 5032, for reading in described direction, the speed MTPspeed1 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed1 and the described total amount of data that will transmit of described first method transmission;
The first computing unit 5033, continue the required time T 1 of transmission data and again transmit the required time T of data 2 with second method for calculating with first method, wherein T1=(totalsize-finishedsize)/ADBspeed1, T2=totalsize/MTPspeed1;
First determines subelement 5034, for when the T2+errovalue>T1, determines with first method and continues transmission data, otherwise determine and again transmit data with second method, and wherein errovalue is greater than zero, is default error time value.
In the feasible embodiment of another kind, as shown in Figure 7, if the direction of data transmission is that determining unit 503 can comprise from these other device transmission to mobile terminal:
Third reading is got unit 5035, for reading the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
The 4th reading unit 5036, for reading in described direction, the speed MTPspeed2 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed2 and the described total amount of data that will transmit of described first method transmission;
The second computing unit 5037, continue the required time T 3 of transmission data and again transmit the required time T of data 4 with second method for calculating with first method, wherein T3=(totalsize-finishedsize)/ADBspeed2, T4=totalsize/MTPspeed2;
Second determines subelement 5038, for when the T4+errovalue>T3, determines with first method and continues transmission data, otherwise determine and again transmit data with second method, and wherein errovalue is greater than zero, is default error time value.
Alternatively, as shown in Figure 8, this data transmission device also can comprise with in lower unit at least one:
Tip element 504, for during with first method and described other equipment transmission datas, detecting that described mobile terminal generates information before unlock screen at described the first transmission unit, described information is carried out unlocking screen for reminding user.
Alternatively, this information can be interface information, such as bright screen, Word message, pattern-information etc.; In addition, this information can also be audio-frequency information or vibration information, can be also the combination of above-mentioned several information, includes but not limited to above-mentioned situation about enumerating.
Whether detecting unit 505, for periodically detecting described mobile terminal unlock screen.
When with first method and this other equipment transmission datas, can periodically detect the whether release of screen of mobile terminal simultaneously.Wherein, sense cycle can, by User Defined, also can set in advance.
The second transmission unit 506, for judging that at described the first judging unit whether described mobile terminal after unlock screen, if described mobile terminal unlock screen, with second method and described other equipment transmission datas.
The second judging unit 507, for judging that at described the first judging unit 501 whether described mobile terminal before unlock screen, judges whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data.
Correspondingly, whether the first judging unit 501, specifically in the time that described the second judging unit 507 is judged as YES, judges described mobile terminal unlock screen.
The first transmission unit 502, when being also used in the second judging unit 507 and being judged as NO, with described first method and described other equipment transmission datas.
In the data transmission device of the present embodiment, detect when mobile terminal and other equipment join by USB port, if due to mobile terminal not unlock screen cause movement to transmit data by MTP, mobile terminal and this other equipment first carry out data transmission by ADB interface, can point out user's unlock screen and periodically detect whether release of screen simultaneously, during Deng mobile terminal unlock screen, according to the total amount of data that will transmit, the speed of the data volume of having transmitted and two kinds of transmission modes is calculated respectively two kinds of follow-up required times of transmission mode and is determined follow-up data transfer mode, thereby guarantee the shortest time of data transmission, farthest save user's time.
The embodiment of the present invention is also corresponding provides a kind of mobile terminal, can comprise the described data transmission device in Fig. 5-8.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, to the schematic statement of above-mentioned term not must for be identical embodiment or example.And, specific features, structure, material or the feature of description can one or more embodiment in office or example in suitable mode combination.In addition,, not conflicting in the situation that, those skilled in the art can carry out combination and combination by the feature of the different embodiment that describe in this instructions or example and different embodiment or example.
In addition, term " first ", " second " be only for describing object, and can not be interpreted as instruction or hint relative importance or the implicit quantity that indicates indicated technical characterictic.Thus, at least one this feature can be expressed or impliedly be comprised to the feature that is limited with " first ", " second ".In description of the invention, the implication of " multiple " is at least two, for example two, and three etc., unless otherwise expressly limited specifically.
Any process of otherwise describing in process flow diagram or at this or method are described and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
The logic and/or the step that in process flow diagram, represent or otherwise describe at this, for example, can be considered to the sequencing list of the executable instruction for realizing logic function, may be embodied in any computer-readable medium, use for instruction execution system, device or equipment (as computer based system, comprise that the system of processor or other can and carry out the system of instruction from instruction execution system, device or equipment instruction fetch), or use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can comprise, device that storage, communication, propagation or transmission procedure use for instruction execution system, device or equipment or in conjunction with these instruction execution systems, device or equipment.The example more specifically (non-exhaustive list) of computer-readable medium comprises following: the electrical connection section (electronic installation) with one or more wirings, portable computer diskette box (magnetic device), random access memory (RAM), ROM (read-only memory) (ROM), the erasable ROM (read-only memory) (EPROM or flash memory) of editing, fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium can be even paper or other the suitable medium that can print described program thereon, because can be for example by paper or other media be carried out to optical scanning, then edit, decipher or process in electronics mode and obtain described program with other suitable methods if desired, be then stored in computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple steps or method can realize with being stored in software or the firmware carried out in storer and by suitable instruction execution system.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: there is the discrete logic for data-signal being realized to the logic gates of logic function, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a kind of computer-readable recording medium, this program, in the time carrying out, comprises step of embodiment of the method one or a combination set of.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing module, can be also that the independent physics of unit exists, and also can be integrated in a module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.If described integrated module realizes and during as production marketing independently or use, also can be stored in a computer read/write memory medium using the form of software function module.
The above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.Although illustrated and described embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, and those of ordinary skill in the art can change above-described embodiment within the scope of the invention, amendment, replacement and modification.

Claims (17)

1. a data transmission method, is characterized in that, comprising:
Detect when mobile terminal is connected by general-purpose serial bus USB port with other equipment, judge whether unlock screen of described mobile terminal;
If not unlock screen of described mobile terminal, with first method and described other equipment transmission datas, wherein said first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal;
When detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method according to the total amount of data that will transmit, transmitted determine with first method and continue transmission data or again transmit data with second method, and wherein said second method is the mode connecting according to media transmission protocol MTP and described other equipment.
2. data transmission method according to claim 1, it is characterized in that, total amount of data that described basis will be transmitted, data volume, the data rate of first method and the data rate of second method transmitted are determined with first method and are continued transmission data or again transmit data with second method, comprising:
Read the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
If the direction of data transmission is for being transferred to described other equipment from described mobile terminal, read in described direction the speed MTPspeed1 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed1 and the described total amount of data that will transmit of described first method transmission;
Calculate with first method and continue the required time T 1 of transmission data and again transmit the required time T of data 2 with second method, wherein T1=(totalsize-finishedsize)/ADBspeed1, T2=totalsize/MTPspeed1;
If T2+errovalue>T1, determine with first method continue transmission data, otherwise determine again transmit data with second method, wherein errovalue is greater than zero, is default error time value.
3. data transmission method according to claim 1, it is characterized in that, total amount of data that described basis will be transmitted, data volume, the data rate of first method and the data rate of second method transmitted are determined with first method and are continued transmission data or again transmit data with second method, comprising:
Read the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
If the direction of data transmission is from described other device transmission to described mobile terminal, read in described direction the speed MTPspeed2 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed2 and the described total amount of data that will transmit of described first method transmission;
Calculate with first method and continue the required time T 3 of transmission data and again transmit the required time T of data 4 with second method, wherein T3=(totalsize-finishedsize)/ADBspeed2, T4=totalsize/MTPspeed2;
If T4+errovalue>T3, determine with first method continue transmission data, otherwise determine again transmit data with second method, wherein errovalue is greater than zero, is default error time value.
4. data transmission method according to claim 1, is characterized in that, described during with first method and described other equipment transmission datas, described in detect that described mobile terminal is before unlock screen, described method also comprises:
Generate information, described information is carried out unlocking screen for reminding user;
Periodically detect whether unlock screen of described mobile terminal.
5. data transmission method according to claim 1, is characterized in that, describedly judges that whether described mobile terminal after unlock screen, and described method also comprises:
If described mobile terminal unlock screen, with second method and described other equipment transmission datas.
6. data transmission method according to claim 1, is characterized in that, describedly judges that whether described mobile terminal before unlock screen, and described method also comprises:
Judge whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data;
If be judged as YES, judge whether unlock screen of described mobile terminal.
7. data transmission method according to claim 6, is characterized in that, described judge whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data after, described method also comprises:
If be judged as NO, with described first method and described other equipment transmission datas.
8. according to the data transmission method described in claim 1-7 any one, it is characterized in that, described and described other equipment transmission datas, comprising:
The data that will transmit are transferred to described other equipment from described mobile terminal; Or,
By the described data that will transmit from described other device transmission to described mobile terminal.
9. a data transmission device, is characterized in that, comprising:
Whether the first judging unit, in the time detecting that mobile terminal is connected by general-purpose serial bus USB port with other equipment, judge described mobile terminal unlock screen;
The first transmission unit, for in the time that described the first judging unit is judged as NO, with first method and described other equipment transmission datas, wherein said first method is the mode connecting by Android debugging bridge ADB interface and described other equipment of described mobile terminal;
Determining unit, for detecting that described mobile terminal is when unlock screen, data volume, the data rate of first method and the data rate of second method according to the total amount of data that will transmit, transmitted determine with first method and continue transmission data or again transmit data with second method, and wherein said second method is the mode connecting according to media transmission protocol MTP and described other equipment.
10. data transmission device according to claim 9, is characterized in that, described determining unit, comprising:
The first reading unit, for reading the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
The second reading unit, being used in the direction of data transmission is while being transferred to described other equipment from described mobile terminal, read in described direction the speed MTPspeed1 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed1 and the described total amount of data that will transmit of described first method transmission;
The first computing unit, continue the required time T 1 of transmission data and again transmit the required time T of data 2 with second method for calculating with first method, wherein T1=(totalsize-finishedsize)/ADBspeed1, T2=totalsize/MTPspeed1;
First determines subelement, for when the T2+errovalue>T1, determines with first method and continues transmission data, otherwise determine and again transmit data with second method, and wherein errovalue is greater than zero, is default error time value.
11. data transmission devices according to claim 9, is characterized in that, described determining unit, comprising:
Third reading is got unit, for reading the total amount of data totalsize that will transmit and the data volume finishedsize having transmitted;
The 4th reading unit, for being from described other device transmission during to described mobile terminal in the direction of data transmission, read in described direction the speed MTPspeed2 that the described total amount of data that will transmit is transmitted with described second method with speed ADBspeed2 and the described total amount of data that will transmit of described first method transmission;
The second computing unit, continue the required time T 3 of transmission data and again transmit the required time T of data 4 with second method for calculating with first method, wherein T3=(totalsize-finishedsize)/ADBspeed2, T4=totalsize/MTPspeed2;
Second determines subelement, for when the T4+errovalue>T3, determines with first method and continues transmission data, otherwise determine and again transmit data with second method, and wherein errovalue is greater than zero, is default error time value.
12. data transmission devices according to claim 9, is characterized in that, described device also comprises:
Tip element, for during with first method and described other equipment transmission datas, detecting that described mobile terminal generates information before unlock screen at described the first transmission unit, described information is carried out unlocking screen for reminding user;
Whether detecting unit, for periodically detecting described mobile terminal unlock screen.
13. data transmission devices according to claim 9, is characterized in that, described device also comprises:
The second transmission unit, for judging that at described the first judging unit whether described mobile terminal after unlock screen, if described mobile terminal unlock screen, with second method and described other equipment transmission datas.
14. data transmission devices according to claim 9, is characterized in that, described device also comprises:
The second judging unit, for judging that at described the first judging unit whether described mobile terminal before unlock screen, judges whether the system of described mobile terminal and the driver of described other equipment meet the requirement with described second method transmission data;
Whether described the first judging unit, specifically in the time that described the second judging unit is judged as YES, judge described mobile terminal unlock screen.
15. data transmission devices according to claim 14, is characterized in that, described the first transmission unit, also in the time that described the second judging unit is judged as NO, with described first method and described other equipment transmission datas.
16. according to the data transmission device described in claim 9-15 any one, it is characterized in that, described and described other equipment transmission datas, comprising:
The data that will transmit are transferred to described other equipment from described mobile terminal; Or,
By the described data that will transmit from described other device transmission to described mobile terminal.
17. 1 kinds of mobile terminals, is characterized in that, comprise the data transmission device as described in claim 9-16 any one.
CN201410386652.3A 2014-08-07 2014-08-07 A kind of data transmission method, device and mobile terminal Active CN104182370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410386652.3A CN104182370B (en) 2014-08-07 2014-08-07 A kind of data transmission method, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410386652.3A CN104182370B (en) 2014-08-07 2014-08-07 A kind of data transmission method, device and mobile terminal

Publications (2)

Publication Number Publication Date
CN104182370A true CN104182370A (en) 2014-12-03
CN104182370B CN104182370B (en) 2017-07-25

Family

ID=51963433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410386652.3A Active CN104182370B (en) 2014-08-07 2014-08-07 A kind of data transmission method, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN104182370B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108296A (en) * 2016-11-24 2018-06-01 腾讯科技(北京)有限公司 A kind of cloud test method, server and client

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708324A (en) * 2012-05-16 2012-10-03 惠州Tcl移动通信有限公司 Screen locker unlocking system and method
CN102999335A (en) * 2012-11-19 2013-03-27 东莞康特尔电子有限公司 Method for clearing Android system passwords
CN103559435A (en) * 2013-10-17 2014-02-05 华为技术有限公司 Method and device for controlling debugging ports of terminal equipment
CN103973437A (en) * 2014-05-19 2014-08-06 广东欧珀移动通信有限公司 Method, device and system for acquiring RSA secret key authorization when terminal is locked

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708324A (en) * 2012-05-16 2012-10-03 惠州Tcl移动通信有限公司 Screen locker unlocking system and method
CN102999335A (en) * 2012-11-19 2013-03-27 东莞康特尔电子有限公司 Method for clearing Android system passwords
CN103559435A (en) * 2013-10-17 2014-02-05 华为技术有限公司 Method and device for controlling debugging ports of terminal equipment
CN103973437A (en) * 2014-05-19 2014-08-06 广东欧珀移动通信有限公司 Method, device and system for acquiring RSA secret key authorization when terminal is locked

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108296A (en) * 2016-11-24 2018-06-01 腾讯科技(北京)有限公司 A kind of cloud test method, server and client
CN108108296B (en) * 2016-11-24 2020-07-28 腾讯科技(北京)有限公司 Cloud testing method, server and client

Also Published As

Publication number Publication date
CN104182370B (en) 2017-07-25

Similar Documents

Publication Publication Date Title
CN106445398B (en) A kind of embedded file system and its implementation based on novel memory devices
CN101432690A (en) Bios configuration update technique
CN103106024A (en) Text input method in touch screen terminal and apparatus therefor
CN103995627A (en) Method and device for detecting capacitive touch screen
CN103365469A (en) Method and device for detecting touch points, touch control drive circuit and touch screen
CN112765082B (en) Multi-host arbitration method, device and readable storage medium
CN104598308A (en) Mode switching control method and device
CN104021101A (en) USB interface system and implementation method based on LPC1768 platform
CN105025350A (en) Play terminal control method and play terminal
CN104932972A (en) Method and apparatus for preventing application from dynamic debugging
CN103324409A (en) Apparatus and method for providing shortcut service in electronic device
EP3264226B1 (en) Pin control method and device
CN104142786A (en) Prompt box display method and terminal
CN103514074A (en) MVB network card development method and platform
CN101739322A (en) Test device and method of embedded system
CN102929817A (en) Heterogeneous model information automatic configuring method based on GPIO (general purpose input/output)
CN114153477A (en) Method, device, system, equipment and medium for upgrading firmware of PCIE (peripheral component interface express) driver card
CN104123165A (en) Application program unloading method and device and mobile terminal
CN104182370A (en) Data transmission method, data transmission device and mobile terminal
CN104123512A (en) Method and device for switching between intelligent secrete key equipment modes
CN105644369A (en) Motor controller, and reset processing method and device thereof
CN102640129B (en) For direct memory access (DMA) device and the method for operating thereof of multiple nucleus system
CN104850417A (en) Method for information processing and electronic equipment
CN111045741A (en) Firmware loading method for flash-memory-free touch screen of intelligent terminal
CN107783793A (en) The method and USB device of automatic identification host operating system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 510623 07, 08A unit, fifteenth floor of agile center, 26 Huaxia Road, Tianhe District, Guangzhou, Guangdong.

Patentee after: Guangzhou cheetah Network Technology Co., Ltd.

Address before: 510623 01-B sixth unit, Guangzhou bank building, 30 Zhujiang East Road, Tianhe District, Guangzhou, Guangdong.

Patentee before: Kingsoft, Guangzhou network technology Co., Ltd

CP03 Change of name, title or address