CN106302589B - File transmission method and terminal - Google Patents

File transmission method and terminal Download PDF

Info

Publication number
CN106302589B
CN106302589B CN201510278012.5A CN201510278012A CN106302589B CN 106302589 B CN106302589 B CN 106302589B CN 201510278012 A CN201510278012 A CN 201510278012A CN 106302589 B CN106302589 B CN 106302589B
Authority
CN
China
Prior art keywords
transmission
fragment
receiving terminal
file
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510278012.5A
Other languages
Chinese (zh)
Other versions
CN106302589A (en
Inventor
黄诚宗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510278012.5A priority Critical patent/CN106302589B/en
Publication of CN106302589A publication Critical patent/CN106302589A/en
Application granted granted Critical
Publication of CN106302589B publication Critical patent/CN106302589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a file transmission method and a terminal, wherein the method comprises the following steps: establishing Bluetooth communication connection with a receiving terminal; and dynamically adjusting the fragment size of the next transmission fragment in the residual data of the file to be transmitted according to a preset fragment strategy, and sending the next transmission fragment to a receiving terminal according to the fragment size until the file to be transmitted is completely transmitted. The invention can reduce the time consumption of data transmission by dynamically adjusting the size of the fragments, and particularly improve the data transmission capability and efficiency between terminals when transmitting larger data.

Description

File transmission method and terminal
Technical Field
The present invention relates to the field of file transmission technologies, and in particular, to a file transmission method and a terminal.
Background
In the application of the smart device, the wearable device generally plays the role of a slave, and most services of the wearable device need to exchange data with a communication host (such as a smart phone) through bluetooth to complete communication. In general, bluetooth transmission is affected by factors such as wireless environment and transmission distance, and transmission rates have large differences. And at present, the data transmission mode with the fixed fragment size is usually adopted, and the transmission mode with the fixed fragment size leads to low transmission efficiency and time-consuming transmission increase under the influence of factors such as unstable network, large transmission distance and the like, so that the existing data transmission mode cannot provide better experience in a changeable Bluetooth transmission environment.
Disclosure of Invention
The embodiment of the invention provides a file transmission method and a terminal, aiming at improving the file data transmission capacity and efficiency between intelligent devices.
The file transmission method provided by the embodiment of the invention comprises the following steps:
establishing Bluetooth communication connection with a receiving terminal;
and dynamically adjusting the fragment size of the next transmission fragment in the residual data of the file to be transmitted according to a preset fragment strategy, and sending the next transmission fragment to a receiving terminal according to the fragment size until the file to be transmitted is completely transmitted.
An embodiment of the present invention further provides a file transmission terminal, including:
the connection establishing module is used for establishing Bluetooth communication connection with the receiving terminal;
and the fragment transmission module is used for dynamically adjusting the fragment size of the next transmission fragment in the residual data of the file to be transmitted according to a preset fragment strategy, and sending the next transmission fragment to the receiving terminal according to the fragment size until the file to be transmitted is completely transmitted.
According to the file transmission method and the terminal provided by the embodiment of the invention, the Bluetooth connection is established between the sending terminal and the receiving terminal; according to a preset fragmentation strategy, the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted is dynamically adjusted, and the next transmission fragmentation is sent to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, so that the time consumption of data transmission can be reduced by dynamically adjusting the fragmentation size, and particularly, the data transmission capacity and efficiency between terminals are improved when large data is transmitted; in addition, the scheme of the invention can also support breakpoint continuous transmission, and further improve the data transmission capability.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
FIG. 3 is a flowchart illustrating a first embodiment of a file transfer method according to the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of a file transfer method according to the present invention;
fig. 5 is a schematic diagram of a refining process in an embodiment of the present invention, where the size of a next transmission fragment in remaining data of a file to be transmitted is dynamically adjusted according to a preset fragmentation policy, and the next transmission fragment is sent to a receiving terminal according to the size of the fragment until the file to be transmitted is completely transmitted;
fig. 6 is another detailed flowchart illustrating an embodiment of the present invention, which dynamically adjusts a fragment size of a next transmission fragment in remaining data of a file to be transmitted according to a preset fragment policy, and sends the next transmission fragment to a receiving terminal according to the fragment size until the file to be transmitted is completely transmitted;
FIG. 7 is a flowchart illustrating a file transfer method according to a third embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating an interaction timing sequence between a mobile phone and a wearable device according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a fourth exemplary embodiment of a file transfer method according to the present invention;
FIG. 10 is a functional block diagram of a first embodiment of a document transportation apparatus according to the present invention;
FIG. 11 is a functional block diagram of a second embodiment of a document transportation device according to the present invention;
fig. 12 is a functional block diagram of a file transfer device according to a third embodiment of the present invention.
In order to make the technical solution of the present invention clearer and clearer, the following detailed description is made with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main idea of the embodiment scheme of the invention is as follows: firstly, a transmitting terminal and a receiving terminal establish Bluetooth communication connection; and then dynamically adjusting the fragment size of the next transmission fragment in the residual data of the file to be transmitted according to a preset fragment strategy, and sending the next transmission fragment to a receiving terminal according to the fragment size until the file to be transmitted is completely transmitted.
The embodiment of the invention considers that the transmission mode with fixed fragment size adopted in the prior art causes low transmission efficiency and increased transmission time consumption under the influence of factors such as unstable network, large transmission distance and the like, so that the prior data transmission mode can not provide better experience in a changeable Bluetooth transmission environment.
According to the scheme of the embodiment of the invention, the time consumption of data transmission can be reduced by dynamically adjusting the size of the fragments, especially when large data is transmitted, the data transmission capacity and efficiency between terminals are improved, and the user experience is improved.
Specifically, the embodiment of the present invention relates to data transmission between intelligent terminals, where the intelligent terminals may be two terminals that communicate in a wireless manner such as bluetooth, the intelligent terminals may be mobile terminals such as a mobile phone, a wearable device, a notebook computer, a tablet computer, and the like, and may also be other bluetooth devices, and in the embodiment, bluetooth communication between the mobile phone and the wearable device is used as an example. Wherein, wearable equipment refers to the general term of the equipment that can dress that uses wearable technique to carry out intelligent design, development to daily wearing, like intelligent glasses, wrist-watch, bracelet etc..
First, a mobile terminal implementing various embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal described above may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet), a PMP (portable multimedia player), a wearable device (such as a smart band, a smart watch, etc.), a navigation device, and the like.
In the following, the terminal is exemplified as a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
As shown in fig. 1, fig. 1 is a schematic hardware structure of a mobile terminal implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc.
Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
The broadcast receiving module 111 may receive a broadcast signal and/or broadcast-related information from an external broadcast management server via a broadcast channel, the broadcast channel may include a satellite channel and/or a terrestrial channel, the broadcast management server may be a server that generates and transmits the broadcast signal and/or the broadcast-related information or a server that receives a previously generated broadcast signal and/or broadcast-related information and transmits it to a terminal, the broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, etc. also, the broadcast signal may further include a broadcast signal combined with the TV or radio broadcast signal, the broadcast-related information may also be provided via a mobile communication network, and in this case, the broadcast-related information may be received by the mobile communication module 112, the broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) for Digital Multimedia Broadcasting (DMB), a digital video broadcasting handheld (DVB-H), an Electronic Service Guide (ESG) for digital video broadcasting-handheld (DVB-H), etc. the broadcast receiving module 111 may receive a signal broadcast using various types of broadcast systems, particularly, the broadcast receiving module 111 may receive a signal broadcast using a multimedia broadcast-terrestrial broadcast-multimedia broadcast-satellite-broadcast-related information (DMB-broadcast-@) A digital broadcasting system of a terrestrial digital broadcasting integrated service (ISDB-T), etc. receives digital broadcasting. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet access technology to which the module refers may include W L AN (wireless L AN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave Access), HSDPA (high speed Downlink packet Access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetoothTMRadio Frequency Identification (RFID), infrared data association (I rDA), Ultra Wideband (UWB), zigbeeTMAnd so on.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module 115 can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 1220, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 151. The image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 1210 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device. The sensing unit 140 may include a proximity sensor 1410 as will be described below in connection with a touch screen.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151, an audio output module 152, an alarm unit 153, and the like.
The display unit 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a user interface (U I) or a graphical user interface (GU I) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are stacked on each other in the form of a layer TO form a touch screen, the display unit 151 may be used as an input device and an output device, the display unit 151 may include at least one of a liquid crystal display (L CD), a thin film transistor L CD (TFT-L CD), an organic light emitting diode (O L ED) display, a flexible display, a three-dimensional (3D) display, and the like, some of these displays may be configured TO be transparent TO allow a user TO view from the outside, which may be referred TO as a transparent display, a typical transparent display may be, for example, a TO L ED (transparent organic light emitting diode) display, and the like, the mobile terminal 100 may include two or more display units (or other display devices) according TO a specific intended embodiment, for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown), and the touch screen may be used TO detect a touch input pressure and a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The alarm unit 153 may provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alarm unit 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm unit 153 may provide an output in the form of vibration, and when a call, a message, or some other incoming communication (communicating communication) is received, the alarm unit 153 may provide a tactile output (i.e., vibration) to inform the user thereof. By providing such a tactile output, the user can recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm unit 153 may also provide an output notifying the occurrence of an event via the display unit 151 or the audio output module 152.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 1810 for reproducing (or playing back) multimedia data, and the multimedia module 1810 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a programmable logic device (P L D), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, such an implementation may be implemented in the controller 180 in some cases.
Up to this point, mobile terminals have been described in terms of their functionality.
Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
For example, the air interfaces used by communication systems include, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (particularly Long term evolution (L TE)), Global System for Mobile communications (GSM), and so forth.
Referring to fig. 2, a CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of Base Stations (BSs) 270, Base Station Controllers (BSCs) 275, and Mobile Switching Centers (MSCs) 2800 MSCs 280 configured to interface with a Public Switched Telephone Network (PSTN)290 the MSCs 280 are also configured to interface with the BSCs 275 that may be coupled to the base stations 270 via backhaul lines, the backhaul lines may be configured according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame relay, HDS L, ADS L, or xDS L it will be appreciated that a system as shown in fig. 2 may include a plurality of BSCs 2750.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz,5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cells". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, a Broadcast Transmitter (BT)295 transmits a broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving module 111 as shown in fig. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In fig. 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The GPS module 115 as shown in fig. 1 is generally configured to cooperate with satellites 300 to obtain desired positioning information. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within the particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC provides call resource allocation and mobility management functions including coordination of soft handoff procedures between BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN 290 interfaces with the MSC280, the MSC interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
Based on the hardware structure of the mobile terminal and the communication system, the embodiment of the file transmission method is provided.
As shown in fig. 3, a first embodiment of the present invention provides a file transmission method, including:
step S101, establishing Bluetooth communication connection with a receiving terminal;
the method of the embodiment relates to a sending terminal and a receiving terminal, wherein the sending terminal is used for transmitting files to the receiving terminal, and the receiving terminal is used for receiving the files from the sending terminal. The functions of the transmitting terminal and the receiving terminal in this embodiment may be interchanged. In the embodiment, a sending terminal is taken as a mobile phone, and a receiving terminal is taken as wearable equipment for example; in other embodiments, the sending terminal may also be a wearable device, and the receiving terminal is a mobile phone, or both the sending terminal and the receiving terminal are wearable devices, or both the receiving terminal and the sending terminal are mobile phones.
In addition, the sending terminal and the receiving terminal are connected through a wireless network, and the wireless network transmission mode includes but is not limited to bluetooth and the like.
Taking a mobile phone and the wearable device as examples, data interaction between the mobile phone and the wearable device can be realized through Bluetooth communication.
Firstly, a transmitting terminal establishes a Bluetooth connection with a receiving terminal, and the transmitting terminal acquires a file to be transmitted after establishing the Bluetooth connection with the receiving terminal.
The data in the file to be transmitted may not be transmitted before, or may be in a situation where part of the data is transmitted, for example, the file transmission is interrupted due to network signal interruption.
Step S102, according to a preset fragmentation strategy, dynamically adjusting the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted, and sending the next transmission fragmentation to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted.
In order to reduce the time consumption of data transmission, especially to improve the data transmission capability and efficiency between terminals when transmitting large data, the embodiment adopts a transmission strategy of dynamically slicing data.
Specifically, the fragment size (for example, 16 to 256KB) of the next transmission fragment in the remaining data of the file to be transmitted may be dynamically adjusted according to the current network state (for example, current bluetooth communication signal strength, interference condition, etc.) between the sending terminal and the receiving terminal, the size of the remaining data, and the last fragment transmission condition (for example, the transmission rate and the transmission size of the last fragment), and according to this principle, the remaining data of the file to be transmitted is fragmented, and the next transmission fragment is sent to the receiving terminal according to the fragment size until all file data are completely transmitted.
According to the scheme, the Bluetooth connection is established between the sending terminal and the receiving terminal, then the fragment size of the next transmission fragment in the residual data of the file to be transmitted is dynamically adjusted according to the preset fragment strategy, the next transmission fragment is sent to the receiving terminal according to the fragment size until the file to be transmitted is completely transmitted, therefore, the time consumed by data transmission can be reduced by dynamically adjusting the fragment size, and particularly when large data is transmitted, the data transmission capacity and efficiency between terminals are improved
As shown in fig. 4, a second embodiment of the present invention provides a file transmission method, including:
step S101, establishing Bluetooth communication connection with a receiving terminal;
the method of the embodiment relates to a sending terminal and a receiving terminal, wherein the sending terminal is used for transmitting files to the receiving terminal, and the receiving terminal is used for receiving the files from the sending terminal. The functions of the transmitting terminal and the receiving terminal in this embodiment may be interchanged. In the embodiment, a sending terminal is taken as a mobile phone, and a receiving terminal is taken as wearable equipment for example; in other embodiments, the sending terminal may also be a wearable device, and the receiving terminal is a mobile phone, or both the sending terminal and the receiving terminal are wearable devices, or both the receiving terminal and the sending terminal are mobile phones.
In addition, the sending terminal and the receiving terminal are connected through a wireless network, and the wireless network transmission mode includes but is not limited to bluetooth and the like.
Taking a mobile phone and the wearable device as examples, data interaction between the mobile phone and the wearable device can be realized through Bluetooth communication.
Firstly, a transmitting terminal establishes a Bluetooth connection with a receiving terminal, and the transmitting terminal acquires a file to be transmitted after establishing the Bluetooth connection with the receiving terminal.
The data in the file to be transmitted may not be transmitted before, or may be a situation where part of the data is transmitted, for example, the file transmission is interrupted due to network signal interruption.
Step S103, extracting initial fragments with preset sizes from the file to be transmitted, and sending the initial fragments to a receiving terminal;
step S102, according to a preset fragmentation strategy, dynamically adjusting the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted, and sending the next transmission fragmentation to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted.
In order to reduce the time consumption of data transmission, especially to improve the data transmission capability and efficiency between terminals when transmitting large data, the embodiment adopts a transmission strategy of dynamically slicing data.
Specifically, firstly, a sending terminal obtains a file to be transmitted, extracts an initial fragment with a preset size from the file to be transmitted, and sends the initial fragment to a receiving terminal.
The size of the initial fragment can be flexibly set according to needs, for example, the size can be set to 16-64 KB by default, and is preferably 32 KB.
Of course, it will be understood by those skilled in the art that the size of the initial segment may also be set according to the current bluetooth communication signal strength between the current sending terminal and the receiving terminal.
After the transmission of the initial fragment is completed, the sending terminal dynamically adjusts the fragment size of the next transmission fragment in the residual data of the file to be transmitted according to a preset fragment strategy, and sends the next transmission fragment to the receiving terminal according to the fragment size until the transmission of the file to be transmitted is completed.
Specifically, the size of the next transmission fragment (for example, 16 to 256KB) in the remaining data of the file to be transmitted may be dynamically adjusted according to the current network state (for example, current bluetooth communication signal strength, interference condition, and the like) between the sending terminal and the receiving terminal, the size of the remaining data, and the transmission condition of the last fragment (for example, the transmission rate and the transmission size of the last fragment), and the remaining data of the file to be transmitted may be fragmented according to this principle until all file data are completely transmitted.
According to the scheme, the sending terminal and the receiving terminal establish Bluetooth connection to acquire the file to be transmitted; extracting initial fragments with preset sizes from a file to be transmitted, and sending the initial fragments to a receiving terminal; the method comprises the steps of dynamically adjusting the fragment size of a next transmission fragment in the residual data of a file to be transmitted according to a preset fragment strategy, sending the next transmission fragment to a receiving terminal according to the fragment size until the file to be transmitted is transmitted, and therefore, by dynamically adjusting the fragment size, the time consumed by data transmission can be reduced, and particularly when large data is transmitted, the data transmission capacity and efficiency between terminals are improved.
Further, based on the above embodiment, as an implementation, as shown in fig. 5, the step S103: according to a preset fragmentation strategy, dynamically adjusting the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted, and sending the next transmission fragmentation to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, wherein the process can comprise:
step S1031, obtaining the current Bluetooth communication signal intensity, the transmission rate and the size of the last transmission fragment and the size of the residual data between the current Bluetooth communication signal intensity and the receiving terminal;
step S1032, acquiring the fragment size of the next transmission fragment according to the current Bluetooth communication signal intensity between the receiving terminal and the receiving terminal, the transmission rate and the size of the last transmission fragment and the size of the residual data;
step S1033, extracting the next transmission fragment of the fragment size from the remaining data of the file to be transmitted, and sending the next transmission fragment to the receiving terminal.
And repeating the process until the file to be transmitted is transmitted.
In the present embodiment, the related factors affecting the transmission of the fragmented data include, but are not limited to, the following: the current Bluetooth communication signal intensity between the sending terminal and the receiving terminal, the transmission rate and the size of the last transmission fragment, and the size of the residual data. Here, a connection distance between the transmitting terminal and the receiving terminal and the like may be considered.
In this embodiment, the sending terminal calculates the fragment size of the next transmission fragment according to the current bluetooth communication signal strength between the sending terminal and the receiving terminal, the transmission rate and size of the last transmission fragment, and the size of the remaining data of the file to be transmitted.
It will be understood by those skilled in the art that, when the size of the next transmission fragment in the remaining data of the file to be transmitted is dynamically adjusted, a calculation formula may be designed based on the above-mentioned related factors, for example, a linear function may be introduced, and a correction coefficient may be introduced into the linear function, and the correction coefficient is calculated by the above-mentioned related factors.
Further, based on the above embodiment, as another implementation, as shown in fig. 6, the step S103: according to a preset fragmentation strategy, dynamically adjusting the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted, and sending the next transmission fragmentation to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, wherein the process can include:
step S1034, receiving the size of the next transmission fragment sent by the receiving terminal; the size of the next transmission fragment is obtained by the receiving terminal according to the current Bluetooth communication signal intensity between the receiving terminal and the sending terminal, the transmission rate and the size of the last transmission fragment and the size of the residual data;
step S1035, extracting the next transmission fragment of the fragment size from the remaining data of the file to be transmitted, and sending the next transmission fragment to the receiving terminal.
And repeating the process until the file to be transmitted is transmitted.
Compared with the above embodiment, in this embodiment, the receiving terminal calculates the size of the next transmission fragment according to the current bluetooth communication signal strength between the sending terminal and the receiving terminal, the transmission rate and size of the last transmission fragment, and the size of the remaining data of the file to be transmitted, and uploads the size of the next transmission fragment to the sending terminal, and the sending terminal transmits the next fragment according to the size of the fragment.
According to the scheme, the time consumed by data transmission can be reduced by dynamically adjusting the size of the fragments, and particularly, when large data is transmitted, the data transmission capacity and efficiency between terminals are improved.
As shown in fig. 7, a third embodiment of the present invention proposes a file transfer method, based on the embodiment shown in fig. 4, in the step S101: before establishing the bluetooth communication connection with the receiving terminal, the method may further include:
step S100, setting an initial fragment size according to the current Bluetooth communication signal intensity between the receiving terminal and the receiving terminal; or receiving the initial fragment size sent by the receiving terminal, wherein the initial fragment size is set by the receiving terminal according to the current Bluetooth communication signal intensity with the sending terminal.
Compared with the embodiment shown in fig. 4, the present embodiment further includes a scheme for setting the initial slice size.
As an implementation manner, the sending terminal may set an initial fragment size according to the current bluetooth communication signal strength between the sending terminal and the receiving terminal;
or, as another embodiment, the receiving terminal may set the initial segment size according to the current bluetooth communication signal strength between the sending terminal and the receiving terminal. Then, the receiving terminal transmits the set initial fragment size to the transmitting terminal.
According to the scheme, the Bluetooth connection is established between the sending terminal and the receiving terminal by setting the size of the initial fragment, and when a file is transmitted, the sending terminal extracts the initial fragment with the preset size from the file to be transmitted and sends the initial fragment to the receiving terminal; according to a preset fragmentation strategy, the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted is dynamically adjusted, and the next transmission fragmentation is sent to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, so that the time consumption of data transmission can be reduced by dynamically adjusting the fragmentation size, and particularly, the data transmission capacity and efficiency between terminals are improved when large data is transmitted; in addition, the scheme of the invention can also support breakpoint continuous transmission, and further improve the data transmission capability.
In the following, referring to fig. 8, a scheme of an embodiment of the present invention is described in detail by taking a transmitting terminal as a mobile phone and a receiving terminal as a wearable device for example.
1. The mobile phone starts to send files to the wearable device;
2. the wearable device sets the size of the initial fragment according to the signal intensity and sends the initial fragment to the mobile phone;
3. the mobile phone sends the fragment data according to the obtained fragment size;
4. the wearable device calculates the size of the next fragment according to the size and the receiving rate of the previous fragment, the signal intensity between the mobile phone and the wearable device and the like, and sends the next fragment to the mobile phone;
5. and the mobile phone sends data according to the new fragment size.
Therefore, by dynamically adjusting the size of the fragments, data transmission can be ensured according to the actual Bluetooth environment, the time consumption of data transmission is reduced, and particularly when large data is transmitted, the data transmission capability and efficiency between terminals are improved; in addition, the scheme of the invention can also support breakpoint continuous transmission, and further improve the data transmission capability.
As shown in fig. 9, a fourth embodiment of the present invention proposes a file transmission method, based on the embodiment shown in fig. 7, after the step S102, the method further includes:
step S104, in the data transmission process, if the Bluetooth communication connection between the receiving terminal and the receiving terminal is interrupted and recovered, acquiring a transmission breakpoint of the file to be transmitted;
and step S105, continuously transmitting the residual data of the file to be transmitted to the receiving terminal based on the transmission breakpoint.
Compared with the embodiment, the scheme of the embodiment can also support breakpoint continuous transmission, and further improves data transmission capability.
Specifically, in the data transmission process, if the bluetooth communication connection between the sending terminal and the receiving terminal is interrupted and restored, the sending terminal acquires the transmission breakpoint of the file to be transmitted.
As an embodiment, the sending terminal may actively continue to transmit the corresponding segment to the receiving terminal, or the receiving terminal may request the sending terminal to continue to transmit the corresponding segment.
When the initial fragment is sent, the fragment start position is 0, and the determination of the continuous transmission start position can be determined according to the transmission breakpoint of the file to be transmitted. The following scheme can be specifically adopted:
as an implementation manner, the sending terminal sends a file continuous transmission request to the receiving terminal, the receiving terminal determines transmission breakpoint information according to the received file transmission data, and feeds back response information carrying the transmission breakpoint information to the sending terminal; and the sending terminal receives the response information sent by the receiving terminal and acquires the transmission breakpoint of the file to be transmitted from the response information.
Or, as another implementation, the sending terminal receives a file continuous transmission request carrying transmission breakpoint information sent by the receiving terminal, and the receiving terminal determines the transmission breakpoint information according to the received file transmission data; and the sending terminal acquires the transmission breakpoint from the file continuous transmission request.
And then, based on the transmission breakpoint, continuously transmitting the residual data fragments of the file to be transmitted to the receiving terminal.
According to the scheme, the Bluetooth connection is established between the sending terminal and the receiving terminal by setting the size of the initial fragment, and when a file is transmitted, the sending terminal extracts the initial fragment with the preset size from the file to be transmitted and sends the initial fragment to the receiving terminal; according to a preset fragmentation strategy, the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted is dynamically adjusted, the next transmission fragmentation is sent to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, and therefore by dynamically adjusting the fragmentation size, data transmission can be guaranteed according to the actual Bluetooth environment, the time consumed by data transmission is reduced, and particularly when large data is transmitted, the data transmission capacity and efficiency between terminals are improved; in addition, the scheme of the invention can also support breakpoint continuous transmission, and further improve the data transmission capability.
It should be noted that, after the network is interrupted between the sending terminal and the receiving terminal, the sending terminal may also try a retransmission mechanism, and retransmit the current fragment within a predetermined time until the retransmission of the current fragment is successful, or stop the retransmission when the time is reached. Thereby increasing the effectiveness of data transfer.
Correspondingly, the file transmission terminal embodiment of the invention is provided.
As shown in fig. 10, a first embodiment of the present invention provides a file transfer terminal, including: a connection establishing module 201 and a fragment transmitting module 202, wherein:
a connection establishing module 201, configured to establish a bluetooth communication connection with a receiving terminal;
the fragment transmission module 202 is configured to dynamically adjust a fragment size of a next transmission fragment in the remaining data of the file to be transmitted according to a preset fragment policy, and send the next transmission fragment to the receiving terminal according to the fragment size until the file to be transmitted is completely transmitted.
The present embodiment relates to a sending terminal and a receiving terminal, wherein the sending terminal is used for transmitting a file to the receiving terminal, and the receiving terminal is used for receiving the file from the sending terminal. The functions of the transmitting terminal and the receiving terminal in this embodiment may be interchanged. In the embodiment, a sending terminal is taken as a mobile phone, and a receiving terminal is taken as wearable equipment for example; in other embodiments, the sending terminal may also be a wearable device, and the receiving terminal is a mobile phone, or both the sending terminal and the receiving terminal are wearable devices, or both the receiving terminal and the sending terminal are mobile phones.
In addition, the sending terminal and the receiving terminal are connected through a wireless network, and the wireless network transmission mode includes but is not limited to bluetooth and the like.
Taking a mobile phone and the wearable device as examples, data interaction between the mobile phone and the wearable device can be realized through Bluetooth communication.
Firstly, a transmitting terminal establishes a Bluetooth connection with a receiving terminal, and the transmitting terminal acquires a file to be transmitted after establishing the Bluetooth connection with the receiving terminal.
The data in the file to be transmitted may not be transmitted before, or may be in a situation where part of the data is transmitted, for example, the file transmission is interrupted due to network signal interruption.
In order to reduce the time consumption of data transmission, especially to improve the data transmission capability and efficiency between terminals when transmitting large data, the embodiment adopts a transmission strategy of dynamically slicing data.
Specifically, the fragment size (for example, 16 to 256KB) of the next transmission fragment in the remaining data of the file to be transmitted may be dynamically adjusted according to the current network state (for example, current bluetooth communication signal strength, interference condition, etc.) between the sending terminal and the receiving terminal, the size of the remaining data, and the last fragment transmission condition (for example, the transmission rate and the transmission size of the last fragment), and according to this principle, the remaining data of the file to be transmitted is fragmented, and the next transmission fragment is sent to the receiving terminal according to the fragment size until all file data are completely transmitted.
According to the scheme, the Bluetooth connection is established between the sending terminal and the receiving terminal, then the fragment size of the next transmission fragment in the residual data of the file to be transmitted is dynamically adjusted according to the preset fragment strategy, the next transmission fragment is sent to the receiving terminal according to the fragment size until the file to be transmitted is completely transmitted, therefore, the time consumed by data transmission can be reduced by dynamically adjusting the fragment size, and particularly, when large data is transmitted, the data transmission capacity and efficiency between the terminals are improved.
As shown in fig. 11, a second embodiment of the present invention provides a file transfer terminal, including: a connection establishing module 201, an initial transmission module 203, and a fragment transmission module 202, wherein:
a connection establishing module 201, configured to establish a bluetooth communication connection with a receiving terminal;
the initial transmission module 203 is configured to extract an initial fragment with a preset size from the file to be transmitted, and send the initial fragment to a receiving terminal;
the fragment transmission module 202 is configured to dynamically adjust a fragment size of a next transmission fragment in the remaining data of the file to be transmitted according to a preset fragment policy, and send the next transmission fragment to the receiving terminal according to the fragment size until the file to be transmitted is completely transmitted.
The present embodiment relates to a sending terminal and a receiving terminal, wherein the sending terminal is used for transmitting a file to the receiving terminal, and the receiving terminal is used for receiving the file from the sending terminal. The functions of the transmitting terminal and the receiving terminal in this embodiment may be interchanged. In the embodiment, a sending terminal is taken as a mobile phone, and a receiving terminal is taken as wearable equipment for example; in other embodiments, the sending terminal may also be a wearable device, and the receiving terminal is a mobile phone, or both the sending terminal and the receiving terminal are wearable devices, or both the receiving terminal and the sending terminal are mobile phones.
In addition, the sending terminal and the receiving terminal are connected through a wireless network, and the wireless network transmission mode includes but is not limited to bluetooth and the like.
Taking a mobile phone and the wearable device as examples, data interaction between the mobile phone and the wearable device can be realized through Bluetooth communication.
Firstly, a transmitting terminal establishes a Bluetooth connection with a receiving terminal, and the transmitting terminal acquires a file to be transmitted after establishing the Bluetooth connection with the receiving terminal.
The data in the file to be transmitted may not be transmitted before, or may be a situation where part of the data is transmitted, for example, the file transmission is interrupted due to network signal interruption.
In order to reduce the time consumption of data transmission, especially to improve the data transmission capability and efficiency between terminals when transmitting large data, the embodiment adopts a transmission strategy of dynamically slicing data.
Specifically, firstly, a sending terminal obtains a file to be transmitted, extracts an initial fragment with a preset size from the file to be transmitted, and sends the initial fragment to a receiving terminal.
The size of the initial fragment can be flexibly set according to needs, for example, the size can be set to 16-64 KB by default, and is preferably 32 KB.
Of course, it will be understood by those skilled in the art that the size of the initial segment may also be set according to the current bluetooth communication signal strength between the current sending terminal and the receiving terminal.
After the transmission of the initial fragment is completed, the sending terminal dynamically adjusts the fragment size of the next transmission fragment in the residual data of the file to be transmitted according to a preset fragment strategy, and sends the next transmission fragment to the receiving terminal according to the fragment size until the transmission of the file to be transmitted is completed.
Specifically, the size of the next transmission fragment (for example, 16 to 256KB) in the remaining data of the file to be transmitted may be dynamically adjusted according to the current network state (for example, current bluetooth communication signal strength, interference condition, and the like) between the sending terminal and the receiving terminal, the size of the remaining data, and the transmission condition of the last fragment (for example, the transmission rate and the transmission size of the last fragment), and the remaining data of the file to be transmitted may be fragmented according to this principle until all file data are completely transmitted.
More specifically, as an implementation manner, the above dynamically adjusting, according to a preset fragmentation policy, a fragmentation size of a next transmission fragmentation in the remaining data of the file to be transmitted, and sending the next transmission fragmentation to the receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted may include:
and the sending terminal calculates the fragment size of the next transmission fragment according to the current Bluetooth communication signal intensity between the sending terminal and the receiving terminal, the transmission rate and the size of the last transmission fragment and the size of the residual data of the file to be transmitted.
It will be understood by those skilled in the art that, when the size of the next transmission fragment in the remaining data of the file to be transmitted is dynamically adjusted, a calculation formula may be designed based on the above-mentioned related factors, for example, a linear function may be introduced, and a correction coefficient may be introduced into the linear function, and the correction coefficient is calculated by the above-mentioned related factors.
As another embodiment, the above dynamically adjusting the size of the next transmission fragment in the remaining data of the file to be transmitted according to the preset fragmentation policy, and sending the next transmission fragment to the receiving terminal according to the size of the fragment until the file to be transmitted is completely transmitted may include:
and the receiving terminal calculates the fragment size of the next transmission fragment according to the current Bluetooth communication signal intensity between the sending terminal and the receiving terminal, the transmission rate and the size of the last transmission fragment and the size of the residual data of the file to be transmitted, uploads the fragment size to the sending terminal, and the sending terminal transmits the next fragment according to the fragment size.
According to the scheme, the time consumed by data transmission can be reduced by dynamically adjusting the size of the fragments, and particularly, when large data is transmitted, the data transmission capacity and efficiency between terminals are improved.
Therefore, in the embodiment, through the scheme, the sending terminal and the receiving terminal establish the bluetooth connection to acquire the file to be transmitted; extracting initial fragments with preset sizes from a file to be transmitted, and sending the initial fragments to a receiving terminal; the method comprises the steps of dynamically adjusting the fragment size of a next transmission fragment in the residual data of a file to be transmitted according to a preset fragment strategy, sending the next transmission fragment to a receiving terminal according to the fragment size until the file to be transmitted is transmitted, and therefore, by dynamically adjusting the fragment size, the time consumed by data transmission can be reduced, and particularly when large data is transmitted, the data transmission capacity and efficiency between terminals are improved.
As shown in fig. 12, a third embodiment of the present invention provides a file transmission terminal, based on the embodiment shown in fig. 11, the file transmission terminal further includes:
the setting module 200 is used for setting the size of the initial fragment according to the current Bluetooth communication signal intensity of the current Bluetooth communication with the receiving terminal; or receiving the initial fragment size sent by the receiving terminal, wherein the initial fragment size is set by the receiving terminal according to the current Bluetooth communication signal intensity of the current Bluetooth communication with the file transmission terminal.
Compared with the embodiment shown in fig. 11, this embodiment further includes a scheme of setting the initial slice size.
As an implementation manner, the sending terminal may set an initial fragment size according to the current bluetooth communication signal strength between the sending terminal and the receiving terminal;
or, as another embodiment, the receiving terminal may set the initial segment size according to the current bluetooth communication signal strength between the sending terminal and the receiving terminal. Then, the receiving terminal transmits the set initial fragment size to the transmitting terminal.
According to the scheme, the Bluetooth connection is established between the sending terminal and the receiving terminal by setting the size of the initial fragment, and when a file is transmitted, the sending terminal extracts the initial fragment with the preset size from the file to be transmitted and sends the initial fragment to the receiving terminal; according to a preset fragmentation strategy, the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted is dynamically adjusted, and the next transmission fragmentation is sent to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, so that the time consumption of data transmission can be reduced by dynamically adjusting the fragmentation size, and particularly, the data transmission capacity and efficiency between terminals are improved when large data is transmitted; in addition, the scheme of the invention can also support breakpoint continuous transmission, and further improve the data transmission capability.
Further, the fragment transmission module 202 is further configured to, during data transmission, obtain a transmission breakpoint of the file to be transmitted if the bluetooth communication connection with the receiving terminal is interrupted and resumed; based on the transmission breakpoint, continuously transmitting the fragments corresponding to the residual data of the file to be transmitted to the receiving terminal
The scheme of the embodiment can also support breakpoint continuous transmission, and further improve data transmission capability.
Specifically, in the data transmission process, if the bluetooth communication connection between the sending terminal and the receiving terminal is interrupted and restored, the sending terminal acquires the transmission breakpoint of the file to be transmitted.
As an embodiment, the sending terminal may actively continue to transmit the corresponding segment to the receiving terminal, or the receiving terminal may request the sending terminal to continue to transmit the corresponding segment.
When the initial fragment is sent, the fragment start position is 0, and the determination of the continuous transmission start position can be determined according to the transmission breakpoint of the file to be transmitted. The following scheme can be specifically adopted:
as an implementation manner, the sending terminal sends a file continuous transmission request to the receiving terminal, the receiving terminal determines transmission breakpoint information according to the received file transmission data, and feeds back response information carrying the transmission breakpoint information to the sending terminal; and the sending terminal receives the response information sent by the receiving terminal and acquires the transmission breakpoint of the file to be transmitted from the response information.
Or, as another implementation, the sending terminal receives a file continuous transmission request carrying transmission breakpoint information sent by the receiving terminal, and the receiving terminal determines the transmission breakpoint information according to the received file transmission data; and the sending terminal acquires the transmission breakpoint from the file continuous transmission request.
And then, based on the transmission breakpoint, continuously transmitting the residual data fragments of the file to be transmitted to the receiving terminal.
According to the scheme, the Bluetooth connection is established between the sending terminal and the receiving terminal by setting the size of the initial fragment, and when a file is transmitted, the sending terminal extracts the initial fragment with the preset size from the file to be transmitted and sends the initial fragment to the receiving terminal; according to a preset fragmentation strategy, the fragmentation size of the next transmission fragmentation in the residual data of the file to be transmitted is dynamically adjusted, the next transmission fragmentation is sent to a receiving terminal according to the fragmentation size until the file to be transmitted is completely transmitted, and therefore by dynamically adjusting the fragmentation size, data transmission can be guaranteed according to the actual Bluetooth environment, the time consumed by data transmission is reduced, and particularly when large data is transmitted, the data transmission capacity and efficiency between terminals are improved; in addition, the scheme of the invention can also support breakpoint continuous transmission, and further improve the data transmission capability.
It should be noted that, after the network is interrupted between the sending terminal and the receiving terminal, the sending terminal may also try a retransmission mechanism, and retransmit the current fragment within a predetermined time until the retransmission of the current fragment is successful, or stop the retransmission when the time is reached. Thereby increasing the effectiveness of data transfer.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only for the preferred embodiment of the present invention and is not intended to limit the scope of the present invention, and all equivalent structures or flow transformations made by the present specification and drawings, or applied directly or indirectly to other related arts, are included in the scope of the present invention.

