WO2018039943A1 - 一种数据转移的进度计算方法、装置及系统 - Google Patents

一种数据转移的进度计算方法、装置及系统 Download PDF

Info

Publication number
WO2018039943A1
WO2018039943A1 PCT/CN2016/097420 CN2016097420W WO2018039943A1 WO 2018039943 A1 WO2018039943 A1 WO 2018039943A1 CN 2016097420 W CN2016097420 W CN 2016097420W WO 2018039943 A1 WO2018039943 A1 WO 2018039943A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
time
speed
end device
receiving end
Prior art date
Application number
PCT/CN2016/097420
Other languages
English (en)
French (fr)
Inventor
杨宗军
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201680059732.5A priority Critical patent/CN108139987B/zh
Priority to PCT/CN2016/097420 priority patent/WO2018039943A1/zh
Publication of WO2018039943A1 publication Critical patent/WO2018039943A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method, device, and system for calculating a progress of data transfer.
  • the data transfer process between different communication devices usually includes a process of data generation, a process of data transmission, a process of data reception, and a process of data recovery.
  • the receiving device usually presents a progress indicator to the user during the data transfer process, so as to provide a good waiting expectation for the user.
  • the receiving device usually calculates the data transfer progress by using the "size of the received data / the size of the total data to be received” and displays the progress. In this solution, the accuracy of the data transfer progress calculated by the receiving device using the "size of received data / total size of data to be received" is low.
  • the application provides a method, device and system for calculating the progress of data transfer, which can improve the accuracy of the progress of data transfer.
  • the first aspect provides a method for calculating a progress of data transfer.
  • the receiving device determines the size of the data to be transferred and the to-be-transferred speed at a preset first moment, and the to-be-transferred speed is that the receiving device expects to transfer the data to be transferred.
  • the speed of the data to be transferred is determined by the receiving device to transfer the remaining transfer time of the data to be transferred at the first time according to the size of the data to be transferred and the speed to be transferred.
  • the receiving end device in the present application determines that the receiving end is set at a preset first moment.
  • the size of the data to be transferred and the speed to be transferred need to be transferred to calculate the remaining transfer time of the data to be transferred by the receiving device at the first moment.
  • the receiving end device calculates the remaining transfer time for transferring the data to be transferred at the first time to use the transfer speed, and the to-be-transfer speed is determined by the receiving device at the first moment, and the receiving device predicts to transfer the data to be transferred.
  • Speed therefore, the remaining transfer time calculated by the receiving end device using the speed to be transferred determined at the first moment is more accurate.
  • the speed of the to-be-transfer used by the receiving device at different times is different, that is, the speed of the to-be-transferred is dynamically changed with time, and the remaining transition time determined by the receiving device is also to be transferred. Changes in speed.
  • the preset first time in the embodiment of the present application is one of the at least one preset time, and the first time is also changed according to the change of time. Therefore, using the progress calculation method provided by the embodiment of the present application, The accuracy of the remaining transfer time calculated by the receiving device can be improved, and accordingly, the accuracy of the progress of the data transfer can be improved.
  • the data to be transferred includes data to be received and data to be recovered, where the to-be-transferred speed includes a first speed and a second speed, where the first speed is predicted by the receiving end device.
  • the speed at which the data to be received is received, and the second speed is the speed at which the receiving device expects to recover the data to be recovered.
  • the receiving end device in the present application can simultaneously perform the process of data receiving and the process of data recovery, and can also perform the process of data receiving before performing the process of data recovery. Since the manner in which the receiving end device completes the data transfer is different, in different scenarios, the content of the data to be transferred determined by the receiving end at the first moment is different, and similarly, the receiving end determines at the first moment. The content to be transferred is also different.
  • the speed to be transferred includes a speed at which the receiving end device is expected to receive data to be received (referred to as a first speed).
  • the speed at which the receiving device is expected to recover the data to be recovered (referred to as the second speed), that is, the speed to be transferred includes the first speed and Second speed.
  • the receiving end device determines, at a preset first moment, the size of the data to be transferred and the to-be-transferred speed, including the receiving device determining the size of the data to be received, the first speed, the size of the data to be recovered, and the second speed at the first moment. .
  • the receiving end device determines the first speed at the preset first moment: the receiving end device determines that it is within the first time period. Receiving a size of the first data segment, where the end time of the first time segment is the first time, the data type of the data in the first data segment is the same as the data type of the data to be received, and then, the receiving device is configured according to the first data segment. The size and the first time period determine the first speed.
  • the receiving device determines the second speed at the preset first moment: the receiving device determines that the size of the second data segment is restored in the second time period, and the ending time of the second time period is the first At the moment, the data type of the data in the second data segment is the same as the data type of the data to be restored; then, the receiving device determines the second speed according to the size of the second data segment and the second time period.
  • the first time period in the present application corresponds to a process in which the receiving end device performs data reception
  • the second time period corresponds to a process in which the receiving end device performs data recovery.
  • the length of the first time period or the length of the second time period in the present application may be a preset time length.
  • at least one time period is included in the process of receiving data by the receiving end device, each time period is the same length, and the first time period is one of at least one time period in the data transmission phase.
  • At least one time period is included in the process of recovering data by the receiving device, and each time period has the same length of time
  • the second time period is one of at least one time period in the data recovery phase.
  • the receiving end device in the present application regards the first speed as the speed at which the data to be received is received in the subsequent time. As time changes, the value of the first speed changes. Similarly, after determining the second speed at the first moment, the receiving end device in the present application regards the second speed as the speed at which the data to be recovered is recovered in the subsequent time. It can be seen that the value of the second speed also changes with time.
  • the receiving device determines the first speed at the preset first moment: the receiving device determines that the first data segment is received in the first time period.
  • the end time of the first time period is the first time
  • the data type of the data in the first data segment is the same as the data type of the data to be received
  • the receiving device determines the second speed at the preset first moment: the receiving device determines the data type of the data to be restored, and initializes the second speed according to the data type.
  • the receiving device calculates the receiving device according to the size of the data to be transferred and the to-be-transferred speed.
  • the method for transferring the remaining transfer time of the data to be transferred at the first time includes: receiving, by the receiving device, the remaining receiving time of the receiving device receiving the data to be received at the first time according to the size of the data to be received and the first speed; Calculating, according to the size of the data to be recovered and the second speed, the remaining recovery time of the data to be recovered by the receiving device at the first moment; if the remaining receiving time is greater than the remaining recovery time, the receiving device determines that the remaining receiving time is the remaining transition time; If the remaining recovery time is greater than the remaining reception time, the receiving end device determines that the remaining recovery time is the remaining transfer time; if the remaining receiving time is equal to the remaining recovery time, the receiving device determines whether the remaining receiving time or the remaining recovery time is the remaining transfer time.
  • the receiving end device can simultaneously perform the process of data transmission and the process of data recovery. Therefore, after the receiving end device determines the remaining receiving time and the remaining recovery time, the receiving end device needs to compare the two. The large value is determined as the remaining transfer time. If the remaining reception time and the remaining recovery time are equal, the receiving device arbitrarily selects one of them to determine the remaining transition time.
  • the receiving device is configured according to the data to be transferred.
  • the method for determining the remaining transfer time of the data to be transferred at the first time is determined by the receiving device, and the receiving device calculates the receiving device to receive the first time according to the data to be received and the first speed.
  • the remaining receiving time of the received data the receiving end device calculates, according to the data to be recovered and the second speed, the remaining recovery time of the data recovered by the receiving end device at the first moment; the receiving device sums the remaining receiving time and the remaining recovery time, Determined as the remaining transfer time.
  • the data to be transferred includes data to be received and data to be restored.
  • the second speed determined by the receiving end device is that the receiving end device initializes the defined speed according to the data type of the data to be restored. Since the receiving end device has not started the process of performing data recovery, after the receiving end device determines the remaining receiving time and the remaining recovery time, the receiving end device determines the sum of the two as the remaining transfer time.
  • the data to be transferred only includes data to be recovered, and correspondingly, the to-be-transferred speed includes only the third speed, where the third speed is expected to be restored by the receiving end device.
  • the speed of the data includes data to be recovered, and correspondingly, the to-be-transferred speed includes only the third speed, where the third speed is expected to be restored by the receiving end device. The speed of the data.
  • the application scenario in which the data to be transferred only includes the data to be restored is that the process of data reception has ended, so that only the data to be transferred is left to be recovered, and correspondingly, the speed to be transferred includes only the third speed.
  • the second speed and the third speed in the present application are both used to indicate the speed to be recovered.
  • the second speed in the present application is applied to the scenario that the data to be transferred includes the data to be received and the data to be restored.
  • the third speed is applied to the scenario in which the data to be transferred includes only the data to be recovered.
  • determining, by the receiving end device, the to-be-transferred speed at the preset first moment includes: the receiving end device is preset The first moment determines the third speed.
  • the method for determining, by the receiving end device, the third speed at the preset first moment is: first, the receiving end device determines the size of the third data segment that is restored in the third time period, and the ending time of the third time period.
  • the data type of the data in the third data segment is The data type of the data to be restored is the same; then, the receiving device determines the third speed according to the size of the third data segment and the third time period.
  • the method is: the receiving end device determines the data type of the data to be restored, and then the receiving end device initializes and defines the third speed according to the data type of the data to be restored.
  • the receiving device calculates the receiving device at the first moment according to the size of the data to be transferred and the to-be-transferred speed.
  • the method for transferring the remaining transfer time of the data to be transferred includes: the receiving device calculates the remaining recovery time of the receiving device at the first moment according to the size of the data to be restored and the third speed; and the receiving device determines the remaining recovery time as the remaining transition. time.
  • the remaining recovery time calculated by the receiving device is the remaining transfer time.
  • the third speed may be that the receiving end device initializes the defined speed at the first moment according to the data type of the data to be restored, or may be determined by the receiving end device according to the size of the third data segment and the third time period. The speed of the out.
  • the receiver device in the present application determines that the first speed, the second speed, or the third speed determined by the receiving device is accurate, regardless of the manner in which the receiving device determines the remaining transition time. The accuracy of the remaining transfer time is also higher.
  • the remaining transfer time of the data to be transferred at the first time according to the size of the data to be transferred and the speed to be transferred, It also shows the calculated remaining transfer time.
  • the receiving end device in the present application displays the remaining transfer time to avoid the problem that the receiving end device cannot display the progress of each process in the data transfer independently and cannot display the progress of the data transfer overall.
  • the accuracy of the remaining receiving time and the remaining recovery time determined by the receiving end device by using the progress calculation method provided by the present application is high, the accuracy of the remaining transfer time determined by the receiving device is high, and correspondingly, in the present application, Calculated data transfer The accuracy of the progress is high.
  • the remaining receiving time and the remaining recovery time in the present application all change with time. Therefore, the remaining transition time displayed by the receiving device also changes with time, that is, the remaining transfer displayed by the receiving device. Time is dynamic.
  • a receiving end device comprising a determining unit.
  • each unit module provided by the present application.
  • the functions implemented by each unit module provided by the present application are as follows:
  • the determining unit is configured to determine a size of the to-be-transferred data and a to-be-transferred speed at a preset first time, where the receiving end device is expected to transfer the data to be transferred; according to the to-be-transferred data And the remaining transfer time of the data to be transferred at the first time.
  • the receiving end device in the present application calculates the remaining transfer of the data to be transferred at the first time by the receiving end device by determining the size of the data to be transferred and the speed to be transferred that the receiving device needs to transfer at the preset first time. time.
  • the receiving end device calculates the remaining transfer time for transferring the data to be transferred at the first time to use the transfer speed, and the to-be-transfer speed is determined by the receiving device at the first moment, and the receiving device predicts to transfer the data to be transferred. Speed, therefore, the remaining transfer time calculated by the receiving end device using the speed to be transferred determined at the first moment is more accurate.
  • the data to be transferred includes data to be received and data to be recovered
  • the to-be-transferred speed includes a first speed and a second speed, where the first speed is expected to be received by the receiving end device.
  • the speed at which data is received, and the second speed is the speed at which the receiving device expects to recover the data to be recovered.
  • the determining unit is specifically configured to determine the size of receiving the first data segment in the first time period.
  • the end time of the first time period is the first time, the data type of the data in the first data segment is the same as the data type of the data to be received; determining the first speed according to the size of the first data segment and the first time period, and Specifically for determining to restore the size of the second data segment in the second time period, the second time period.
  • the end time is the first time, the data type of the data in the second data segment is the same as the data type of the data to be restored; and the second speed is determined according to the size of the second data segment and the second time period.
  • the determining unit is specifically configured to determine the size of receiving the first data segment in the first time period.
  • the end time of the first time period is the first time
  • the data type of the data in the first data segment is the same as the data type of the data to be received
  • determining the first speed according to the size of the first data segment and the first time period and Specifically, it is used to determine the data type of the data to be restored
  • the second speed is initialized according to the data type of the data to be restored.
  • the receiving end device further includes a calculating unit, where the calculating unit is configured to: according to the data to be received, the data to be received and the data to be recovered, according to the data to be received The size and the first speed are calculated, and the remaining receiving time of the receiving end device receiving the data to be received at the first time is calculated, and the receiving end device recovers the data to be restored at the first moment according to the size of the data to be restored and the second speed. Remaining recovery time.
  • the determining unit is configured to determine that the remaining receiving time is the remaining if the remaining receiving time calculated by the calculating unit is greater than the remaining recovery time calculated by the calculating unit.
  • the transfer time and specifically, if the remaining recovery time calculated by the calculating unit is greater than the remaining receiving time calculated by the calculating unit, determining that the remaining recovery time is the remaining transfer time, and specifically, if the remaining receiving time is equal to the remaining recovery time, Determine the remaining reception time or remaining recovery time as the remaining transfer time.
  • the calculating unit is configured to: if the data to be transferred includes data to be received and data to be recovered, calculate and receive according to the size of the data to be received and the first speed.
  • the terminal device receives the remaining receiving time of the data to be received at the first moment, and calculates a remaining recovery time of the data recovered by the receiving end device at the first moment according to the size of the data to be recovered and the second speed.
  • the foregoing determining The element is specifically used to determine the sum of the remaining reception time calculated by the above calculation unit and the remaining recovery time calculated by the above calculation unit as the remaining transition time.
  • the data to be transferred includes data to be recovered
  • the to-be-transferred speed includes a third speed, where the third speed is a speed at which the receiving end device is expected to recover data to be restored.
  • the determining unit is specifically configured to determine a size of the third data segment that is restored in the third time period, where the end time of the third time period is the first
  • the data type of the data in the third data segment is the same as the data type of the data to be restored
  • the third speed is determined according to the size of the third data segment and the third time period, and the data type specifically used to determine the data to be restored
  • the third speed is initialized according to the data type of the data to be restored.
  • the calculating unit is configured to: when the data to be transferred includes the data to be restored, calculate the receiving device according to the size of the data to be restored and the third speed. The remaining recovery time of the data to be transferred is restored at a time.
  • the determining unit is specifically configured to determine, as the remaining transition time, the remaining recovery time calculated by the calculating unit.
  • the receiving device further includes a display unit.
  • the display unit is configured to display the remaining transfer time after the determining unit determines that the receiving end device transfers the remaining transfer time of the data to be transferred at the first time.
  • a receiving end device in a third aspect, includes a memory, a processor, a communication interface, and a system bus; the memory, the processor, and the communication interface are respectively connected to the system bus, the memory is used to store computer instructions, and the processor is used by The memory stored computer instructions are executed to cause the receiving device to perform a progress calculation method for data transfer as described in the first aspect above and its various possible implementations.
  • a data transfer system comprising a receiving end device and a transmitting end as described in the second aspect above and various possible implementation manners thereof
  • the device, the receiving device and the transmitting device are connected by wire or wirelessly.
  • the names of the above-mentioned receiving devices are not limited to the devices or the functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of the respective devices or functional modules are similar to the present application, they are within the scope of the claims and their equivalents.
  • FIG. 1 is a schematic structural diagram of a data transfer system according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an interaction protocol of a data transfer system according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart 1 of a method for calculating a progress of data transfer according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart 2 of a method for calculating a progress of data transfer according to an embodiment of the present application
  • FIG. 5 is a schematic flowchart 3 of a method for calculating a progress of data transfer according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram 1 of a receiving end device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram 2 of a receiving end device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram 3 of a receiving end device according to an embodiment of the present disclosure.
  • FIG. 9 is a data transfer system according to an embodiment of the present application.
  • the term “and/or” in the present application is merely an association relationship describing an associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, and A and B exist simultaneously. There are three cases of B alone.
  • the character "/" in the present application generally indicates that the context of the context is an "or" relationship.
  • the embodiment of the present application provides a method for calculating the progress of the data transfer, and the receiving end device determines the data to be transferred that needs to be transferred at the preset first time.
  • the receiving end device in the embodiment of the present application may be a wired terminal or a wireless terminal.
  • the wireless terminal can be a voice and/or data connection that is directed to the user.
  • the wireless terminal can communicate with one or more core networks via a RAN (Radio Access Network).
  • the wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) or a computer with a mobile terminal, or can be a portable, pocket, handheld, computer built-in or in-vehicle mobile device that is connected to the wireless device.
  • Incoming exchange language and/or data for example, PCS (Personal Communication Service) telephone, cordless telephone, Session Initiation Protocol (SIP) telephone, WLL (Wireless Local Loop) station, PDA (Personal) Digital Assistant, personal digital assistant, etc.
  • the wireless terminal may also be referred to as a system, a Subscriber Unit, a Subscriber Station, a Mobile Station, a Mobile, a Remote Station, an Access Point, Remote Terminal, Access Terminal, User Agent, User Device, or User Equipment.
  • FIG. 1 is a schematic structural diagram of a data transfer system according to an embodiment of the present application.
  • the data transfer system includes a first communication device 10 and a second communication device 11.
  • the first communication device 10 and the second communication device 11 are connected by wire or wirelessly.
  • the wireless mode may be any one of NFC and BT.
  • the first communication device 10 in FIG. 1 may be a transmitting end device for data transfer, or may be a receiving end device for data transfer.
  • the second communication device 11 is a receiving device; if the first communication device 10 is a receiving device, the second communication device 11 is a transmitting device.
  • FIG. 1 is a schematic diagram of interaction between a first communication device 10 and a second communication device 11 in a data transfer system according to an embodiment of the present application.
  • the first communication device 10 is a transmitting device
  • the second communication device 11 is a receiving device. Therefore, the first communication device 10 performs a process of data generation and data transmission, and the second communication device 11 performs data reception and data recovery. the process of.
  • the first communication device 10 stores data such as text and media, such as audio, video, images, graphics, graphics, and tables.
  • the data can be classified into DB (Database) data and media according to the data type. Data and application data, etc.
  • the first communication device 10 acquires the data to be transferred, and then divides the data to be transferred of each data type into at least a part of data according to a preset division rule, and according to at least a part of the data. Each part of the data generates a data set. If the first communication device 10 divides the data to be transferred of each data type into at least two parts of data, the first communication device 10 transmits to the second communication device 11 every time a data set is generated, and transmits one of the data sets. At the same time, another data set is generated.
  • the first communication device 10 generates a first data set according to the first part of the at least two pieces of data, and sends the first data set to the second communication device 11, and sends the first data set to the second communication device 11.
  • the second data set is generated according to the second part of the data of the at least two parts, and the second part of the data is the latter part of the data of the first part of the data.
  • the second communication device 11 receives the first data set sent by the first communication device 10, and restores the first data set, and the second communication device 11 receives the first data set while receiving the first data set.
  • the second data set The second communication device 11 continuously collects the data receiving process and the related data in the data recovery process while recovering the first data set and receiving the second data set, and calculates the remaining receiving time and the remaining recovery time according to the collected related data. , thereby determining the remaining transfer time and displaying the remaining transfer time.
  • the first communication device 10 acquires the data to be transferred, and then divides the data to be transferred of each data type into at least a part of data according to a preset division rule, and according to at least a part of the data. Each part of the data generates a data set. After the first communication device 10 generates all of the data sets, the first communication device 10 transmits its generated data set to the second communication device 11 one by one.
  • the second communication device 11 receives the data sets sent by the first communication device 10 one by one, and after receiving all the data sets, the second communication device 11 resumes one by one.
  • the second communication device 11 receives the data set sent by the first communication device 10 one by one, and continuously collects relevant data in the data receiving process, and calculates the remaining receiving time according to the collected related data.
  • the second communication device The remaining recovery time is also predetermined, thereby determining the remaining transfer time based on the remaining reception time and the remaining recovery time, and displaying the remaining transfer time.
  • the related data in the data recovery process is continuously collected, and the remaining recovery time is calculated according to the collected related data, and the remaining recovery time is the remaining transfer.
  • the second communication device 11 displays the remaining transfer time.
  • a method for calculating a progress of data transfer provided by an embodiment of the present application is applicable to a scenario in which data is transferred between communication devices through a near field or a local area network.
  • FIG. 3 is a schematic flowchart of a method for calculating a progress of data transfer according to an embodiment of the present application.
  • the method for calculating the progress of the data transfer may be applied to the data transfer system shown in FIG. 1 or FIG. 2.
  • the transmitting device in the embodiment of the present application is the first communications device 10.
  • the receiving device in the embodiment of the present application is the second communications device 11.
  • the method used by the receiving device in the data transfer system to calculate the progress of the data transfer is the same.
  • the embodiment of the present application uses the data of the first data type to be transferred between the transmitting end device and the receiving end device, and the receiving end device calculates the transfer progress of the data of the first data type as an example for description.
  • the method for calculating the progress of the data transfer includes:
  • the receiving end device determines, according to a preset first moment, a size of the data to be transferred and a to-be-transferred speed.
  • the data to be transferred is the speed at which the receiving device expects to transfer the data to be transferred, and the data type of the data to be transferred is the first data type.
  • the first data type in the embodiment of the present application may be a DB data type, a media data type, or an application data type, which is not specifically limited in this embodiment of the present application.
  • the receiving end device determines, according to the size of the data to be transferred and the speed to be transferred. The receiving end device transfers the remaining transfer time of the data to be transferred at the first moment.
  • the data generation process, the data transmission process, the data receiving process, and the data recovery process included in the data transfer between the receiving device and the transmitting device in the embodiment of the present application may be performed separately or concurrently.
  • the transmitting device sends the generated data set to the receiving device one by one after generating all the data sets.
  • the receiving device receives the data set sent by the sending device one by one. After the receiving device receives all the data sets, the receiving device starts to resume the received data set one by one.
  • the process of data generation, the process of data transmission, the process of data reception, and the process of data recovery are concurrently executed, each time the transmitting device generates a data set, the data set is sent to the receiving device, and the transmitting device is in the direction. While the receiving device sends the data set, another data set is generated. Correspondingly, the receiving end device recovers another data set that the receiving end device has received while receiving a certain data set sent by the sending end device.
  • the receiving end device in the embodiment of the present application can simultaneously perform the data receiving process and the data recovery process, and can also perform the data receiving process and the data recovery process respectively, that is, the receiving end device can be in any one of the following types. status:
  • the receiving end device may determine that the receiving end device still needs to be in the first moment.
  • the receiving device At the first moment, if the receiving device is in the first state, the second state, or the fourth state, it indicates that the data to be transferred that the receiving device needs to transfer at the first moment includes the data to be received and
  • the data to be recovered correspondingly, the speed to be transferred includes a first speed and a second speed, wherein the first speed is a speed at which the receiving end device is expected to receive data to be received, and the second speed is a data expected to be recovered by the receiving end device. speed.
  • the receiving end device in the first state, the second state, or the fourth state determines the size of the data to be received, the size of the data to be restored, the first speed, and the second speed at the first moment.
  • the method for determining, by the receiving device in the foregoing first state and the second state, the first speed is: first, the receiving device determines that it is in the first time period at the first moment The size of the first data segment received, the end time of the first time period is the first time, the data type of the data in the first data segment and the data type of the data to be received are the first data type; then, the receiving The end device determines the first speed according to the size of the first data segment and the first time period.
  • the first time period is a certain time period in which the receiving end device performs the entire data receiving process, and the length of the first time segment may be a preset time length.
  • the preset time length is not specifically limited in this embodiment of the present application. .
  • the process of data receiving in the embodiment of the present application includes at least one time period, and each of the at least one time period has the same length.
  • the size of the data segment received by the receiving device during each time period varies with the rate at which the receiving device receives data during the time period.
  • the method for determining, by the receiving device in the first state, the second speed is: first, the receiving device determines, at the first moment, that the second recovery is completed in the second time period.
  • the size of the data segment, the end time of the second time period is the first time, the data type of the data in the second data segment and the data type of the data to be restored are both the first data type; then, the receiving device is based on the second data
  • the size of the segment and the second time period determine the second speed.
  • the second time period is similar to the first time period, and the only difference is that the second time period is a certain time period in which the receiving end device is in the process of data recovery.
  • the size of the data segment recovered by the receiving device in each time period changes according to the change of the rate at which the receiving device recovers data in the time period.
  • the method for determining, by the receiving device in the second state, the second speed is: the receiving device determines the data type of the data to be restored, that is, determines the first data type, and according to the first data.
  • Type initialization defines the second speed.
  • the receiving end device in the second state described above has not started to recover data, and therefore, the receiving end device can initialize the definition of the second speed and perform calculation using the second speed defined by the initialization.
  • the method for determining, by the receiving end device in the foregoing fourth state, the first speed and the second speed is: the receiving end device determines the data type of the data to be received and the data type of the data to be restored, and The first speed is defined according to the data type of the data to be received, and the second speed is initialized according to the data type of the data to be restored.
  • the data type of the data to be received and the data type of the data to be restored in the embodiment of the present application are all the first data type.
  • the receiving device At the first moment, if the receiving device is in the third state, it indicates that the data to be transferred that the receiving device needs to transfer only includes the data to be recovered at the first moment, and correspondingly, the to-be-transferred speed includes the third speed.
  • the third speed is a speed at which the receiving end device is expected to recover the data to be restored in the scenario that the data to be transferred only includes the data to be restored.
  • the receiving end device in the third state described above determines the size of the data to be restored and the third speed at the first moment.
  • the method for determining, by the receiving end device in the foregoing third state, the third speed may be determined by referring to the receiving device in the first state, the second state, or the fourth state.
  • the second speed method will not be described in detail here.
  • the second speed and the third speed in the embodiment of the present application are both used to indicate the speed to be recovered.
  • the second speed application in the embodiment of the present application includes the data to be received and the data to be restored
  • the third speed is applied to the scenario in which the data to be transferred includes only the data to be restored.
  • the receiving end device determines the size and the required data to be transferred sent by the transmitting end device before determining the size of the data to be transferred and the to-be-transferred speed at the first moment.
  • the type of data to be transferred, wherein the type of data to be transferred is the first data type.
  • the data to be transferred needs to be all data to be transferred between the transmitting device and the receiving device, and the data to be transferred determined by the receiving device belongs to the data to be transferred. It is easy to understand that the size of all data that needs to be received by the receiving device in the whole data receiving process is the same as the size of the data to be transferred. The size of all data that needs to be recovered by the receiving device during the entire data recovery process is also required to be transferred. The size of the data is the same.
  • the size of the data to be transferred sent by the transmitting device to the receiving device is 30 MB (MByte, megabytes), and the size of the data that the receiving device needs to receive during the entire data receiving process is 30 MB.
  • the size of the data to be recovered during data recovery is also 30MB.
  • the receiving end device determines the size of the data to be transferred according to the size of the transferred data and the size of the data to be transferred at the first moment.
  • the method for determining, by the receiving device, the size of the data to be received at the first moment is: the size of the received data and the size of the data to be transferred. , determine the size of the data to be received.
  • the method for determining, by the receiving device, the size of the data to be restored at the first moment is: the size of the data recovered by the receiving device and the size of the data to be transferred. , determine the size of the data to be restored.
  • the receiving device determines the size of the data to be restored at the first moment: the receiving device determines the size of the data to be transferred as the size of the data to be restored. .
  • the size of the data to be received is determined by the receiving device determining the size of the data to be received as the size of the data to be received.
  • the receiving device After determining the size of the data to be transferred and the speed to be transferred, the receiving device calculates the remaining transfer time of the data to be transferred at the first time according to the size of the data to be transferred and the speed to be transferred, that is, the receiving device performs S301. .
  • the receiving device calculates the remaining receiving time of the receiving device at the first moment according to the size of the data to be received and the first speed.
  • the receiving end device calculates the remaining recovery time of the receiving end device at the first moment according to the size of the data to be restored and the second speed. If the remaining reception time is greater than the remaining recovery time, the receiving device determines that the remaining reception time is the remaining transition time. If the remaining recovery time is greater than the remaining reception time, the receiving device determines that the remaining recovery time is the remaining transition time. If the remaining reception time is equal to the remaining recovery time, the receiving device determines whether the remaining reception time or the remaining recovery time is the remaining transition time.
  • the foregoing first state is a scenario in which the process of data transmission and the process of data recovery are concurrently executed. Therefore, after the receiving device determines the remaining receiving time and the remaining recovery time, the larger between the two is selected. The value is used as the remaining transfer time.
  • the receiving device calculates the remaining receiving time of the receiving device at the first moment according to the size of the data to be received and the first speed.
  • the receiving end device calculates the remaining recovery time of the receiving end device at the first moment according to the size of the data to be restored and the second speed.
  • the receiving device determines the sum of the remaining receiving time and the remaining recovery time as the remaining transfer time.
  • the second speed used by the receiving device is initialized according to the data type of the data to be restored.
  • the first speed used by the receiving device is that the receiving device initializes the defined speed according to the data type of the data to be received.
  • the first speed used by the receiving device is the speed determined by the receiving device according to the size of the first data segment and the length of the first time segment.
  • the receiving device calculates the remaining recovery time of the receiving device at the first moment according to the size of the data to be restored and the third speed, and calculates the remaining recovery time. Determined as the remaining transfer time.
  • the to-be-transfer speed in the embodiment of the present application is determined by the receiving end device at the first moment. Therefore, the to-be-transfer speed can represent the speed at which the receiving end device transfers data in real time, and the receiving end device utilizes the to-be-transferred speed. By determining the remaining transfer time, the remaining transfer time can be calculated more accurately, and correspondingly, the accuracy of the progress of the data transfer is improved.
  • the receiving end device determines the remaining transfer time
  • the receiving end device further displays the remaining transfer time.
  • the method further includes:
  • the receiving end device displays the remaining transfer time.
  • the receiving device may indicate the remaining transfer time by using the time information, and may also indicate the remaining transfer time by using a progress bar, and may also indicate the remaining transfer time by combining the time information and the progress bar. This is not specifically limited.
  • the receiving device notifies the user of the current data transfer progress by displaying the remaining transfer time, so as to provide the user with a good waiting expectation.
  • the remaining transfer time displayed by the receiving device can simultaneously display the data receiving process and the data recovery process for the user.
  • the progress of the data transfer shows the user the overall progress of the data transfer, avoiding the problem that the staged independent display cannot present the overall progress.
  • the data generation process, the data transmission process, the data receiving process, and the data recovery process are concurrently executed, and the transmitting device simultaneously executes the data generation process and data.
  • the receiving end device performs the data receiving and data recovery phases at the same time as an example.
  • a method for calculating a progress of data transfer includes:
  • the sending end device receives a data transfer instruction input by the user.
  • the user can complete the data transfer service by using the voice control sender device.
  • the sender device can obtain the data transfer instruction input by the user through the built-in microphone, and the user can also manually operate the sender device to complete the data transfer service. .
  • the data transfer instruction in the embodiment of the present application includes data to be transferred, a type of data to be transferred, and a size of data to be transferred.
  • the sending end device acquires the data to be transferred of the first data type and the size of the data to be transferred.
  • the sending end device may acquire the size of the data to be transferred and the size of the data to be transferred of the first data type.
  • the data of the first data type may be the media data, the data of the DB, or the application data, which is not specifically limited in this embodiment of the present application.
  • the sending end device sends, to the receiving end device, a size of the data to be transferred and a first data type.
  • the receiving end device calculates a total time required to transfer the data to be transferred according to the size of the data to be transferred and the first data type, and displays the total time.
  • a communication connection is established in advance between the transmitting end device and the receiving end device.
  • the receiving end device initializes and defines a first speed and a second speed according to the first data type, where the first speed is a speed at which the receiving end device is expected to receive data to be transferred, and the second speed is that the receiving end device is expected to recover data to be transferred.
  • the speed then, the receiving device calculates the total time required to transfer the data to be transferred according to the size of the data to be transferred, the first speed defined by the initialization, and the second speed defined by the initialization. Finally, the receiving device displays the total time.
  • the receiving end device may use the time information to indicate the total time, and may also use the progress bar to indicate the total time.
  • the total time may be represented by the combination of the time information and the progress bar, which is not specifically limited in this embodiment of the present application.
  • the receiving device When the receiving device performs the data transfer process, by presenting the total time of the data transfer to the user, the user can be informed of the waiting time and provide a good experience for the user.
  • the sending end device divides the data to be transferred into at least a part of data according to a preset dividing rule.
  • the transmitting device divides the data to be transferred into at least a part of data according to a preset dividing rule.
  • the preset division rule may be that the data to be transferred is divided into N parts of equal size, N ⁇ 1, and the data to be transferred is divided into N parts of different sizes, which is not specifically limited in this embodiment.
  • the source device generates a first data set according to the first part of data in at least a part of the data.
  • the sending end device sends the first data set to the receiving end device.
  • the receiving device receives the first data set.
  • the receiving device recovers the first data set.
  • the sending end device generates a second data set according to the second part of the data in the at least part of the data.
  • the sending end device sends the second data set to the receiving end device.
  • the receiving device receives the second data set.
  • the sending end device generates the second data set while transmitting the first data set to the receiving end device, that is, the sending end device simultaneously executes S506 and S509, that is, the transmitting end device concurrently The process of data generation and the process of data transmission.
  • the process of concurrently performing data generation and data transmission by the transmitting device can greatly reduce the waiting time of the transmitting device before sending data, and improve the efficiency of the data transmission performed by the transmitting device.
  • the receiving end device can receive the first data sent by the sending end device. set. After receiving the first data set, the receiving device recovers the first data set.
  • the sender device further sends the size of the first data set and the data type of the data in the first data set to the receiving end device.
  • the sending end device may simultaneously send the first data set, the size of the first data set, and the data type of the data in the first data set to the receiving end device.
  • the receiving device After receiving the first data set, the receiving device performs integrity check on the first data set according to the size of the first data set.
  • the receiving end device in the embodiment of the present application receives the second data set sent by the sending end device while recovering the first data set, that is, the receiving end device simultaneously executes S508 and S511, that is, the receiving end.
  • the device concurrently performs the process of data receiving and the process of data recovery, which can greatly reduce the time for the receiving end device to complete the data transfer cost, and improve the efficiency of the data transfer by the receiving device.
  • the process of data generation, the process of data transmission, the process of data reception, and the concurrent execution of the process of data recovery effectively improve the efficiency of data transfer.
  • S504-S506 and S509-S510 are processes of data generation and data transmission. From the above description, the process of transmitting data concurrently by the transmitting device and the process of data transmission, S507, S508 and S511 is a process of data reception and a process of data recovery. From the above description, the process of data reception and data recovery performed by the receiving device concurrently is known.
  • the receiving end device collects relevant data to determine the first speed and the second speed while performing the process of data reception and the process of data recovery.
  • the receiving end device collects relevant data while receiving the second data set and recovering the first data set, and determines the first speed and the second speed as an example for description.
  • the receiving end device further performs S512 and S513, and the receiving end device further performs S514 and S515 in the process of executing S508.
  • the receiving end device determines, at a first moment, a size of the data to be received and a first speed.
  • the receiving end device determines the remaining according to the size of the data to be received and the first speed. Remaining time.
  • the receiving end device determines, at a first moment, a size of the data to be recovered and a second speed.
  • the receiving end device determines a remaining recovery time according to the size of the data to be restored and the second speed.
  • the receiving device may receive data of the same data type at different times.
  • the receiving end device divides the entire process of receiving the data to be transferred into at least one time period in the time dimension. Each time period corresponds to a certain data segment in a data set.
  • the receiving device determines the size of the first data segment that is received by the receiving device in the first time period, and according to The size of the first data segment and the first time period determine the first speed, such that the receiving end device can regard the first speed as the receiving speed of itself in the process of receiving the data to be received subsequently.
  • the receiving device collects a start time of the first data segment received by the receiving device (referred to as a start receiving time) and a termination time of receiving the first data segment (ie, the first moment) The size of the data that the receiving device has received at the beginning of the receiving time and the size of the data that the receiving device has received at the first time, and uses the collected information to determine the size and the first time of the first data segment. segment.
  • the receiving end device divides the entire process of recovering the data to be transferred into at least one time period in the time dimension. Each time period corresponds to a certain data segment in a data set.
  • the receiving device determines the size of the second data segment that is restored in the second time period, and according to The size of the second data segment and the second time period determine the second speed, such that the receiving end device can regard the second speed as the recovery speed of itself in the process of recovering the data to be restored later.
  • the receiving device collects a start time of the second data segment to be recovered by the receiving device (referred to as a start recovery time), and restores the termination time of the second data segment (ie, the first moment)
  • a start recovery time a start time of the second data segment to be recovered by the receiving device
  • restores the termination time of the second data segment ie, the first moment
  • the size of the data that the receiving device has recovered at the beginning of the recovery time and the size of the data that the receiving device has recovered at the first time uses the collected information to determine the size of the second data segment and the second time period.
  • the receiving device After determining the remaining reception time and the remaining recovery time, the receiving device determines the remaining transition time according to the remaining reception time and the remaining recovery time, that is, after S513 and S515, the receiving device further performs S516.
  • the receiving end device determines the remaining transfer time according to the remaining receiving time and the remaining recovery time, and displays the remaining transfer time.
  • the receiving end device determines that the remaining receiving time is the remaining transition time. If the remaining recovery time is greater than the remaining reception time, the receiving device determines that the remaining recovery time is the remaining transition time. If the remaining recovery time is equal to the remaining reception time, the receiving device determines whether the remaining recovery time or the remaining reception time is the remaining transfer time.
  • the first time period is one of the time periods in the process of data reception
  • the second time period is one of the time periods in the process of data recovery
  • the first time period and the second time period will occur.
  • the change, the first time period and the end time of the second time period are both the first time, and the first time time also changes with time. Therefore, the receiving device collects the time in the embodiment of the present application. The data will also change. At each moment, the receiving end device calculates the remaining receiving time and the remaining recovery time according to the related data collected at the moment, and further, the receiving end device can determine the remaining transition time according to the remaining receiving time and the remaining recovery time.
  • the receiving end device in the embodiment of the present application can determine the speed to be transferred in real time, and determine the remaining transfer time by using the to-be-transferred speed, which not only can provide a good waiting expectation for the user, but also can ensure that the determination is made. The accuracy of the remaining transfer time.
  • the receiving end device in the embodiment of the present application concurrently performs the process of data receiving and the process of data recovery, the entire data transfer process is effectively reduced. The time consumed increases the rate of data transfer.
  • An embodiment of the present application provides a receiving end device, where the receiving end device is configured to perform the steps performed by the receiving end device in the foregoing method.
  • the receiving end device provided by the embodiment of the present application may include a module corresponding to the corresponding step.
  • the embodiment of the present application may divide the function module by the receiving end device according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and may be further divided in actual implementation.
  • FIG. 6 shows a possible structural diagram of the receiving end device involved in the foregoing embodiment, in the case where the respective functional modules are divided by corresponding functions.
  • the receiving end device includes a determining unit 60, a calculating unit 61, and a display unit 62.
  • the determining unit 60 is configured to support the receiving end device to perform S300 in FIG. 4, S512-S516 in FIG. 5;
  • the calculating unit 61 is configured to support the receiving end device to execute S301 in FIG. 4, S503 in FIG. 5;
  • 62 is used to support the receiving end device to perform S302 in FIG. 4, S503 and S516 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • FIG. 7 shows a possible structural diagram of the receiving end device involved in the above embodiment.
  • the receiving end device includes: a processing module 70 and a communication module 71.
  • the processing module 70 is configured to control and control the action of the receiving device.
  • the processing module 70 is configured to support the receiving device to perform S300, S301, and S302 in FIG. 4, and S503, S508, and S512-S516 in FIG. And/or other processes for the techniques described herein.
  • the communication module 71 is configured to support communication between the receiving end device and the transmitting end device.
  • the communication module 71 is configured to support the receiving end device to perform S507 and S511 in FIG. 5.
  • the receiving end device may further include a storage module 72 for storing the recovered data, and may also be used for storing The program code and data of the receiving device.
  • the processing module 70 in the embodiment of the present application may be a processor or a controller, and may be, for example, a CPU (Central Processing Unit) or a DSP (Digital Signal Processor). It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the communication module 71 in the embodiment of the present application may be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 72 can be a memory.
  • the receiving device may further include some output module 73 for displaying a data transfer progress.
  • the processing module 70 is a processor
  • the communication module 71 is a communication interface
  • the storage module 72 is a memory
  • the output module 73 is a display screen
  • the receiving end device according to the embodiment of the present application may be the receiving end device shown in FIG.
  • the receiving device includes a communication interface 80, a processor 81, a memory 82, and a display screen 83.
  • the communication interface 80, the processor 81, the memory 82 and the display screen 83 are connected through the system bus 84, and communication with each other is completed.
  • the receiving device When the receiving device operates, the receiving device performs a progress calculation method of the data transfer of the embodiment shown in any one of FIGS.
  • a specific method for calculating the progress of the data transfer refer to the related description in the embodiment shown in any of the above figures in FIG. 3 to FIG. 5, and details are not described herein again.
  • the memory 82 can be used to store the recovered data, and can also be used to store software programs and application modules.
  • the processor 81 executes various functional applications of the receiving device by running a software program stored in the memory 82 and an application module. data processing.
  • the memory 82 may mainly include a storage program area 820 and an storage data area 821, wherein the storage program area 820 may store an operating system, an application required for at least one function, such as a program for restoring data, and the like; the storage data area 821 may be stored and restored.
  • the data may be stored and restored.
  • the memory 82 may be a ROM (Read-only Memory), or other type of static that can store static information and instructions.
  • ROM Read-only Memory
  • State storage device RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or EEPROM (Electrically Erasable Programmable Read-Only Memory)
  • RAM Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • Memory 82 may be present independently and coupled to processor 81 via system bus 84. Memory 82 can also be integrated with processor 81.
  • the processor 81 is a control center of the receiving device.
  • the processor 81 connects the various portions of the entire receiving end device using various interfaces and lines, and executes the receiving end device by running or executing a software program and/or an application module stored in the memory 82, and calling data stored in the memory 82.
  • the various functions and processing data to provide overall monitoring of the receiving device.
  • the processor 81 may include one or more CPUs, for example, the processor 81 in FIG. 8 includes a CPU 0 and a CPU 1.
  • the system bus 84 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus.
  • the system bus 84 can be divided into an address bus, a data bus, a control bus, and the like. For the sake of clarity in the embodiments of the present application, various buses are illustrated as system bus 84 in FIG.
  • the receiving end device may further include a power source 85 for supplying power to different components of the receiving end device to maintain its operation.
  • the power source 85 may be a built-in battery, such as a common lithium ion battery, a nickel hydride battery, etc., and also includes an external power source that directly supplies power to the receiving device, such as an AC (Alternating Current) adapter.
  • the power source 85 can also be more widely defined, for example, can also include a power management system, a charging system, a power failure detecting circuit, a power converter or an inverter, and a power status indicator. (such as light-emitting diodes), and the generation, management, and distribution of electrical energy with the receiving device Any other components associated.
  • the embodiment of the present application provides a receiving end device, where the receiving end device calculates the size of the data to be transferred and the to-be-transferred speed that the receiving end device needs to transfer at a preset first time, to calculate the receiving end device at the first moment. Transfer the remaining transfer time of the data to be transferred.
  • the receiving end device calculates the remaining transfer time for transferring the data to be transferred at the first time to use the transfer speed, and the to-be-transfer speed is determined by the receiving device at the first moment, and the receiving device predicts to transfer the data to be transferred. Speed, therefore, the remaining transfer time calculated by the receiving end device using the speed to be transferred determined at the first moment is more accurate.
  • the embodiment of the present application further provides a data transfer system.
  • the data transfer system includes the receiving end device and the sending end device, and the transmitting end device and the receiving end device are wired. Way or wireless connection.
  • the embodiment of the present application provides a data transfer system, where the receiving end device calculates the receiving by determining the size of the data to be transferred and the to-be-transferred speed that the receiving device needs to transfer at a preset first time.
  • the end device transfers the remaining transfer time of the data to be transferred at the first moment.
  • the receiving end device calculates the remaining transfer time for transferring the data to be transferred at the first time to use the transfer speed, and the to-be-transfer speed is determined by the receiving device at the first moment, and the receiving device predicts to transfer the data to be transferred.
  • Speed therefore, the remaining transfer time calculated by the receiving end device using the speed to be transferred determined at the first moment is more accurate.
  • the disclosed system, mobile device and method may be implemented in other manners.
  • the mobile device embodiments described above are merely illustrative.
  • the division of the modules or units is only one logical function division.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, mobile device or unit, and may be in electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