Claims (15)

1. A method for file transfer, comprising:
the intelligent wearable device establishes Bluetooth communication connection with the receiving terminal;
the method comprises the steps that an intelligent wearable device sets an initial fragment size according to the current Bluetooth communication signal intensity between the intelligent wearable device and a receiving terminal, extracts an initial fragment with a preset size from a file to be transmitted, and sends the initial fragment to the receiving terminal, wherein the size of the initial fragment is determined according to the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal;
the intelligent wearable device acquires the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal, the transmission rate and the size of a last transmission fragment, the distance between the intelligent wearable device and the receiving terminal and the size of residual data, wherein the current Bluetooth communication signal intensity is a current network state between the sending terminal and the receiving terminal;
acquiring the fragment size of the next transmission fragment by introducing a linear function with a correction coefficient according to the intelligent wearable device, wherein the correction coefficient is determined according to the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal, the transmission rate and the size of the last transmission fragment, the distance between the intelligent wearable device and the receiving terminal, and the size of the residual data;
the intelligent wearable device extracts the next transmission fragment with the fragment size from the residual data of the file to be transmitted and sends the next transmission fragment to the receiving terminal;
and repeating the process until the file to be transmitted is transmitted.
2. The method according to claim 1, wherein after the smart wearable device establishes the bluetooth connection with the receiving terminal, the method further comprises:
the intelligent wearable device receives an initial fragment size sent by the receiving terminal, wherein the initial fragment size is set by the receiving terminal according to the current Bluetooth communication signal intensity of the sending terminal, and the current Bluetooth communication signal intensity is a current network state between the sending terminal and the receiving terminal.
3. The method according to claim 1, wherein the step of the intelligent wearable device dynamically adjusting the size of a next transmission fragment in the remaining data of the file to be transmitted according to a preset fragment policy, and sending the next transmission fragment to the receiving terminal according to the size of the fragment until the file to be transmitted is completely transmitted comprises:
receiving the size of the next transmission fragment sent by the receiving terminal; the size of the next transmission fragment is obtained by the receiving terminal according to the current Bluetooth communication signal intensity between the receiving terminal and the sending terminal, the transmission rate and the size of the last transmission fragment and the size of the residual data, wherein the current Bluetooth communication signal intensity is a current network state between the sending terminal and the receiving terminal;
extracting the next transmission fragment with the fragment size from the residual data of the file to be transmitted, and sending the next transmission fragment to the receiving terminal;
and repeating the process until the file to be transmitted is transmitted.
4. The method according to any one of claims 1-3, further comprising:
in the data transmission process, if the Bluetooth communication connection between the intelligent wearable device and the receiving terminal is interrupted and recovered, acquiring a transmission breakpoint of the file to be transmitted;
and continuously transmitting the residual data of the file to be transmitted to the receiving terminal based on the transmission breakpoint.
5. The method according to claim 4, wherein the step of the intelligent wearable device obtaining the transmission breakpoint of the file to be transmitted comprises:
sending a file continuous transmission request to the receiving terminal, determining transmission breakpoint information by the receiving terminal according to the received file transmission data, and feeding back response information carrying the transmission breakpoint information;
and receiving the response information, and acquiring the transmission breakpoint of the file to be transmitted from the response information.
6. The method according to claim 3, wherein the step of the intelligent wearable device obtaining the transmission breakpoint of the file to be transmitted comprises:
receiving a file continuous transmission request which is sent by the receiving terminal and carries transmission breakpoint information, wherein the transmission breakpoint information is determined by the receiving terminal according to the received file transmission data;
and acquiring the transmission breakpoint from the file continuous transmission request.
7. The method according to any one of claims 1 to 3, wherein the sending terminal is a mobile phone and the receiving terminal is a wearable device.
8. The utility model provides a file transmission terminal, its characterized in that, file transmission terminal is intelligent wearing equipment, includes:
the connection establishing module is used for establishing Bluetooth communication connection with the receiving terminal;
the fragment transmission module is used for acquiring the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal, the transmission rate and the size of the last transmission fragment, the distance between the intelligent wearable device and the receiving terminal and the size of the residual data; acquiring the fragment size of the next transmission fragment by introducing a linear function with a correction coefficient, wherein the correction coefficient is determined according to the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal, the transmission rate and the size of the last transmission fragment, the distance between the intelligent wearable device and the receiving terminal and the size of the residual data, and the current Bluetooth communication signal intensity is a current network state between the sending terminal and the receiving terminal; extracting the next transmission fragment with the fragment size from the residual data of the file to be transmitted, and sending the next transmission fragment to the receiving terminal; repeating the process until the file to be transmitted is transmitted;
the file transfer terminal further includes: the initial transmission module is used for setting the size of an initial fragment according to the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal, extracting an initial fragment with a preset size from the file to be transmitted, and sending the initial fragment to the receiving terminal, wherein the size of the initial fragment is determined according to the current Bluetooth communication signal intensity between the intelligent wearable device and the receiving terminal.
9. The terminal of claim 8, wherein the terminal further comprises:
the device comprises a setting module, a receiving module and a processing module, wherein the setting module is used for setting the size of an initial fragment according to the current Bluetooth communication signal intensity between the receiving terminal and a sending terminal, and the current Bluetooth communication signal intensity is a current network state between the sending terminal and the receiving terminal; or receiving an initial fragment size sent by the receiving terminal, where the initial fragment size is set by the receiving terminal according to a current bluetooth communication signal strength with the file transmission terminal, where the current bluetooth communication signal strength is a current network state between the sending terminal and the receiving terminal.
10. The terminal of claim 8,
the fragment transmission module is further configured to receive the size of the next transmission fragment sent by the receiving terminal; the size of the next transmission fragment is obtained by the receiving terminal according to the current Bluetooth communication signal intensity of the current Bluetooth communication between the receiving terminal and the file transmission terminal, the transmission rate and the size of the last transmission fragment and the size of the residual data, wherein the current Bluetooth communication signal intensity is a current network state between the sending terminal and the receiving terminal; extracting the next transmission fragment with the fragment size from the residual data of the file to be transmitted, and sending the next transmission fragment to the receiving terminal; and repeating the process until the file to be transmitted is transmitted.
11. The terminal according to any of claims 8-10,
the fragment transmission module is also used for acquiring a transmission breakpoint of the file to be transmitted if the Bluetooth communication connection between the fragment transmission module and the receiving terminal is interrupted and recovered in the data transmission process; and continuously transmitting the fragments corresponding to the residual data of the file to be transmitted to the receiving terminal based on the transmission breakpoint.
12. The terminal of claim 11,
the fragment transmission module is further used for sending a file continuous transmission request to the receiving terminal, and the receiving terminal determines transmission breakpoint information according to existing file transmission data and feeds back response information carrying the transmission breakpoint information;
and the fragment transmission module is also used for receiving the response information and acquiring the transmission breakpoint of the file to be transmitted from the response information.
13. The terminal of claim 11,
the fragment transmission module is further configured to receive a file continuous transmission request carrying transmission breakpoint information sent by the receiving terminal, and the receiving terminal determines the transmission breakpoint information according to the received file transmission data; and the fragment transmission module is also used for acquiring the transmission breakpoint from the file continuous transmission request.
14. A file transfer terminal, characterized in that the terminal comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the file transfer method according to any one of claims 1 to 7 by means of the computer program.
15. A storage medium comprising a stored program, wherein the program is executed by a processor, and wherein the processor executes the program to perform the file transfer method of any one of claims 1 to 7.
CN201510278012.5A 2015-05-27 2015-05-27 File transmission method and terminal Active CN106302589B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510278012.5A CN106302589B (en) 2015-05-27 2015-05-27 File transmission method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510278012.5A CN106302589B (en) 2015-05-27 2015-05-27 File transmission method and terminal

Publications (2)

Publication Number Publication Date
CN106302589A CN106302589A (en) 2017-01-04
CN106302589B true CN106302589B (en) 2020-07-28

Family

ID=57635173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510278012.5A Active CN106302589B (en) 2015-05-27 2015-05-27 File transmission method and terminal

Country Status (1)

Country Link
CN (1) CN106302589B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112423297A (en) * 2020-11-16 2021-02-26 重庆满集网络科技有限公司 Cross-border e-commerce and mobile terminal interaction method, system and storage medium

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110089040B (en) * 2017-04-07 2022-04-15 Oppo广东移动通信有限公司 Data transmission method and sending end equipment
CN106993050A (en) * 2017-04-28 2017-07-28 湖南中车时代通信信号有限公司 It is a kind of that accelerating method is transmitted with changing the outfit data car based on Locomotive Running Monitor System
CN109150935B (en) * 2017-06-19 2021-09-10 深圳联友科技有限公司 File transmission method and device and mobile terminal
CN107360191B (en) * 2017-08-28 2021-02-02 腾讯科技(深圳)有限公司 File acquisition method and device and storage equipment
CN108075875A (en) * 2018-01-15 2018-05-25 海信集团有限公司 A kind of data transmission method and device based on NB-IoT
CN108574735B (en) * 2018-04-11 2022-07-12 柴森森 Data processing method, terminal and computer readable storage medium
CN110611644A (en) * 2018-06-15 2019-12-24 视联动力信息技术股份有限公司 Data transmission method and device
CN110139180B (en) * 2019-04-08 2021-01-12 深圳索信达数据技术有限公司 Operation control method, device and computer readable storage medium
CN111245949A (en) * 2020-01-19 2020-06-05 中国建设银行股份有限公司 File filing and transmission method, device and equipment
CN111343098B (en) * 2020-02-13 2022-04-08 腾讯科技(深圳)有限公司 Data interaction method and device, computer equipment and storage medium
CN113765945A (en) * 2020-06-01 2021-12-07 深圳兆日科技股份有限公司 File dynamic fragmentation transmission method, device, equipment and storage medium
CN112256297A (en) * 2020-09-24 2021-01-22 苏宁智能终端有限公司 Bluetooth peripheral firmware upgrading method and system and mobile phone terminal
CN113518108A (en) * 2021-04-23 2021-10-19 北京奇艺世纪科技有限公司 Fragment uploading method, device, equipment and storage medium
CN113483827A (en) * 2021-07-26 2021-10-08 西安芯海微电子科技有限公司 Wearable device, and data processing method and device of wearable device
CN115242782B (en) * 2022-09-21 2023-01-03 之江实验室 Large file fragment transmission method and transmission architecture between super-computing centers

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001054370A2 (en) * 2000-01-24 2001-07-26 The University Of Manitoba Method and system for segmented file transfer
CN101217295A (en) * 2007-12-29 2008-07-09 深圳华为通信技术有限公司 File transmitting method, receiving method and device based on Bluetooth technique
CN101557464A (en) * 2009-04-01 2009-10-14 深圳市融创天下科技发展有限公司 Method for dynamically embedding other media segments in video program playback
CN102571966A (en) * 2012-01-16 2012-07-11 上海方正数字出版技术有限公司 Network transmission method for large extensible markup language (XML) document
CN104022852A (en) * 2014-06-25 2014-09-03 北京奇艺世纪科技有限公司 Document transmission method and device
CN104185216A (en) * 2013-05-28 2014-12-03 腾讯科技(深圳)有限公司 File transferring method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001054370A2 (en) * 2000-01-24 2001-07-26 The University Of Manitoba Method and system for segmented file transfer
CN101217295A (en) * 2007-12-29 2008-07-09 深圳华为通信技术有限公司 File transmitting method, receiving method and device based on Bluetooth technique
CN101557464A (en) * 2009-04-01 2009-10-14 深圳市融创天下科技发展有限公司 Method for dynamically embedding other media segments in video program playback
CN102571966A (en) * 2012-01-16 2012-07-11 上海方正数字出版技术有限公司 Network transmission method for large extensible markup language (XML) document
CN104185216A (en) * 2013-05-28 2014-12-03 腾讯科技(深圳)有限公司 File transferring method and apparatus
CN104022852A (en) * 2014-06-25 2014-09-03 北京奇艺世纪科技有限公司 Document transmission method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112423297A (en) * 2020-11-16 2021-02-26 重庆满集网络科技有限公司 Cross-border e-commerce and mobile terminal interaction method, system and storage medium