本申请的实施例提供一种数据转移的进度计算方法、装置及系统,涉及通信领域,能够提高数据转移的进度的准确率。该数据转移的进度计算方法包括:在预设的第一时刻确定待转移数据的大小和待转移速度,待转移速度为接收端设备预计转移待转移数据的速度;接收端设备根据待转移数据的大小和待转移速度,确定接收端设备在第一时刻转移待转移数据的剩余转移时间。

Description

一种数据转移的进度计算方法、装置及系统 技术领域
本申请涉及通信技术领域,尤其涉及一种数据转移的进度计算方法、装置及系统。
背景技术
随着通信技术的快速发展,通过有线方式连接或者通过NFC(Near Field Communication,近距离无线通讯技术)、BT(BitTorrent,比特流)等无线方式连接的不同的通信设备之间进行数据转移已成为一种便捷、流行的数据业务方式。不同的通信设备之间的数据转移过程通常包括数据生成的过程、数据发送的过程、数据接收的过程和数据恢复的过程。
一般情况下,接收端设备在数据转移过程中通常会呈现给用户一个进度展示,以便为用户提供一个良好的等待预期。目前,接收端设备通常采用“已接收数据的大小/总的待接收数据的大小”的方式来计算数据转移进度,并显示该进度。该方案中,接收端设备利用“已接收数据的大小/总的待接收数据的大小”计算出的数据转移进度的准确率较低。
发明内容
本申请提供一种数据转移的进度计算方法、装置及系统,能够提高数据转移的进度的准确率。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供一种数据转移的进度计算方法,首先,接收端设备在预设的第一时刻确定待转移数据的大小和待转移速度,待转移速度为该接收端设备预计转移待转移数据的速度;然后,接收端设备根据待转移数据的大小和待转移速度,确定该接收端设备在第一时刻转移待转移数据的剩余转移时间。
本申请中的接收端设备通过确定在预设的第一时刻该接收端设 备需要转移的待转移数据的大小和待转移速度,来计算该接收端设备在第一时刻转移待转移数据的剩余转移时间。由于接收端设备计算其在第一时刻转移待转移数据的剩余转移时间采用的是待转移速度,而待转移速度是接收端设备在第一时刻确定出的该接收端设备预计转移待转移数据的速度,因此,接收端设备利用第一时刻确定出的待转移速度计算出的剩余转移时间较为准确。
实际应用中,接收端设备在不同时刻所采用的待转移速度是不同的,即随着时间的变化,待转移速度是动态变化的,接收端设备确定出的剩余转移时间也会随着待转移速度的变化而变化。采用这种方法,接收端设备在每一时刻确定出的剩余转移时间的准确率较高。本申请实施例中的预设的第一时刻为至少一个预设时刻中的其中一个,随着时间的变化,第一时刻也会发生变化,因此,采用本申请实施例提供的进度计算方法,能够提高接收端设备计算出的剩余转移时间的准确率,相应的,能够提高数据转移的进度的准确率。
可选的,在本申请的一种可能的实现方式中,上述待转移数据包括待接收数据和待恢复数据,上述待转移速度包括第一速度和第二速度,第一速度为接收端设备预计接收待接收数据的速度,第二速度为接收端设备预计恢复待恢复数据的速度。
本申请中的接收端设备可以同时执行数据接收的过程和数据恢复的过程,也可以先执行数据接收的过程,再执行数据恢复的过程。由于接收端设备完成数据转移所采用的方式不同,因此,在不同场景中,接收端在第一时刻确定出的待转移数据所包括的内容不同,同理,接收端在第一时刻确定出的待转移速度所包括的内容也不同。
可选的,在本申请的另一种可能的实现方式中,若待转移数据包括待接收数据和待恢复数据,则待转移速度包括接收端设备预计接收待接收数据的速度(简称第一速度)和接收端设备预计恢复待恢复数据的速度(简称第二速度),即待转移速度包括第一速度和 第二速度。这样,接收端设备在预设的第一时刻确定待转移数据的大小和待转移速度包括接收端设备在第一时刻确定待接收数据的大小、第一速度、待恢复数据的大小和第二速度。
可选的,不论接收端设备是否同时执行数据接收的过程和数据恢复的过程,接收端设备在预设的第一时刻确定第一速度的方法为:接收端设备确定其在第一时间段内接收第一数据片段的大小,第一时间段的结束时刻为第一时刻,第一数据片段中数据的数据类型与待接收数据的数据类型相同,然后,该接收端设备根据第一数据片段的大小和第一时间段,确定第一速度。相应的,接收端设备在预设的第一时刻确定第二速度的方法为:接收端设备确定其在第二时间段内恢复第二数据片段的大小,第二时间段的结束时刻为第一时刻,第二数据片段中数据的数据类型与待恢复数据的数据类型相同;然后,接收端设备根据第二数据片段的大小和第二时间段,确定第二速度。
本申请中的第一时间段与接收端设备执行数据接收的过程相对应,第二时间段与接收端设备执行数据恢复的过程相对应。其中,本申请中的第一时间段的长度或者第二时间段的长度均可以为预设时间长度。优选的,在接收端设备接收数据的过程中包括至少一个时间段,每一时间段的长度均相同,第一时间段为数据传输阶段中的至少一个时间段中的其中一个。在接收端设备恢复数据的过程中包括至少一个时间段,每一时间段的时间长度均相同,第二时间段为数据恢复阶段中的至少一个时间段中的其中一个。
本申请中的接收端设备在第一时刻确定出第一速度后,将第一速度视为自身在后续时间内接收待接收数据的速度。随着时间的变化,第一速度的数值会发生变化。同理,本申请中的接收端设备在第一时刻确定出第二速度后,将第二速度视为自身在后续时间内恢复待恢复数据的速度。可以看出,随着时间的变化,第二速度的数值也会发生变化。
可选的,在本申请的另一种可能的实现方式中,不论接收端设 备是否同时执行数据传输的过程和数据恢复的过程,接收端设备在预设的第一时刻确定第一速度的方法为:接收端设备确定其在第一时间段内接收第一数据片段的大小,第一时间段的结束时刻为第一时刻,第一数据片段中数据的数据类型与待接收数据的数据类型相同,然后,该接收端设备根据第一数据片段的大小和第一时间段,确定第一速度。接收端设备在预设的第一时刻确定第二速度的方法为:接收端设备确定待恢复数据的数据类型,并根据该数据类型,初始化定义第二速度。
容易理解的是,不论接收端设备是否同时执行数据传输的过程和数据恢复的过程,若接收端设备在还未开始执行数据恢复的过程,则该接收端设备初始化定义第二速度。
可选的,在本申请的另一种可能的实现方式中,若待转移数据包括待接收数据和待恢复数据,则接收端设备根据待转移数据的大小和待转移速度,计算接收端设备在第一时刻转移待转移数据的剩余转移时间的方法,包括:接收端设备根据待接收数据的大小和第一速度,计算接收端设备在第一时刻接收待接收数据的剩余接收时间;接收端设备根据待恢复数据的大小和第二速度,计算接收端设备在第一时刻恢复待恢复数据的剩余恢复时间;若剩余接收时间大于剩余恢复时间,则接收端设备确定剩余接收时间为剩余转移时间;若剩余恢复时间大于剩余接收时间,则接收端设备确定剩余恢复时间为剩余转移时间;若剩余接收时间等于剩余恢复时间,则接收端设备确定剩余接收时间或剩余恢复时间为剩余转移时间。
可以理解的是,接收端设备可同时执行数据传输的过程和数据恢复的过程,因此,在接收端设备确定出剩余接收时间和剩余恢复时间后,该接收端设备需将二者之间的较大值确定为剩余转移时间。若剩余接收时间和剩余恢复时间相等,则该接收端设备任意选取其中一个确定为剩余转移时间。
可选的,在本申请的另一种可能的实现方式中,若待转移数据包括待接收数据和待恢复数据,则接收端设备根据待转移数据的大 小和待转移速度,确定该接收端设备在第一时刻转移待转移数据的剩余转移时间的方法,包括:接收端设备根据待接收数据和第一速度,计算接收端设备在第一时刻接收待接收数据的剩余接收时间;接收端设备根据待恢复数据和第二速度,计算接收端设备在第一时刻恢复待恢复数据的剩余恢复时间;接收端设备将剩余接收时间和剩余恢复时间之和,确定为剩余转移时间。
可以理解的是,在接收端设备已开始执行数据接收的过程,且未开始执行数据恢复的过程的应用场景中,待转移数据包括待接收数据和待恢复数据。在这种应用场景中,由于接收端设备还未开始执行数据恢复的过程,因此,接收端设备确定的第二速度为该接收端设备根据待恢复数据的数据类型初始化定义的速度。由于接收端设备还未开始执行数据恢复的过程,因此,在接收端设备确定出剩余接收时间和剩余恢复时间之后,该接收端设备将二者之和确定为剩余转移时间。
可选的,在本申请的另一种可能的实现方式中,待转移数据仅仅包括待恢复数据,相应的,待转移速度仅仅包括第三速度,该第三速度为接收端设备预计恢复待恢复数据的速度。
上述待转移数据仅仅包括待恢复数据的应用场景为数据接收的过程已经结束,这样,待转移数据就只剩待恢复数据,相应的,待转移速度只包括第三速度。需要说明的是,本申请中的第二速度和第三速度均用于表示待恢复速度,为了便于理解,本申请中的第二速度应用于待转移数据包括待接收数据和待恢复数据的场景,第三速度应用于待转移数据仅仅包括待恢复数据的场景。
可选的,在本申请的另一种可能的实现方式中,若待转移数据仅仅包括待恢复数据,则接收端设备在预设的第一时刻确定待转移速度包括:接收端设备在预设的第一时刻确定第三速度。具体的,接收端设备在预设的第一时刻确定第三速度的方法为:首先,接收端设备确定在第三时间段内恢复完成的第三数据片段的大小,第三时间段的结束时刻为第一时刻,第三数据片段中数据的数据类型与 待恢复数据的数据类型相同;然后,接收端设备根据第三数据片段的大小和第三时间段,确定第三速度。或者,该方法为:接收端设备确定待恢复数据的数据类型,然后,该接收端设备根据待恢复数据的数据类型,初始化定义第三速度。
可选的,在本申请的另一种可能的实现方式中,若待转移数据仅仅包括待恢复数据,则接收端设备根据待转移数据的大小和待转移速度,计算接收端设备在第一时刻转移待转移数据的剩余转移时间的方法包括:接收端设备根据待恢复数据的大小和第三速度,计算接收端设备在第一时刻的剩余恢复时间;接收端设备将剩余恢复时间确定为剩余转移时间。
可以理解的是,若数据传输的过程已经结束,则接收端设备计算出的剩余恢复时间即为剩余转移时间。这种应用场景中,第三速度可以为接收端设备根据待恢复数据的数据类型,在第一时刻初始化定义的速度,也可以为接收端设备根据第三数据片段的大小和第三时间段确定出的速度。
不论接收端设备是采用哪一种方式确定剩余转移时间,由于本申请中接收端设备确定出的第一速度、第二速度或第三速度较为准确,因此,本申请中的接收端设备确定出的剩余转移时间的准确率也较高。
可选的,在本申请的另一种可能的实现方式中,接收端设备在根据待转移数据的大小和待转移速度,计算接收端设备在第一时刻转移待转移数据的剩余转移时间之后,还显示其计算出的剩余转移时间。
本申请中的接收端设备显示剩余转移时间能够避免接收端设备独立显示数据转移中各个过程的进度而导致的无法整体显示数据转移进度的问题。
由于接收端设备采用本申请提供的进度计算方法确定的剩余接收时间和剩余恢复时间的准确率较高,因此,接收端设备确定出的剩余转移时间的准确率较高,相应的,本申请中计算的数据转移的 进度的准确率较高。
此外,本申请中的剩余接收时间和剩余恢复时间均随着时间的变化而变化,因此,接收端设备显示的剩余转移时间也会随着时间的变化而变化,即接收端设备显示的剩余转移时间是动态变化的。
第二方面,提供一种接收端设备,该接收端设备包括确定单元。
具体的,本申请提供的各个单元模块所实现的功能具体如下:
上述确定单元用于在预设的第一时刻确定待转移数据的大小和待转移速度,所述待转移速度为所述接收端设备预计转移所述待转移数据的速度;根据所述待转移数据的大小和所述待转移速度,确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间。
本申请中的接收端设备通过确定在预设的第一时刻该接收端设备需要转移的待转移数据的大小和待转移速度,来计算该接收端设备在第一时刻转移待转移数据的剩余转移时间。由于接收端设备计算其在第一时刻转移待转移数据的剩余转移时间采用的是待转移速度,而待转移速度是接收端设备在第一时刻确定出的该接收端设备预计转移待转移数据的速度,因此,接收端设备利用第一时刻确定出的待转移速度计算出的剩余转移时间较为准确。
可选的,在本申请的一种可能的实现方式中,待转移数据包括待接收数据和待恢复数据,待转移速度包括第一速度和第二速度,第一速度为接收端设备预计接收待接收数据的速度,第二速度为接收端设备预计恢复待恢复数据的速度。
可选的,在本申请的另一种可能的实现方式中,若待转移数据包括待接收数据和待恢复数据,上述确定单元具体用于确定在第一时间段内接收第一数据片段的大小,第一时间段的结束时刻为第一时刻,第一数据片段中数据的数据类型与待接收数据的数据类型相同;根据第一数据片段的大小和第一时间段,确定第一速度,以及具体用于确定在第二时间段内恢复第二数据片段的大小第二时间段 的结束时刻为第一时刻,第二数据片段中数据的数据类型与待恢复数据的数据类型相同;根据第二数据片段的大小和第二时间段,确定第二速度。
可选的,在本申请的另一种可能的实现方式中,若待转移数据包括待接收数据和待恢复数据,上述确定单元具体用于确定在第一时间段内接收第一数据片段的大小,第一时间段的结束时刻为第一时刻,第一数据片段中数据的数据类型与待接收数据的数据类型相同;根据第一数据片段的大小和第一时间段,确定第一速度,以及具体用于确定待恢复数据的数据类型;根据待恢复数据的数据类型,初始化定义第二速度。
可选的,在本申请的另一种可能的实现方式中,接收端设备还包括计算单元,该计算单元,用于若待转移数据包括待接收数据和待恢复数据,则根据待接收数据的大小和第一速度,计算接收端设备在第一时刻接收待接收数据的剩余接收时间,以及用于根据待恢复数据的大小和第二速度,计算接收端设备在第一时刻恢复待恢复数据的剩余恢复时间。
可选的,在本申请的另一种可能的实现方式中,上述确定单元,具体用于若上述计算单元计算的剩余接收时间大于上述计算单元计算的剩余恢复时间,则确定剩余接收时间为剩余转移时间,以及具体用于若上述计算单元计算的剩余恢复时间大于上述计算单元计算的剩余接收时间,则确定剩余恢复时间为剩余转移时间,以及具体用于若剩余接收时间等于剩余恢复时间,则确定剩余接收时间或剩余恢复时间为剩余转移时间。
可选的,在本申请的另一种可能的实现方式中,上述计算单元,用于若待转移数据包括待接收数据和待恢复数据,则根据待接收数据的大小和第一速度,计算接收端设备在第一时刻接收待接收数据的剩余接收时间,以及用于根据待恢复数据的大小和第二速度,计算接收端设备在第一时刻恢复待恢复数据的剩余恢复时间。
可选的,在本申请的另一种可能的实现方式中,上述确定单 元,具体用于将上述计算单元计算的剩余接收时间和上述计算单元计算的剩余恢复时间之和,确定为剩余转移时间。
可选的,在本申请的另一种可能的实现方式中,待转移数据包括待恢复数据,上述待转移速度包括第三速度,该第三速度为接收端设备预计恢复待恢复数据的速度。
可选的,在本申请的另一种可能的实现方式中,上述确定单元具体用于确定在第三时间段内恢复完成的第三数据片段的大小,第三时间段的结束时刻为第一时刻,第三数据片段中数据的数据类型与待恢复数据的数据类型相同,根据第三数据片段的大小和第三时间段,确定第三速度,以及具体用于确定待恢复数据的数据类型,根据待恢复数据的数据类型,初始化定义第三速度。
可选的,在本申请的另一种可能的实现方式中,上述计算单元,用于若待转移数据包括待恢复数据,则根据待恢复数据的大小和第三速度,计算接收端设备在第一时刻恢复待转移数据的剩余恢复时间。
可选的,在本申请的另一种可能的实现方式中,上述确定单元,具体用于将上述计算单元计算的剩余恢复时间确定为剩余转移时间。
可选的,在本申请的另一种可能的实现方式中,接收端设备还包括显示单元,
上述显示单元,用于在上述确定单元确定出接收端设备在第一时刻转移待转移数据的剩余转移时间之后,显示剩余转移时间。
第三方面,提供一种接收端设备,该接收端设备包括存储器、处理器、通信接口和系统总线;存储器、处理器和通信接口分别与系统总线连接,存储器用于存储计算机指令,处理器用于执行存储器存储的计算机指令,以使接收端设备执行如上述第一方面及其各种可能的实现方式所描述的数据转移的进度计算方法。
第四方面,提供一种数据转移系统,该数据转移系统包括如上述第二方面及其各种可能的实现方式所述的接收端设备以及发送端 设备,接收端设备与发送端设备之间通过有线方式或无线方式连接。
在本申请中,上述接收端设备的名字对设备或功能模块本身不构成限定,在实际实现中,这些设备或功能模块可以以其他名称出现。只要各个设备或功能模块的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。
本申请第二方面、第三方面、第四方面及其各种可能的实现方式的具体描述,可以参考第一方面及其各种实现方式中的详细描述;并且,第二方面、第三方面、第四方面及其各种实现方式的有益效果,可以参考第一方面及其各种实现方式中的有益效果分析,此处不再赘述。
本申请的这些方面或其他方面在以下的描述中会更加简明易懂。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例。
图1为本申请实施例提供的数据转移系统的结构示意图;
图2为本申请实施例提供的数据转移系统的交互协议示意图;
图3为本申请实施例提供的数据转移的进度计算方法的流程示意图一;
图4为本申请实施例提供的数据转移的进度计算方法的流程示意图二;
图5为本申请实施例提供的数据转移的进度计算方法的流程示意图三;
图6为本申请实施例提供的接收端设备的结构示意图一;
图7为本申请实施例提供的接收端设备的结构示意图二;
图8为本申请实施例提供的接收端设备的结构示意图三;
图9为本申请实施例提供的数据转移系统。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于限定特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、接口、技术之类的具体细节,以便透切理解本申请。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的移动设备、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
另外,本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中字符“/”,一般表示前后关联对象是一种“或”的关系。
针对现有技术中数据转移的进度的准确率较低的问题,本申请实施例提供一种数据转移的进度计算方法,接收端设备通过确定其在预设的第一时刻需转移的待转移数据的大小和该接收端设备预计转移待转移数据的待转移速度,来确定该接收端设备在第一时刻转移待转移数据的剩余转移时间。由于待转移速度是该接收端设备在第一时刻确定的,因此,接收端设备在第一时刻确定出的剩余转移时间较为准确,相应的,数据转移的进度的准确率较高。
其中,本申请实施例中的接收端设备可以是有线终端也可以是无线终端。无线终端可以是指向用户提供语音和/或数据连通性的 设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。无线终端可以经RAN(Radio Access Network,无线接入网)与一个或多个核心网进行通信。无线终端可以是移动终端,如移动电话(或称为“蜂窝”电话)或具有移动终端的计算机,也可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据,例如,PCS(Personal Communication Service,个人通信业务)电话、无绳电话、会话发起协议(SIP)话机、WLL(Wireless Local Loop,无线本地环路)站、PDA(Personal Digital Assistant,个人数字助理)等设备。无线终端还可以称为系统、订户单元(Subscriber Unit)、订户站(Subscriber Station),移动站(Mobile Station)、移动台(Mobile)、远程站(Remote Station)、接入点(Access Point)、远程终端(Remote Terminal)、接入终端(Access Terminal)、用户代理(User Agent)、用户设备(User Device)、或用户装备(User Equipment)。
本申请实施例提供的数据转移的进度计算方法应用于数据转移系统。图1是本申请实施例提供的数据转移系统的结构示意图。参见图1,该数据转移系统包括第一通信设备10和第二通信设备11。第一通信设备10与第二通信设备11之间通过有线方式或者无线方式连接。
其中,无线方式可以是NFC和BT中的任意一种。
需要说明的是,图1中的第一通信设备10可以为数据转移的发送端设备,也可以是数据转移的接收端设备。相应的,若第一通信设备10为发送端设备,则第二通信设备11为接收端设备;若第一通信设备10为接收端设备,则第二通信设备11为发送端设备。
结合图1,图2是本申请实施例提供的数据转移系统中第一通信设备10和第二通信设备11之间的交互协作示意图。图2中第一通信设备10为发送端设备,第二通信设备11为接收端设备,因此,第一通信设备10执行数据生成和数据发送的过程,第二通信设备11执行数据接收和数据恢复的过程。
如图2所示,第一通信设备10中存储有文本和媒体等数据,例如音频、视频、图像、图表、图示和表格等,这些数据按照数据类型可分为DB(Database)数据、媒体数据和应用数据等。
可选的,第一通信设备10在检测到用户输入的转移指令后,获取待转移数据,然后按照预设划分规则将每一数据类型的待转移数据划分为至少一部分数据,并根据至少一部分数据中的每一部分数据生成一个数据集合。若第一通信设备10将每一数据类型的待转移数据划分为至少两部分数据,则第一通信设备10每生成一个数据集合就向第二通信设备11发送,且在发送其中一个数据集合的同时,生成另一数据集合。具体的,第一通信设备10根据至少两部分数据中的第一部分数据生成第一数据集合,并向第二通信设备11发送第一数据集合,且在向第二通信设备11发送第一数据集合的同时,根据至少两部分数据中的第二部分数据生成第二数据集合,第二部分数据为第一部分数据的后一部分数据。
相应的,第二通信设备11接收第一通信设备10发送的第一数据集合,并恢复第一数据集合,且第二通信设备11在恢复第一数据集合的同时,接收第一通信设备10发送的第二数据集合。第二通信设备11在恢复第一数据集合和接收第二数据集合的同时,还持续的采集数据接收过程和数据恢复过程中的相关数据,并根据采集的相关数据计算剩余接收时间和剩余恢复时间,从而确定剩余转移时间,并显示剩余转移时间。
可选的,第一通信设备10在检测到用户输入的转移指令后,获取待转移数据,然后按照预设划分规则将每一数据类型的待转移数据划分为至少一部分数据,并根据至少一部分数据中的每一部分数据生成一个数据集合。在第一通信设备10将所有数据集合生成后,第一通信设备10逐一向第二通信设备11发送其生成的数据集合。
相应的,第二通信设备11逐一接收第一通信设备10发送的数据集合,并在接收完所有数据集合后,第二通信设备11逐一恢复其 接收到的数据集合。第二通信设备11在逐一接收第一通信设备10发送的数据集合的同时,还持续的采集数据接收过程中的相关数据,并根据采集的相关数据计算剩余接收时间,此时,第二通信设备还预确定剩余恢复时间,从而根据剩余接收时间和剩余恢复时间确定剩余转移时间,并显示剩余转移时间。此外,第二通信设备11在逐一恢复其接收到的数据集合的同时,还持续的采集数据恢复过程中的相关数据,并根据采集的相关数据计算剩余恢复时间,该剩余恢复时间即为剩余转移时间,第二通信设备11显示该剩余转移时间。
本申请实施例提供的一种数据转移的进度计算方法,适用于通信设备之间通过近场或局域网进行数据转移的场景中。
图3为本申请实施例提供的一种数据转移的进度计算方法的流程示意图,该数据转移的进度计算方法可以应用在图1或图2所示的数据转移系统中。结合图2,本申请实施例中的发送端设备为第一通信设备10,本申请实施例中的接收端设备为第二通信设备11。对于每一种数据类型的数据而言,数据转移系统中的接收端设备计算数据转移的进度所采用的方法均相同。为了方便理解,本申请实施例以发送端设备与接收端设备之间转移第一数据类型的数据,接收端设备计算第一数据类型的数据的转移进度为例进行说明。
参见图3,该数据转移的进度计算方法包括:
S300、接收端设备在预设的第一时刻确定待转移数据的大小和待转移速度。
其中,待转移速度为接收端设备预计转移待转移数据的速度,待转移数据的数据类型为第一数据类型。
可选的,本申请实施例中的第一数据类型可以为DB数据类型,也可以为媒体数据类型,还可以为应用数据类型,本申请实施例对此不作具体限定。
S301、接收端设备根据待转移数据的大小和待转移速度,确定 接收端设备在第一时刻转移待转移数据的剩余转移时间。
本申请实施例中的接收端设备与发送端设备之间的数据转移包括的数据生成的过程、数据发送的过程、数据接收的过程和数据恢复的过程可以分别独立执行,也可以为并发执行。
若数据生成的过程、数据发送的过程、数据接收的过程和数据恢复的过程分别独立执行,则发送端设备在生成所有数据集合后,向接收端设备逐一发送其生成的数据集合。相应的,接收端设备逐一接收发送端设备发送的数据集合。在接收端设备接收完所有数据集合后,该接收端设备再开始逐一恢复其接收到的数据集合。
若数据生成的过程、数据发送的过程、数据接收的过程和数据恢复的过程并发执行,则发送端设备每生成一个数据集合,就会向接收端设备发送该数据集合,且发送端设备在向接收端设备发送该数据集合的同时,生成另一数据集合。相应的,接收端设备在接收发送端设备发送的某一数据集合的同时,恢复该接收端设备已经接收到的另一数据集合。
可以看出,本申请实施例中的接收端设备可以同时执行数据接收的过程和数据恢复的过程,也可以分别执行数据接收的过程和数据恢复的过程,即接收端设备可以处于以下任意一种状态:
(1)、接收端设备同时执行数据接收的过程和数据恢复的过程。
(2)、接收端设备执行数据接收的过程,数据恢复的过程还未开始。
(3)、接收端设备执行数据恢复的过程,数据接收的过程已经结束。
(4)、接收端设备均未开始执行数据接收的过程和数据恢复的过程。
在第一时刻,不论接收端设备处于上述哪一种状态,接收端设备在与发送端设备之间进行数据转移的过程中,接收端设备均可确定出在第一时刻该接收端设备仍需转移的待转移数据的大小和待转 移速度,即接收端设备执行S300。
在第一时刻,若接收端设备处于上述第一种状态、上述第二种状态或上述第四种状态,则说明在第一时刻,该接收端设备需要转移的待转移数据包括待接收数据和待恢复数据,相应的,待转移速度包括第一速度和第二速度,其中,第一速度为该接收端设备预计接收待接收数据的速度,第二速度为该接收端设备预计恢复待恢复数据的速度。
具体的,处于上述第一种状态、上述第二种状态或上述第四种状态的接收端设备在第一时刻确定待接收数据的大小、待恢复数据的大小、第一速度和第二速度。
可选的,在第一时刻,处于上述第一种状态和上述第二种状态的接收端设备确定第一速度的方法为:首先,该接收端设备在第一时刻确定其在第一时间段内接收到的第一数据片段的大小,第一时间段的结束时刻为第一时刻,第一数据片段中数据的数据类型与待接收数据的数据类型均为第一数据类型;然后,该接收端设备根据第一数据片段的大小和第一时间段,确定第一速度。
其中,第一时间段为该接收端设备执行整个数据接收的过程中的某一时间段,第一时间段的长度可以为预设时间长度,本申请实施例对该预设时间长度不作具体限定。
优选的,本申请实施例中的数据接收的过程中包括至少一个时间段,至少一个时间段中的每个时间段的长度均相同。每一时间段内接收端设备接收到的数据片段的大小随着该时间段内接收端设备接收数据的速率的变化而变化。
可选的,在第一时刻,处于上述第一种状态的接收端设备确定第二速度的方法为:首先,该接收端设备在第一时刻确定其在第二时间段内恢复完成的第二数据片段的大小,第二时间段的结束时刻为第一时刻,第二数据片段中数据的数据类型与待恢复数据的数据类型均为第一数据类型;然后,该接收端设备根据第二数据片段的大小和第二时间段,确定第二速度。
其中,第二时间段与上述第一时间段类似,唯一不同的是第二时间段为接收端设备处于整个数据恢复的过程中的某一时间段。
同理,每一时间段内接收端设备恢复完成的数据片段的大小随着该时间段内接收端设备恢复数据的速率的变化而变化。
可选的,在第一时刻,处于上述第二种状态的接收端设备确定第二速度的方法为:接收端设备确定待恢复数据的数据类型,即确定第一数据类型,并根据第一数据类型,初始化定义第二速度。
可以理解的是,处于上述第二种状态的接收端设备还未开始恢复数据,因此,接收端设备可初始化定义第二速度,并利用初始化定义的第二速度进行计算。
可选的,在第一时刻,处于上述第四种状态的接收端设备确定第一速度和第二速度的方法为:接收端设备确定待接收数据的数据类型和待恢复数据的数据类型,并根据待接收数据的数据类型初始化定义第一速度,根据待恢复数据的数据类型初始化定义第二速度。其中,本申请实施例中待接收数据的数据类型和待恢复数据的数据类型均为第一数据类型。
在第一时刻,若接收端设备处于上述第三种状态,则说明在第一时刻,该接收端设备需要转移的待转移数据仅包括待恢复数据,相应的,待转移速度包括第三速度,其中,第三速度为在待转移数据仅仅包括待恢复数据的场景中,接收端设备预计恢复待恢复数据的速度。
具体的,处于上述第三种状态的接收端设备在第一时刻确定待恢复数据的大小和第三速度。
可选的,在第一时刻,处于上述第三种状态的接收端设备确定第三速度的方法可以参考处于上述第一种状态、上述第二种状态或者上述第四种状态的接收端设备确定第二速度的方法,此处不再进行详细赘述。
需要说明的是,本申请实施例中的第二速度和第三速度均用于表示待恢复速度,为了便于理解,本申请实施例中的第二速度应用 于待转移数据包括待接收数据和待恢复数据的场景,第三速度应用于待转移数据仅仅包括待恢复数据的场景。
进一步地,不论接收端设备处于上述哪一种状态,接收端设备在第一时刻确定待转移数据的大小和待转移速度之前,接收端设备还接收发送端设备发送的需转移数据的大小和需转移数据的类型,其中,需转移数据的类型为第一数据类型。
需转移数据为发送端设备与接收端设备之间所有需要转移的数据,接收端设备确定的待转移数据属于需转移数据。容易理解的是,接收端设备在整个数据接收的过程中所有需要接收数据的大小与需转移数据的大小相同,接收端设备在整个数据恢复的过程中所有需要恢复的数据的大小也与需转移数据的大小相同。
示例性的,发送端设备向接收端设备发送需转移数据的大小为30MB(MByte,兆字节),则该接收端设备在整个数据接收的过程中需接收的数据的大小为30MB,在整个数据恢复的过程中需恢复的数据的大小也为30MB。
具体的,接收端设备在第一时刻根据已转移数据的大小和需转移数据的大小,确定待转移数据的大小。
若接收端设备处于上述第一种状态或上述第二种状态,则接收端设备在第一时刻确定待接收数据的大小的方法为:接收端设备根据已接收数据的大小和需转移数据的大小,确定待接收数据的大小。
若接收端设备处于上述第一种状态或上述第三种状态,则接收端设备在第一时刻确定待恢复数据的大小的方法为:接收端设备根据已恢复数据的大小和需转移数据的大小,确定待恢复数据的大小。
若接收端设备处于上述第二种状态或上述第四状态,则接收端设备在第一时刻确定待恢复数据的大小的方法为:接收端设备将需转移数据的大小确定为待恢复数据的大小。
若接收端设备处于上述第四状态,则接收端设备在第一时刻确 定待接收数据的大小为:接收端设备将需转移数据的大小确定为待接收数据的大小。
在确定出待转移数据的大小和待转移速度之后,接收端设备根据待转移数据的大小和待转移速度计算接收端设备在第一时刻转移待转移数据的剩余转移时间,即接收端设备执行S301。
具体的,若接收端设备处于上述第一种状态,则接收端设备根据待接收数据的大小和第一速度,计算接收端设备在第一时刻的剩余接收时间。同时,接收端设备根据待恢复数据的大小和第二速度,计算接收端设备在第一时刻的剩余恢复时间。若剩余接收时间大于剩余恢复时间,则接收端设备确定剩余接收时间为剩余转移时间。若剩余恢复时间大于剩余接收时间,则接收端设备确定剩余恢复时间为剩余转移时间。若剩余接收时间等于剩余恢复时间,则接收端设备确定剩余接收时间或剩余恢复时间为剩余转移时间。
可以理解的是,上述第一种状态为数据传输的过程和数据恢复的过程并发执行的场景,因此,在接收端设备确定出剩余接收时间和剩余恢复时间之后,选取二者之间的较大值作为剩余转移时间即可。
具体的,若接收端设备处于上述第二种状态或上述第四种状态,则接收端设备根据待接收数据的大小和第一速度,计算接收端设备在第一时刻的剩余接收时间。同时,接收端设备根据待恢复数据的大小和第二速度,计算接收端设备在第一时刻的剩余恢复时间。接收端设备将剩余接收时间和剩余恢复时间之和,确定为剩余转移时间。其中,接收端设备处于上述第二种状态或上述第四种状态时,接收端设备所使用的第二速度均为根据待恢复数据的数据类型初始化定义的速度。接收端设备处于上述第四种状态时,接收端设备所使用的第一速度为该接收端设备根据待接收数据的数据类型初始化定义的速度。接收端设备处于上述第四种状态时,接收端设备所使用的第一速度为该接收端设备根据第一数据片段的大小和第一时间段的长度确定出的速度。
具体的,若接收端设备处于上述第三种状态,则接收端设备根据待恢复数据的大小和第三速度,计算接收端设备在第一时刻的剩余恢复时间,并将计算得到的剩余恢复时间确定为剩余转移时间。
综上所述,本申请实施例中的待转移速度是接收端设备在第一时刻确定的,因此,待转移速度能够实时表示该接收端设备转移数据的速度,接收端设备利用该待转移速度确定剩余转移时间,能够较为准确的计算出剩余转移时间,相应的,提高了数据转移的进度的准确率。
进一步地,接收端设备在确定出剩余转移时间之后,接收端设备还显示该剩余转移时间。
具体的,结合图3,如图4所示,在S301之后还包括:
S302、接收端设备显示剩余转移时间。
可选的,接收端设备可以通过时间信息来表示剩余转移时间,也可以通过进度条来表示剩余转移时间,还可以通过时间信息与进度条结合的方式来表示剩余转移时间,本申请实施例对此不作具体限定。
接收端设备通过显示剩余转移时间来告知用户当前数据的转移进度,以便为用户提供一个良好的等待预期。
由于本申请实施例中的剩余转移时间包括剩余接收时间和剩余恢复时间,或者包括剩余恢复时间,因此,接收端设备显示的剩余转移时间能够同时为用户显示数据接收的过程和数据恢复的过程中数据转移的进度,为用户显示了数据转移的整体进度,避免了分阶段独立显示无法呈现整体进度的问题。
为了更加方便理解本申请提供的进度计算方法,本申请实施例以数据生成的过程、数据发送的过程、数据接收的过程和数据恢复的过程并发执行,发送端设备同时执行数据生成的过程和数据发送的过程,接收端设备同时执行数据接收和数据恢复阶段为例进行说明。
参见图5,本申请实施例提供的数据转移的进度计算方法包括:
S500、发送端设备接收用户输入的数据转移指令。
可选的,用户可以通过语音控制发送端设备完成数据转移业务,例如,发送端设备可以通过自身内置的传声器获取用户输入的数据转移指令,用户还可以通过手动操作发送端设备以完成数据转移业务。
其中,本申请实施例中的数据转移指令中包括需转移数据、需转移数据的类型和需转移数据的大小。
容易理解的是,用户输入的数据转移指令中的需转移数据的数据类型可能不只一种。为了方便理解,本申请实施例以需转移数据的数据类型为第一数据类型为例进行说明。
S501、发送端设备获取第一数据类型的需转移数据和需转移数据的大小。
具体的,响应于用户输入的数据转移指令,发送端设备可以获取到第一数据类型的需转移数据和需转移数据的大小。
其中,第一数据类型的数据可以为媒体数据,也可以为DB数据,还可以为应用数据,本申请实施例对此不作具体限定。
S502、发送端设备向接收端设备发送需转移数据的大小和第一数据类型。
S503、接收端设备根据需转移数据的大小和第一数据类型,计算转移需转移数据所需的总时间,并显示该总时间。
具体的,发送端设备与接收端设备之间预先建立通信连接。接收端设备根据第一数据类型,初始化定义第一速度和第二速度,其中,第一速度为该接收端设备预计接收需转移数据的速度,第二速度为该接收端设备预计恢复需转移数据的速度,然后,接收端设备根据需转移数据的大小、初始化定义的第一速度和初始化定义的第二速度,计算转移需转移数据所需的总时间,最后,接收端设备显示总时间。
其中,接收端设备可以通过时间信息来表示总时间,也可以通过进度条来表示总时间,还可以通过时间信息与进度条结合的方式来表示总时间,本申请实施例对此不作具体限定。
接收端设备在执行数据转移的过程时,通过向用户呈现数据转移的总时间,可以使得用户获知等待时长,为用户提供良好的体验。
S504、发送端设备根据预设划分规则,将需转移数据划分为至少一部分数据。
具体的,发送端设备在获取到需转移数据后,根据预设的划分规则将需转移数据划分为至少一部分数据。
其中,预设划分规则可以是将需转移数据划分为大小相等的N部分,N≥1,也可以是将需转移数据划分为大小不一的N部分,本申请实施例对此不作具体限定。
S505、发送端设备根据至少一部分数据中的第一部分数据,生成第一数据集合。
S506、发送端设备向接收端设备发送第一数据集合。
S507、接收端设备接收第一数据集合。
S508、接收端设备恢复第一数据集合。
S509、发送端设备根据至少一部分数据中的第二部分数据生成第二数据集合。
S510、发送端设备向接收端设备发送第二数据集合。
S511、接收端设备接收第二数据集合。
需要说明的是,本申请实施例中发送端设备在向接收端设备发送第一数据集合的同时,生成第二数据集合,即发送端设备同时执行S506和S509,也就是说,发送端设备并发执行数据生成的过程和数据发送的过程。发送端设备并发执行数据生成的过程和数据发送的过程,能够大量减少发送端设备在发送数据之前所等待时间,提高了发送端设备完成数据转移的效率。
相对应的,接收端设备能够接收到发送端设备发送的第一数据 集合。接收端设备在接收到第一数据集合后,对该第一数据集合进行恢复。
进一步地,发送端设备还向接收端设备发送第一数据集合的大小和第一数据集合中数据的数据类型。可选的,发送端设备可向接收端设备同时发送第一数据集合、第一数据集合的大小和第一数据集合中数据的数据类型。
具体的,接收端设备在接收到第一数据集合后,根据第一数据集合的大小对第一数据集合进行完整性校验。
需要说明的是,本申请实施例中的接收端设备在恢复第一数据集合的同时,接收发送端设备发送的第二数据集合,即接收端设备同时执行S508和S511,也就是说,接收端设备并发执行数据接收的过程和数据恢复的过程,这样能够大量减少接收端设备完成数据转移花销的时间,提高了接收端设备完成数据转移的效率。
数据生成的过程、数据发送的过程、数据接收的过程和数据恢复的过程的并发执行有效的提高了数据转移的效率。
容易理解的是,图5中,S504-S506以及S509-S510为数据生成的过程和数据发送的过程,从上面描述可知发送端设备并发执行数据生成的过程和数据发送的过程,S507、S508和S511为数据接收的过程和数据恢复的过程,从上面描述可知接收端设备并发执行数据接收和数据恢复的过程。
此外,接收端设备在执行数据接收的过程和数据恢复的过程的同时,还采集相关数据,以确定第一速度和第二速度。本申请实施例以接收端设备在接收第二数据集合和恢复第一数据集合的同时,采集相关数据,以确定第一速度和第二速度为例进行说明。
具体的,接收端设备在执行S511的过程中,还执行S512和S513,接收端设备在执行S508的过程中,还执行S514和S515。
S512、接收端设备在第一时刻确定待接收数据的大小和第一速度。
S513、接收端设备根据待接收数据的大小和第一速度,确定剩 余接收时间。
S514、接收端设备在第一时刻确定待恢复数据的大小和第二速度。
S515、接收端设备根据待恢复数据的大小和第二速度,确定剩余恢复时间。
实际应用中由于众多因素的影响,在不同时刻,接收端设备接收同一数据类型的数据的速度可能会不同。本申请实施例中接收端设备将其接收需转移数据的整个过程在时间维度上分为至少一个时间段。每一时间段对应一个数据集合中的某一数据片段。
在接收端设备接收第二数据集合的过程中,若第一时间段的终止时刻为第一时刻,则接收端设备确定自身在第一时间段内接收到的第一数据片段的大小,并根据第一数据片段的大小和第一时间段,确定第一速度,这样,接收端设备可将该第一速度视为自身在后续接收待接收数据的过程中的接收速度。
具体的,接收端设备在接收第一数据片段的过程中,采集接收端设备接收第一数据片段的开始时刻(简称为开始接收时刻)、接收第一数据片段的终止时刻(即为第一时刻)、接收端设备在开始接收时刻已经接收到的数据的大小以及接收端设备在第一时刻已经接收到的数据的大小,并利用上述采集到的信息确定第一数据片段的大小和第一时间段。
同理,实际应用中由于众多因素的影响,在不同时刻,接收端设备恢复同一数据类型的数据的速度可能也不同。本申请实施例中接收端设备将其恢复需转移数据的整个过程在时间维度上分为至少一个时间段。每一时间段对应一个数据集合中的某一数据片段。
在接收端设备恢复第一数据集合的过程中,若第二时间段的终止时刻为第一时刻,则接收端设备确定自身在第二时间段内恢复完成的第二数据片段的大小,并根据第二数据片段的大小和第二时间段,确定第二速度,这样,接收端设备可将该第二速度视为自身在后续恢复待恢复数据的过程中的恢复速度。
具体的,接收端设备在恢复第二数据片段的过程中,采集接收端设备恢复第二数据片段的开始时刻(简称为开始恢复时刻)、恢复第二数据片段的终止时刻(即为第一时刻)、接收端设备在开始恢复时刻已经恢复的数据的大小以及接收端设备在第一时刻已经恢复的数据的大小,并利用上述采集到的信息确定第二数据片段的大小和第二时间段。
接收端设备在确定剩余接收时间和剩余恢复时间后,根据剩余接收时间和剩余恢复时间确定剩余转移时间,即在S513和S515之后,接收端设备还执行S516。
S516、接收端设备根据剩余接收时间和剩余恢复时间确定剩余转移时间,并显示剩余转移时间。
具体的,若剩余接收时间大于剩余恢复时间,则接收端设备确定剩余接收时间为剩余转移时间。若剩余恢复时间大于剩余接收时间,则接收端设备确定剩余恢复时间为剩余转移时间。若剩余恢复时间等于剩余接收时间,则接收端设备确定剩余恢复时间或剩余接收时间为剩余转移时间。
容易理解的是,第一时间段为数据接收的过程中的其中一个时间段,第二时间段为数据恢复的过程中的其中一个时间段,因此,第一时间段和第二时间段会发生变化,第一时间段和第二时间段的终止时刻均为第一时刻,第一时刻也会随着时间的变化而变化,因此,随着时间的变化,本申请实施例中接收端设备采集的数据也会发生变化。在每一时刻,接收端设备均根据在该时刻采集到的相关数据计算剩余接收时间和剩余恢复时间,进而,接收端设备可根据该剩余接收时间和剩余恢复时间,确定出剩余转移时间。
可以看出,本申请实施例中的接收端设备能够实时的确定出待转移速度,并利用该待转移速度确定出剩余转移时间,不仅能够为用户提供一个良好的等待预期,也能够保证确定出的剩余转移时间的准确率。另外,由于本申请实施例中的接收端设备并发执行数据接收的过程和数据恢复的过程,有效的降低了整个数据转移过程所 消耗的时间,提高了数据转移的速率。
本申请实施例提供一种接收端设备,该接收端设备用于执行以上方法中的接收端设备所执行的步骤。本申请实施例提供的接收端设备可以包括相应步骤所对应的模块。
本申请实施例可以根据上述方法示例对接收端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图6示出了上述实施例中所涉及的接收端设备的一种可能的结构示意图。如图6所示,接收端设备包括确定单元60、计算单元61和显示单元62。确定单元60用于支持该接收端设备执行图4中的S300,图5中的S512-S516;计算单元61用于支持该接收端设备执行图4中的S301,图5中的S503;显示单元62用于支持该接收端设备执行图4中的S302,图5中的S503和S516。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在采用集成的单元的情况下,图7示出了上述实施例中所涉及的接收端设备的一种可能的结构示意图。如图7所示,该接收端设备包括:处理模块70和通信模块71。处理模块70用于对该接收端设备的动作进行控制管理,例如,处理模块70用于支持该接收端设备执行图4中S300、S301和S302,图5中的S503、S508、S512-S516,和/或用于本文所描述的技术的其它过程。通信模块71用于支持该接收端设备与发送端设备的通信,例如,通信模块71用于支持该接收端设备执行图5中的S507和S511。该接收端设备还可以包括存储模块72,用于存储已恢复的数据,还可以用于存储 该接收端设备的程序代码和数据。
其中,本申请实施例中的处理模块70可以是处理器或控制器,例如可以是CPU(Central Processing Unit,中央处理器),DSP(Digital Signal Processor,数字信号处理器)。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。本申请实施例中的通信模块71可以是收发器、收发电路或通信接口等。存储模块72可以是存储器。
可选的,该接收端设备还可以包括一些输出模块73,用于显示数据转移进度。
当处理模块70为处理器,通信模块71为通信接口,存储模块72为存储器,输出模块73为显示屏时,本申请实施例所涉及的接收端设备可以为图8所示的接收端设备。
如图8所示,该接收端设备包括:通信接口80、处理器81、存储器82和显示屏83。其中,通信接口80、处理器81、存储器82与显示屏83之间通过系统总线84连接,并完成相互间通信。
当接收端设备运行时,该接收端设备执行如图3-图5中任意一个附图所示的实施例的数据转移的进度计算方法。具体的数据转移的进度计算方法可参见上述如图3-图5中任意一个附图所示的实施例中的相关描述,此处不再赘述。
其中,存储器82可用于存储已恢复的数据,也可以用于存储软件程序以及应用模块,处理器81通过运行存储在存储器82的软件程序以及应用模块,从而执行接收端设备的各种功能应用以及数据处理。
存储器82可主要包括存储程序区820和存储数据区821,其中,存储程序区820可存储操作系统、至少一个功能所需的应用程序,比如恢复数据的程序等;存储数据区821可存储已恢复的数据。
在本申请具体实施方式中,存储器82可以是ROM(Read-only Memory,只读存储器),或可存储静态信息和指令的其他类型的静 态存储设备,RAM(Random Access Memory,随机存取存储器)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由无线控制器存取的任何其他介质,但不限于此。
存储器82可以是独立存在,通过系统总线84与处理器81相连接。存储器82也可以和处理器81集成在一起。
处理器81是接收端设备的控制中心。处理器81利用各种接口和线路连接整个接收端设备的各个部分,通过运行或执行存储在存储器82内的软件程序和/或应用模块,以及调用存储在存储器82内的数据,执行接收端设备的各种功能和处理数据,从而对接收端设备进行整体监控。
在具体实现中,作为一种实施例,处理器81可以包括一个或多个CPU,例如图8中的处理器81包括CPU 0和CPU 1。
系统总线84可以是ISA(Industry Standard Architecture,工业标准体系结构)总线、PCI(Peripheral Component Interconnect,外部设备互连)总线或EISA(Extended Industry Standard Architecture,扩展工业标准体系结构)总线等。该系统总线84可以分为地址总线、数据总线、控制总线等。本申请实施例中为了清楚说明,在图8中将各种总线都示意为系统总线84。
进一步地,接收端设备还可以包含电源85,用于给接收端设备的不同部件进行供电以维持其运行。作为一般性理解,所述电源85可以是内置的电池,例如常见的锂离子电池、镍氢电池等,也包括直接向接收端设备供电的外接电源,例如AC(Alternating Current,交流)适配器等。在本申请的一些实施方式中,所述电源85还可以作更为广泛的定义,例如还可以包括电源管理系统、充电系统、电源故障检测电路、电源转换器或逆变器、电源状态指示器(如发光二极管),以及与接收端设备的电能生成、管理及分布相 关联的其他任何组件。
本申请实施例提供一种接收端设备,接收端设备通过确定在预设的第一时刻该接收端设备需要转移的待转移数据的大小和待转移速度,来计算该接收端设备在第一时刻转移待转移数据的剩余转移时间。由于接收端设备计算其在第一时刻转移待转移数据的剩余转移时间采用的是待转移速度,而待转移速度是接收端设备在第一时刻确定出的该接收端设备预计转移待转移数据的速度,因此,接收端设备利用第一时刻确定出的待转移速度计算出的剩余转移时间较为准确。
本申请实施例还提供一种数据转移系统,如图9所示,该数据转移系统包括如上述各实施例所述的接收端设备以及发送端设备,发送端设备与接收端设备之间通过有线方式或无线方式连接。
对于发送端设备和接收端设备所实现的更为详细的处理流程,在上述实施例中已做详细描述,此处不再详细描述。
本申请实施例提供一种数据转移系统,该数据转移系统中的接收端设备通过确定在预设的第一时刻该接收端设备需要转移的待转移数据的大小和待转移速度,来计算该接收端设备在第一时刻转移待转移数据的剩余转移时间。由于接收端设备计算其在第一时刻转移待转移数据的剩余转移时间采用的是待转移速度,而待转移速度是接收端设备在第一时刻确定出的该接收端设备预计转移待转移数据的速度,因此,接收端设备利用第一时刻确定出的待转移速度计算出的剩余转移时间较为准确。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将移动设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,移动设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,移动设备和方法,可以通过其它的方式实现。例如,以上所描述的移动设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,移动设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技 术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (22)

  1. 一种数据转移的进度计算方法,其特征在于,包括:
    接收端设备在预设的第一时刻确定待转移数据的大小和待转移速度,所述待转移速度为所述接收端设备预计转移所述待转移数据的速度;
    所述接收端设备根据所述待转移数据的大小和所述待转移速度,确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间。
  2. 根据权利要求1所述的进度计算方法,其特征在于,
    所述待转移数据包括待接收数据和待恢复数据,所述待转移速度包括第一速度和第二速度,所述第一速度为所述接收端设备预计接收所述待接收数据的速度,所述第二速度为所述接收端设备预计恢复所述待恢复数据的速度。
  3. 根据权利要求2所述的进度计算方法,其特征在于,所述接收端设备在预设的第一时刻确定待转移速度,包括:所述接收端设备在所述预设的第一时刻确定所述第一速度和所述第二速度;
    其中,所述接收端设备在所述预设的第一时刻确定所述第一速度和所述第二速度的方法,包括:
    所述接收端设备确定在第一时间段内接收到的第一数据片段的大小,所述第一时间段的结束时刻为所述第一时刻,所述第一数据片段中数据的数据类型与所述待接收数据的数据类型相同;所述接收端设备根据所述第一数据片段的大小和所述第一时间段,确定所述第一速度;
    所述接收端设备确定在第二时间段内恢复完成的第二数据片段的大小,所述第二时间段的结束时刻为所述第一时刻,所述第二数据片段中数据的数据类型与所述待恢复数据的数据类型相同;所述接收端设备根据所述第二数据片段的大小和所述第二时间段,确定所述第二速度。
  4. 根据权利要求2所述的进度计算方法,其特征在于,所述接 收端设备在预设的第一时刻确定待转移速度,包括:所述接收端设备在所述预设的第一时刻确定所述第一速度和所述第二速度;
    其中,所述接收端设备在所述预设的第一时刻确定所述第一速度和所述第二速度的方法,包括:
    所述接收端设备确定在第一时间段内接收到的第一数据片段的大小,所述第一时间段的结束时刻为所述第一时刻,所述第一数据片段中数据的数据类型与所述待接收数据的数据类型相同;所述接收端设备根据所述第一数据片段的大小和所述第一时间段,确定所述第一速度;
    所述接收端设备确定所述待恢复数据的数据类型;所述接收端设备根据所述待恢复数据的数据类型,初始化定义所述第二速度。
  5. 根据权利要求3所述的进度计算方法,其特征在于,所述接收端设备根据所述待转移数据的大小和所述待转移速度,确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间,包括:
    所述接收端设备根据所述待接收数据的大小和所述第一速度,计算所述接收端设备在所述第一时刻接收所述待接收数据的剩余接收时间;
    所述接收端设备根据所述待恢复数据的大小和所述第二速度,计算所述接收端设备在所述第一时刻恢复所述待恢复数据的剩余恢复时间;
    若所述剩余接收时间大于所述剩余恢复时间,则所述接收端设备确定所述剩余接收时间为所述剩余转移时间;
    若所述剩余恢复时间大于所述剩余接收时间,则所述接收端设备确定所述剩余恢复时间为所述剩余转移时间;
    若所述剩余接收时间等于所述剩余恢复时间,则所述接收端设备确定所述剩余接收时间或所述剩余恢复时间为所述剩余转移时间。
  6. 根据权利要求4所述的进度计算方法,其特征在于,所述接 收端设备根据所述待转移数据的大小和所述待转移速度,确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间,包括:
    所述接收端设备根据所述待接收数据的大小和所述第一速度,计算所述接收端设备在所述第一时刻接收所述待接收数据的剩余接收时间;
    所述接收端设备根据所述待恢复数据的大小和所述第二速度,计算所述接收端设备在所述第一时刻恢复所述待恢复数据的剩余恢复时间;
    所述接收端设备将所述剩余接收时间和所述剩余恢复时间之和,确定为所述剩余转移时间。
  7. 根据权利要求1所述的进度计算方法,其特征在于,
    所述待转移数据包括待恢复数据,所述待转移速度包括第三速度,所述第三速度为所述接收端设备预计恢复所述待恢复数据的速度。
  8. 根据权利要求7所述的进度计算方法,其特征在于,所述接收端设备在预设的第一时刻确定待转移速度,包括:所述接收端设备在所述预设的第一时刻确定所述第三速度;
    其中,所述接收端设备在所述预设的第一时刻确定所述第三速度的方法,包括:
    所述接收端设备确定在第三时间段内恢复完成的第三数据片段的大小,所述第三时间段的结束时刻为所述第一时刻,所述第三数据片段中数据的数据类型与所述待恢复数据的数据类型相同;所述接收端设备根据所述第三数据片段的大小和所述第三时间段,确定所述第三速度;
    或者,
    所述接收端设备确定所述待恢复数据的数据类型;所述接收端设备根据所述待恢复数据的数据类型,初始化定义所述第三速度。
  9. 根据权利要求7或8所述的进度计算方法,其特征在于,所 述接收端设备根据所述待转移数据的大小和所述待转移速度,确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间,包括:
    所述接收端设备根据所述待恢复数据的大小和所述第三速度,计算所述接收端设备在所述第一时刻恢复所述待转移数据的剩余恢复时间;
    所述接收端设备将所述剩余恢复时间确定为所述剩余转移时间。
  10. 根据权利要求1-9中任意一项所述的进度计算方法,其特征在于,所述接收端设备确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间之后,所述进度计算方法还包括:
    所述接收终端设备显示所述剩余转移时间。
  11. 一种接收端设备,其特征在于,所述接收端设备包括确定单元,所述确定单元用于:
    在预设的第一时刻确定待转移数据的大小和待转移速度,所述待转移速度为所述接收端设备预计转移所述待转移数据的速度;
    根据所述待转移数据的大小和所述待转移速度,确定所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间。
  12. 根据权利要求11所述的接收端设备,其特征在于,
    所述待转移数据包括待接收数据和待恢复数据,所述待转移速度包括第一速度和第二速度,所述第一速度为所述接收端设备预计接收所述待接收数据的速度,所述第二速度为所述接收端设备预计恢复所述待恢复数据的速度。
  13. 根据权利要求12所述的接收端设备,其特征在于,所述确定单元具体用于:
    确定在第一时间段内接收第一数据片段的大小,所述第一时间段的结束时刻为所述第一时刻,所述第一数据片段中数据的数据类型与所述待接收数据的数据类型相同;根据所述第一数据片段的大小和所述第一时间段,确定所述第一速度;
    确定在第二时间段内恢复第二数据片段的大小所述第二时间段的结束时刻为所述第一时刻,所述第二数据片段中数据的数据类型与所述待恢复数据的数据类型相同;根据所述第二数据片段的大小和所述第二时间段,确定所述第二速度。
  14. 根据权利要求12所述的接收端设备,其特征在于,所述确定单元具体用于:
    确定在第一时间段内接收第一数据片段的大小,所述第一时间段的结束时刻为所述第一时刻,所述第一数据片段中数据的数据类型与所述待接收数据的数据类型相同;根据所述第一数据片段的大小和所述第一时间段,确定所述第一速度;
    确定所述待恢复数据的数据类型;根据所述待恢复数据的数据类型,初始化定义所述第二速度。
  15. 根据权利要求13所述的接收端设备,其特征在于,所述接收端设备还包括计算单元,
    所述计算单元,用于根据所述待接收数据的大小和所述第一速度,计算所述接收端设备在所述第一时刻接收所述待接收数据的剩余接收时间,以及用于根据所述待恢复数据的大小和所述第二速度,计算所述接收端设备在所述第一时刻恢复所述待恢复数据的剩余恢复时间;
    所述确定单元,具体用于若所述计算单元计算的所述剩余接收时间大于所述计算单元计算的所述剩余恢复时间,则确定所述剩余接收时间为所述剩余转移时间,以及具体用于若所述计算单元计算的所述剩余恢复时间大于所述计算单元计算的所述剩余接收时间,则确定所述剩余恢复时间为所述剩余转移时间,以及具体用于若所述剩余接收时间等于所述剩余恢复时间,则确定所述剩余接收时间或所述剩余恢复时间为所述剩余转移时间。
  16. 根据权利要求14所述的接收端设备,其特征在于,所述接收端设备还包括计算单元,
    所述计算单元,用于根据所述待接收数据的大小和所述第一速 度,计算所述接收端设备在所述第一时刻接收所述待接收数据的剩余接收时间,以及用于根据所述待恢复数据的大小和所述第二速度,计算所述接收端设备在所述第一时刻恢复所述待恢复数据的剩余恢复时间;
    所述确定单元,具体用于将所述计算单元计算的所述剩余接收时间和所述计算单元计算的所述剩余恢复时间之和,确定为所述剩余转移时间。
  17. 根据权利要求11所述的接收端设备,其特征在于,
    所述待转移数据包括待恢复数据,所述待转移速度包括第三速度,所述第三速度为所述接收端设备预计恢复所述待恢复数据的速度。
  18. 根据权利要求17所述的接收端设备,其特征在于,所述确定单元具体用于:
    确定在第三时间段内恢复完成的第三数据片段的大小,所述第三时间段的结束时刻为所述第一时刻,所述第三数据片段中数据的数据类型与所述待恢复数据的数据类型相同;根据所述第三数据片段的大小和所述第三时间段,确定所述第三速度;
    或者,
    确定所述待恢复数据的数据类型;根据所述待恢复数据的数据类型,初始化定义所述第三速度。
  19. 根据权利要求17或18所述的接收端设备,其特征在于,所述接收端设备还包括计算单元,
    所述计算单元,用于根据所述待恢复数据的大小和所述第三速度,计算所述接收端设备在所述第一时刻恢复所述待转移数据的剩余恢复时间;
    所述确定单元,具体用于将所述计算单元计算的所述剩余恢复时间确定为所述剩余转移时间。
  20. 根据权利要求11-19中任意一项所述的接收端设备,其特征在于,所述接收端设备还包括显示单元,
    所述显示单元,用于在所述确定单元确定出所述接收端设备在所述第一时刻转移所述待转移数据的剩余转移时间之后,显示所述剩余转移时间。
  21. 一种接收端设备,其特征在于,包括接口电路、处理器、存储器和系统总线;所述接口电路、所述处理器和所述存储器分别与所述系统总线连接,所述存储器用于存储计算机指令,所述处理器用于执行所述存储器存储的计算机指令,以使所述接收端设备执行如权利要求1-10中任意一项所述的数据转移的进度计算方法。
  22. 一种数据转移系统,其特征在于,包括如上述权利要求11-20中任意一项所述的接收端设备以及发送端设备,所述接收端设备与所述发送端设备之间通过有线方式或者无线方式连接。
PCT/CN2016/097420 2016-08-30 2016-08-30 一种数据转移的进度计算方法、装置及系统 WO2018039943A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680059732.5A CN108139987B (zh) 2016-08-30 2016-08-30 一种数据转移的进度计算方法、装置及系统
PCT/CN2016/097420 WO2018039943A1 (zh) 2016-08-30 2016-08-30 一种数据转移的进度计算方法、装置及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/097420 WO2018039943A1 (zh) 2016-08-30 2016-08-30 一种数据转移的进度计算方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2018039943A1 true WO2018039943A1 (zh) 2018-03-08

Family

ID=61299581

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/097420 WO2018039943A1 (zh) 2016-08-30 2016-08-30 一种数据转移的进度计算方法、装置及系统

Country Status (2)

Country Link
CN (1) CN108139987B (zh)
WO (1) WO2018039943A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291601A (zh) * 2020-10-28 2021-01-29 Oppo广东移动通信有限公司 一种数据传输方法、电子设备及存储介质
CN112486783A (zh) * 2020-11-25 2021-03-12 建信金融科技有限责任公司 一种进度条的显示方法和装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112540545B (zh) * 2021-02-22 2021-04-30 武汉世聪智能科技有限公司 一种基于多智能系统的智能设备控制方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102004745A (zh) * 2009-09-02 2011-04-06 中国银联股份有限公司 数据转移系统及方法
CN102263605A (zh) * 2010-05-27 2011-11-30 阿里巴巴集团控股有限公司 一种数据的接收方法、发送方法及其装置和系统
CN103002413A (zh) * 2012-12-03 2013-03-27 北京小米科技有限责任公司 一种彩信传输进度显示方法及装置
CN103927288A (zh) * 2014-04-30 2014-07-16 惠州Tcl移动通信有限公司 一种移动设备之间信息转移和共享的方法及系统
CN105653256A (zh) * 2015-05-29 2016-06-08 宇龙计算机通信科技(深圳)有限公司 一种数据传输进度显示方法及系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0173155B1 (ko) * 1995-01-16 1999-03-30 손익수 온-라인 실시간 컴퓨터 음악 연주 방법
CN101267454A (zh) * 2008-04-30 2008-09-17 中兴通讯股份有限公司 一种文件传输信息的提示方法及系统
CN103092702A (zh) * 2011-11-01 2013-05-08 宏碁股份有限公司 数据同步方法及应用该方法的数据同步系统
CN103873927B (zh) * 2012-12-17 2018-07-03 联想(北京)有限公司 流媒体数据处理方法和电子设备
CN104010015A (zh) * 2013-02-27 2014-08-27 腾讯科技(深圳)有限公司 文件传输系统、策略服务器、终端和文件传输方法
CN103825933A (zh) * 2013-12-04 2014-05-28 北京三民太奇教育科技有限公司 一种学习系统中的文件传输控制方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102004745A (zh) * 2009-09-02 2011-04-06 中国银联股份有限公司 数据转移系统及方法
CN102263605A (zh) * 2010-05-27 2011-11-30 阿里巴巴集团控股有限公司 一种数据的接收方法、发送方法及其装置和系统
CN103002413A (zh) * 2012-12-03 2013-03-27 北京小米科技有限责任公司 一种彩信传输进度显示方法及装置
CN103927288A (zh) * 2014-04-30 2014-07-16 惠州Tcl移动通信有限公司 一种移动设备之间信息转移和共享的方法及系统
CN105653256A (zh) * 2015-05-29 2016-06-08 宇龙计算机通信科技(深圳)有限公司 一种数据传输进度显示方法及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291601A (zh) * 2020-10-28 2021-01-29 Oppo广东移动通信有限公司 一种数据传输方法、电子设备及存储介质
CN112486783A (zh) * 2020-11-25 2021-03-12 建信金融科技有限责任公司 一种进度条的显示方法和装置
CN112486783B (zh) * 2020-11-25 2022-09-27 建信金融科技有限责任公司 一种进度条的显示方法和装置

Also Published As

Publication number Publication date
CN108139987A (zh) 2018-06-08
CN108139987B (zh) 2020-06-02

Similar Documents

Publication Publication Date Title
CN108695921B (zh) 数据备份方法、无线充电装置、移动终端及存储介质
US11611863B2 (en) Method and apparatus for low energy discovery
RU2012101865A (ru) Способ и устройство для оптимизации энергопотребления при использовании беспроводных соединений
WO2018039943A1 (zh) 一种数据转移的进度计算方法、装置及系统
CN108632307B (zh) 一种会话连接建立方法以及smf实体
CN107148715A (zh) 移动终端、电源适配器及其升级方法
WO2017219609A1 (zh) 一种停车位预定方法及相关终端、服务器、装置
CN103916978A (zh) 一种建立无线连接的方法及电子设备
EP2518967B1 (en) Method, system and device for initializing internet device
CN104462033A (zh) 在设备间实现编辑操作的方法及设备
CN114788317A (zh) 信息处理方法及装置、通信设备及存储介质
CN114040445A (zh) 一种数据传输方法及装置
CN103106579A (zh) 数据监控方法、手机支付终端、服务器及支付系统
JP2015537435A5 (zh)
CN205283611U (zh) 一种将移动端和服务器端消息信息进行同步的装置
US12003475B2 (en) Email synchronization method and electronic device
CN107534616B (zh) 通用串行总线的服务质量
WO2017206318A1 (zh) 移动设备及其位置共享方法、装置
EP2831695A1 (en) Audio processing during low-power operation
US20160309485A1 (en) Method and device for supporting communication of electronic device
CN106657076B (zh) 一种网络命名空间的tcp服务实现方法及装置
US8451993B2 (en) Dial-up connection method and device of mobile data terminal
CN106488537B (zh) 一种发送方法、装置及移动终端
CN103297584A (zh) 一种剩余通话时间的获知方法、系统和移动终端
CN111629411A (zh) 一种通信系统间转移的方法以及相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16914510

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16914510

Country of ref document: EP

Kind code of ref document: A1