Also Published As

Publication number Publication date
CN106302589A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106302589B (en) File transmission method and terminal
CN105188098B (en) Network switching device and network switching method of mobile terminal
CN106413128B (en) Projection method and mobile terminal
CN106488420B (en) Incoming call processing method, device and system and readable storage medium
CN106937320B (en) Automatic operator parameter configuration method and terminal
CN105554869B (en) Mobile terminal communication method, equipment and communication system
CN106302651B (en) Social picture sharing method and terminal with social picture sharing system
CN109101447B (en) Method and terminal for parallel execution of OTG function and charging function
CN105551479B (en) Mobile terminal noise reduction method and device
CN106897018B (en) Gesture operation method and device and mobile terminal
CN106453863B (en) Method and system for controlling terminal and earphone
CN106648324B (en) Hidden icon control method and device and terminal
CN106412878B (en) Activation device and method for subscriber identity module card
CN105227771B (en) Picture transmission method and device
CN105939425B (en) Screen dynamic monitoring device and method
CN104639428B (en) Self-adaptive method for session scene in instant messaging and mobile terminal
CN107071275B (en) Image synthesis method and terminal
CN107025158B (en) Sliding operation testing method and device and terminal
CN106876980B (en) Terminal antenna system and setting method of terminal antenna
CN107027113B (en) SIM card activation method and mobile terminal
CN106792878B (en) Data traffic monitoring method and device
CN106873981B (en) Icon processing method and device and terminal
CN106791567B (en) Switching method and terminal
CN106412877B (en) Activation method and activation device for mobile terminal SIM card
CN105307156B (en) Device and method for requesting downloading of application

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant