CN105703808A - Method and device for transmitting data - Google Patents
Method and device for transmitting data Download PDFInfo
- Publication number
- CN105703808A CN105703808A CN201410710310.2A CN201410710310A CN105703808A CN 105703808 A CN105703808 A CN 105703808A CN 201410710310 A CN201410710310 A CN 201410710310A CN 105703808 A CN105703808 A CN 105703808A
- Authority
- CN
- China
- Prior art keywords
- terminal
- transmission mode
- supported
- transmission
- locally
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000005540 biological transmission Effects 0.000 claims abstract description 467
- 238000012545 processing Methods 0.000 abstract description 21
- 230000006870 function Effects 0.000 description 15
- 238000012546 transfer Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention discloses a method and device for transmitting data, belonging to the technical field of computers. The method comprises a step of obtaining the transmission mode supported by a first terminal and the corresponding connection information of each transmission mode supported by the first terminal provided by the first terminal, a step of determining the target transmission mode to be used according to the transmission mode supported by the local, the transmission mode supported by the first terminal and the priority order of each preset transmission mode, and a step of transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode. By using the method and device for transmitting data, the efficiency of transmission processing can be improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for transmitting data.
Background
With the development of mobile terminal technology, the application of mobile terminals is more and more extensive, and the functions are more and more powerful, so that people can transmit files, such as pictures, documents or audio, through the mobile terminals. One can install an application program for transferring files on the mobile terminal, and transfer files through the application program.
The mobile terminal may support a plurality of transmission modes, such as WiFi (wireless fidelity) transmission, bluetooth transmission, and the like. The application will typically provide an option of a supportable transfer mode by which the user can select the transfer mode that he wants to use and then transfer the file.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
when two users need to perform file transmission, a situation that the mobile terminal of one user selects a transmission mode and the mobile terminal of the other user does not support may occur, so that the users need to reselect the transmission mode, which may result in low efficiency of transmission processing.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for transmitting data. The technical scheme is as follows:
in a first aspect, a method for transmitting data is provided, the method comprising:
acquiring a transmission mode supported by a first terminal and connection information corresponding to each transmission mode supported by the first terminal, wherein the connection information is provided by the first terminal;
determining a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal and a preset priority order of each transmission mode;
and transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
In a second aspect, an apparatus for transmitting data is provided, the apparatus comprising:
an obtaining module, configured to obtain a transmission mode supported by a first terminal and connection information corresponding to each transmission mode supported by the first terminal, where the connection information is provided by the first terminal;
a determining module, configured to determine a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal, and a preset priority order of each transmission mode;
and the transmission module is used for transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in this embodiment of the present invention, in the embodiment of the present invention, a transmission mode supported by a first terminal provided by the first terminal is obtained, a target transmission mode to be used is determined according to the locally supported transmission mode, the transmission mode supported by the first terminal, and a preset priority order of each transmission mode, and data to be transmitted is transmitted through the target transmission mode.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for transmitting data according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of an interface display provided by an embodiment of the present invention;
fig. 3 is a schematic diagram of an application scenario for transmitting data according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for transmitting data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for transmitting data, and as shown in fig. 1, a processing flow of the method may include the following steps:
step 101, obtaining a transmission mode supported by a first terminal provided by the first terminal.
And 102, determining a target transmission mode to be used according to the locally supported transmission mode, the transmission mode supported by the first terminal and the preset priority order of each transmission mode.
And 103, transmitting the data to be transmitted through the target transmission mode.
In the embodiment of the invention, the transmission mode supported by the first terminal provided by the first terminal is obtained, the target transmission mode to be used is determined according to the locally supported transmission mode, the transmission mode supported by the first terminal and the preset priority order of each transmission mode, and the data to be transmitted is transmitted through the target transmission mode, so that the terminal can automatically select the transmission mode to be used, the transmission mode is the transmission mode supported by both the local terminal and the first terminal, repeated selection is not needed, and the efficiency of transmission processing can be improved.
Example two
The embodiment of the invention provides a method for transmitting data, wherein an execution main body of the method is a terminal. The terminal may be a terminal having a file transfer function. The following will describe the processing flow shown in fig. 1 in detail with reference to the specific embodiments, in practice, the first terminal may be a terminal that sends a file, and may also be a terminal that receives a file, and the embodiments of the present invention are explained by taking the first terminal as an example of a terminal that sends a file, and the contents may be as follows: .
Step 101, obtaining a transmission mode supported by a first terminal provided by the first terminal and connection information corresponding to each transmission mode supported by the first terminal.
The connection information is information required to establish connection with the first terminal, for example, the connection information corresponding to bluetooth transmission is a terminal identifier, and the connection information corresponding to WiFi (wireless fidelity) transmission is an IP (internet protocol, protocol for interconnection between networks) address of the terminal.
In implementation, a user may install an application (e.g., WeChat) having a file transfer function in a terminal, when the user needs to transfer a file to another terminal (which may be referred to as a second terminal) through a certain terminal (i.e., a first terminal), the application may be opened in the first terminal and the second terminal, then the file to be transferred is selected in the first terminal, a transfer key is clicked, the first terminal receives a transfer instruction, and then the locally supported transfer modes may be detected, and then connection information corresponding to each locally supported transfer mode may be acquired, and the second terminal may acquire the transfer mode supported by the first terminal and the connection information corresponding to each transfer mode supported by the first terminal, so as to be used later. For example, the first terminal detects that the supported transmission mode is bluetooth transmission, and may then acquire its own terminal identity. For the case that the first terminal is a terminal for receiving a file, a user may select a file to be transmitted and a target transmission account (i.e., an account logged in by the first terminal) at a terminal for sending the file, click a transmission key, the terminal may send a file transmission request to the server, the file transmission request may carry an account identifier of the target transmission account, after receiving the file transmission request, the server may send a file transmission notification to the terminal (i.e., the first terminal) logged in by the target transmission account, and the first terminal may receive the file transmission notification and perform the detection processing.
Optionally, the transmission mode supported by the first terminal and the connection information corresponding to each transmission mode supported by the first terminal, which are provided by the first terminal, may be obtained in multiple manners, and the specific processing manner in step 101 may be various, and several feasible processing manners are given below:
in the first mode, the graphic code displayed by the first terminal is scanned, and the transmission mode supported by the first terminal and the connection information corresponding to each transmission mode supported by the first terminal, which are recorded in the graphic code, are obtained.
In implementation, the graphic code may be a bar code or a two-dimensional code, and the graphic code is taken as a two-dimensional code as an example. After detecting the locally supported transmission mode, the first terminal may obtain an identifier of each locally supported transmission mode and connection information corresponding to each supported transmission instruction, and may then generate a two-dimensional code according to the identifier of the locally supported transmission mode and the connection information, and display the two-dimensional code, as shown in fig. 2. The second terminal can scan the two-dimensional code to obtain an image of the two-dimensional code, and then can analyze the image of the two-dimensional code to obtain the transmission mode supported by the first terminal and the connection information corresponding to each transmission mode supported by the first terminal, which are recorded in the two-dimensional code. In addition, the first terminal may also send the locally supported transmission mode and the connection information corresponding to each supported transmission mode to the server, the server may receive the information, generate the two-dimensional code according to the information, and then send the two-dimensional code to the first terminal, after receiving the two-dimensional code, the first terminal may display the two-dimensional code, and the second terminal may perform the above-mentioned scanning process on the two-dimensional code.
And receiving connection information corresponding to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal, wherein the connection information is sent by the first terminal through the server.
In implementation, after the application programs on the first terminal and the second terminal are opened, the accounts can be logged in the first terminal and the second terminal, the user can select a file to be transmitted and a target transmission account (namely, an account logged in the second terminal) on the first terminal, click a transmission key, the first terminal can receive a transmission instruction and can detect a locally supported transmission mode so as to obtain connection information corresponding to each locally supported transmission instruction, the first terminal can send the locally supported transmission mode, the connection information corresponding to each locally supported transmission instruction and an account identifier of the target transmission account to the server, and after receiving the information, the server can send the transmission mode supported by the first terminal and the connection information corresponding to each transmission instruction supported by the first terminal to the terminal (namely, the second terminal) logged in the target transmission account, the second terminal receives the information sent by the server, and acquires the transmission mode supported by the first terminal and the connection information corresponding to each transmission instruction supported by the first terminal.
Optionally, access point information of the transmission mode may be obtained, and accordingly, the processing procedure of step 101 may be as follows: the method comprises the steps of obtaining transmission modes supported by a first terminal, access point information of one or more transmission modes and connection information corresponding to each transmission mode supported by the first terminal, wherein the transmission modes are provided by the first terminal.
In implementation, after receiving the transmission instruction, the first terminal may detect the locally supported transmission mode and connection information corresponding to each locally supported transmission mode, and may further acquire access point information of one or more transmission modes in the locally supported transmission modes. For example, the first terminal detects that the locally supported transmission modes are bluetooth transmission and WiFi transmission, may acquire connection information of the bluetooth transmission, that is, a terminal identifier, and connection information of the WiFi transmission, that is, an IP address of the first terminal, and may also acquire access point information of the first terminal, that is, a gateway IP. The second terminal may obtain the information for subsequent use.
And 102, determining a target transmission mode to be used according to the locally supported transmission mode, the transmission mode supported by the first terminal and the preset priority order of each transmission mode.
In an implementation, a highest transmission speed is set in each transmission mode, and the priority order of each transmission mode may be set according to the size of the highest transmission speed of each transmission mode, and the higher the highest transmission speed is, the higher the priority of the corresponding transmission mode is. The first terminal and the second terminal may store preset priority order of each transmission mode, and after the second terminal obtains the transmission mode supported by the first terminal, the second terminal may obtain the locally supported transmission mode, then determine the transmission mode supported by the first terminal and the second terminal together and having the highest priority, and use the transmission mode as a target transmission mode to be used.
Optionally, a transmission mode commonly supported by the first terminal may be determined, and accordingly, the processing procedure of step 102 may be as follows: determining a transmission mode supported locally and jointly by the first terminal according to the locally supported transmission mode and the transmission mode supported by the first terminal; and determining the transmission mode with the highest priority in the transmission modes supported by the local terminal and the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
In implementation, after the second terminal obtains the transmission modes supported by the first terminal, the second terminal may obtain locally supported transmission modes, compare the locally supported transmission modes with the transmission modes supported by the first terminal, determine the transmission modes supported by both the local terminal and the first terminal, and then determine, according to a preset priority order of each transmission mode, the transmission mode with the highest priority among the transmission modes supported by both the local terminal and the first terminal, and use the transmission mode as a target transmission mode to be used. For example, the preset priority order of each transmission mode is WiFi transmission, bluetooth transmission, and 3G (3rd-generation, third generation mobile communication technology) network transmission, the transmission mode supported by the second terminal, which is obtained by the second terminal and supported by the first terminal, is bluetooth transmission, WiFi transmission, and 3G network transmission, and the locally supported transmission mode is bluetooth transmission and WiFi transmission, the second terminal may determine that the transmission mode supported locally and jointly by the first terminal is bluetooth transmission and WiFi transmission, and then may determine that the priority of WiFi transmission is the highest, and further may determine that WiFi transmission is the target transmission mode to be used.
Optionally, for the case of acquiring the access point information of the transmission mode, the corresponding processing procedure may be as follows: according to the transmission mode supported by the first terminal, acquiring access point information of one or more transmission modes, locally supported transmission modes and local access point information of the one or more transmission modes, and determining the transmission mode capable of establishing connection with the first terminal locally in the transmission modes supported by the first terminal locally and jointly; and determining the transmission mode with the highest priority in the transmission modes which can establish connection with the first terminal locally as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
In implementation, the second terminal may obtain the access point information of the transmission mode supported by the first terminal, the access point information of one or more transmission modes, the locally supported transmission mode, and the local access point information of the one or more transmission modes, for example, the second terminal may obtain the transmission modes supported by the first terminal as bluetooth transmission and WiFi transmission, and the gateway IP of WiFi transmission, the second terminal may further obtain the locally supported transmission modes as bluetooth transmission and WiFi transmission, and the access gateway IP of WiFi transmission locally, and then may determine that the transmission protocols supported locally and jointly by the first terminal are bluetooth transmission and WiFi transmission, and may further determine whether the gateway IP of WiFi transmission at the first terminal and locally access is the same, and if the gateway IP of WiFi transmission at the first terminal and locally access is the same, determine that locally can establish a connection with the first terminal through WiFi transmission, then, the second terminal may determine, according to a locally stored priority order of each transmission mode set in advance, that a transmission mode with the highest priority is WiFi transmission, and determine the WiFi transmission as a target transmission mode to be used.
Optionally, the transmission modes supported by the first terminal may be arranged according to a preset priority order of the transmission modes, and correspondingly, the processing procedure in step 102 may be as follows: searching locally supported transmission modes according to a priority order in the transmission modes supported by the first terminal and arranged according to the preset priority order of each transmission mode, and determining the first transmission mode as a target transmission mode to be used when the locally supported first transmission mode is searched.
In implementation, after the first terminal detects a locally supported transmission mode, the detected transmission modes may be arranged according to a preset priority order of each transmission mode to generate a sequence of the transmission modes, for example, the first terminal arranges the supported transmission modes into WiFi transmission, bluetooth transmission, and 3G network transmission, the second terminal may obtain the sequence of the transmission modes, and then may sequentially determine whether each transmission mode is a locally supported transmission mode according to the sequence of the transmission modes, that is, the second terminal may first search whether WiFi transmission is locally supported, if WiFi transmission is locally supported, determine WiFi transmission as a target transmission mode to be used, and does not search any more, if WiFi transmission is locally not supported, search whether bluetooth transmission is locally supported, and so on.
And 103, transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
In implementation, after the second terminal determines the target transmission mode to be used, the connection information corresponding to the target transmission mode may be obtained from the obtained connection information corresponding to each transmission mode supported by the first terminal, then the connection information corresponding to the target transmission mode in the local may be obtained, the connection information corresponding to the target transmission mode in the local may be sent to the first terminal according to the connection information corresponding to the target transmission mode in the first terminal, after receiving the connection information, the first terminal may establish a connection with the second terminal, and then the first terminal may transmit the data to be transmitted to the second terminal through the target transmission mode, as shown in fig. 3. For example, the second terminal determines that the target transmission mode is WiFi transmission, may obtain an IP address of the first terminal, then send a connection request to the first terminal through the IP address of the first terminal, where the connection request carries the IP address of the second terminal, and after receiving the connection request, the first terminal may establish WiFi connection with the second terminal, and then may transmit data to be transmitted to the second terminal through WiFi transmission. In addition, after the second terminal and the first terminal are connected, the locally pre-stored character string can be sent to the first terminal, after the character string is received by the first terminal, the character string can be compared with the locally pre-stored character string, and if the character string is the same as the locally pre-stored character string, the data to be transmitted is transmitted to the second terminal.
In the embodiment of the invention, the transmission mode supported by the first terminal provided by the first terminal is obtained, the target transmission mode to be used is determined according to the locally supported transmission mode, the transmission mode supported by the first terminal and the preset priority order of each transmission mode, and the data to be transmitted is transmitted through the target transmission mode, so that the terminal can automatically select the transmission mode to be used, the transmission mode is the transmission mode supported by both the local terminal and the first terminal, repeated selection is not needed, and the efficiency of transmission processing can be improved.
EXAMPLE III
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for transmitting data, as shown in fig. 4, the apparatus includes:
an obtaining module 410, configured to obtain a transmission mode supported by a first terminal and connection information corresponding to each transmission mode supported by the first terminal, where the connection information is provided by the first terminal;
a determining module 420, configured to determine a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal, and a preset priority order of each transmission mode;
the transmission module 430 is configured to transmit data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
Optionally, the determining module 420 is configured to:
determining a transmission mode supported locally and jointly by the first terminal according to the locally supported transmission mode and the transmission mode supported by the first terminal;
and determining the transmission mode with the highest priority in the transmission modes supported by the local terminal and the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
Optionally, the obtaining module 410 is configured to:
acquiring transmission modes supported by a first terminal, access point information of one or more transmission modes and connection information corresponding to each transmission mode supported by the first terminal, wherein the transmission modes are provided by the first terminal;
the determining module 420 is configured to:
according to the transmission modes supported by the first terminal, acquiring the access point information of the one or more transmission modes, the locally supported transmission modes and the local access point information of the one or more transmission modes, and determining the transmission mode which can establish connection with the first terminal locally in the transmission modes supported by the local and the first terminal;
and determining the transmission mode with the highest priority in the transmission modes which can be locally connected with the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
Optionally, the transmission modes supported by the first terminal are arranged according to a preset priority order of each transmission mode;
the determining module 420 is configured to:
and searching locally supported transmission modes according to the priority order in the transmission modes supported by the first terminal which are arranged according to the preset priority order of each transmission mode, and when the locally supported first transmission mode is searched, determining the first transmission mode as a target transmission mode to be used.
Optionally, the obtaining module 410 is configured to:
scanning a graphic code displayed by a first terminal, and acquiring connection information corresponding to a transmission mode supported by the first terminal and each transmission mode supported by the first terminal, which are recorded in the graphic code; or,
and receiving connection information which is sent by a first terminal through a server and corresponds to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal.
In the embodiment of the invention, the transmission mode supported by the first terminal provided by the first terminal is obtained, the target transmission mode to be used is determined according to the locally supported transmission mode, the transmission mode supported by the first terminal and the preset priority order of each transmission mode, and the data to be transmitted is transmitted through the target transmission mode, so that the terminal can automatically select the transmission mode to be used, the transmission mode is the transmission mode supported by both the local terminal and the first terminal, repeated selection is not needed, and the efficiency of transmission processing can be improved.
It should be noted that: in the data transmission apparatus provided in the above embodiment, only the division of the functional modules is illustrated when data is transmitted, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for transmitting data and the method for transmitting data provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Example four
Referring to fig. 5, a schematic structural diagram of a terminal according to an embodiment of the present invention is shown, where the terminal may be used to implement the method for transmitting data provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the terminal 400 may include RF (radio frequency) circuitry 110, memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, audio circuitry 160, a WiFi (wireless fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal structure shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (low noise amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (global system for mobile communications), GPRS (general packet radio service), CDMA (code division multiple access), WCDMA (wideband code division multiple access), LTE (long term evolution), email, SMS (short messaging service), etc.
The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 400, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 400, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and optionally, the display panel 141 may be configured in the form of an LCD (liquid crystal display), an OLED (organic light-emitting diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 5, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal 400 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or a backlight when the terminal 400 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 400, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 400. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of a peripheral headset with the terminal 400.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 400 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi module 170, and provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the terminal 400, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal 400, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 400 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal 400 further includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 180 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 400 may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the terminal 400 is a touch screen display, and the terminal 400 further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
acquiring a transmission mode supported by a first terminal and connection information corresponding to each transmission mode supported by the first terminal, wherein the connection information is provided by the first terminal;
determining a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal and a preset priority order of each transmission mode;
and transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
Optionally, the determining a target transmission mode to be used according to the locally supported transmission mode, the transmission mode supported by the first terminal, and the preset priority order of each transmission mode includes:
determining a transmission mode supported locally and jointly by the first terminal according to the locally supported transmission mode and the transmission mode supported by the first terminal;
and determining the transmission mode with the highest priority in the transmission modes supported by the local terminal and the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
Optionally, the obtaining the transmission mode supported by the first terminal and the connection information corresponding to each transmission mode supported by the first terminal, which are provided by the first terminal, includes:
acquiring transmission modes supported by a first terminal, access point information of one or more transmission modes and connection information corresponding to each transmission mode supported by the first terminal, wherein the transmission modes are provided by the first terminal;
the determining, according to the preset priority order of each transmission mode, a transmission mode with a highest priority among transmission modes supported by the local terminal and the first terminal as a target transmission mode includes:
according to the transmission modes supported by the first terminal, acquiring the access point information of the one or more transmission modes, the locally supported transmission modes and the local access point information of the one or more transmission modes, and determining the transmission mode which can establish connection with the first terminal locally in the transmission modes supported by the local and the first terminal;
and determining the transmission mode with the highest priority in the transmission modes which can be locally connected with the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
Optionally, the transmission modes supported by the first terminal are arranged according to a preset priority order of each transmission mode;
the determining a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal, and a preset priority order of each transmission mode includes:
and searching locally supported transmission modes according to the priority order in the transmission modes supported by the first terminal which are arranged according to the preset priority order of each transmission mode, and when the locally supported first transmission mode is searched, determining the first transmission mode as a target transmission mode to be used.
Optionally, the obtaining the transmission mode supported by the first terminal and the connection information corresponding to each transmission mode supported by the first terminal, which are provided by the first terminal, includes:
scanning a graphic code displayed by a first terminal, and acquiring connection information corresponding to a transmission mode supported by the first terminal and each transmission mode supported by the first terminal, which are recorded in the graphic code; or,
and receiving connection information which is sent by a first terminal through a server and corresponds to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal.
In the embodiment of the invention, the transmission mode supported by the first terminal provided by the first terminal is obtained, the target transmission mode to be used is determined according to the locally supported transmission mode, the transmission mode supported by the first terminal and the preset priority order of each transmission mode, and the data to be transmitted is transmitted through the target transmission mode, so that the terminal can automatically select the transmission mode to be used, the transmission mode is the transmission mode supported by both the local terminal and the first terminal, repeated selection is not needed, and the efficiency of transmission processing can be improved.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A method of transmitting data, the method comprising:
acquiring a transmission mode supported by a first terminal and connection information corresponding to each transmission mode supported by the first terminal, wherein the connection information is provided by the first terminal;
determining a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal and a preset priority order of each transmission mode;
and transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
2. The method according to claim 1, wherein the determining a target transmission mode to be used according to the locally supported transmission mode, the transmission mode supported by the first terminal, and a preset priority order of each transmission mode comprises:
determining a transmission mode supported locally and jointly by the first terminal according to the locally supported transmission mode and the transmission mode supported by the first terminal;
and determining the transmission mode with the highest priority in the transmission modes supported by the local terminal and the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
3. The method according to claim 2, wherein the obtaining connection information corresponding to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal, which is provided by the first terminal, comprises:
acquiring transmission modes supported by a first terminal, access point information of one or more transmission modes and connection information corresponding to each transmission mode supported by the first terminal, wherein the transmission modes are provided by the first terminal;
the determining, according to the preset priority order of each transmission mode, a transmission mode with a highest priority among transmission modes supported by the local terminal and the first terminal as a target transmission mode includes:
according to the transmission modes supported by the first terminal, acquiring the access point information of the one or more transmission modes, the locally supported transmission modes and the local access point information of the one or more transmission modes, and determining the transmission mode which can establish connection with the first terminal locally in the transmission modes supported by the local and the first terminal;
and determining the transmission mode with the highest priority in the transmission modes which can be locally connected with the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
4. The method of claim 1, wherein the transmission modes supported by the first terminal are arranged according to a preset priority order of the transmission modes;
the determining a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal, and a preset priority order of each transmission mode includes:
and searching locally supported transmission modes according to the priority order in the transmission modes supported by the first terminal which are arranged according to the preset priority order of each transmission mode, and when the locally supported first transmission mode is searched, determining the first transmission mode as a target transmission mode to be used.
5. The method according to claim 1, wherein the obtaining connection information corresponding to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal, which is provided by the first terminal, comprises:
scanning a graphic code displayed by a first terminal, and acquiring connection information corresponding to a transmission mode supported by the first terminal and each transmission mode supported by the first terminal, which are recorded in the graphic code; or,
and receiving connection information which is sent by a first terminal through a server and corresponds to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal.
6. An apparatus for transmitting data, the apparatus comprising:
an obtaining module, configured to obtain a transmission mode supported by a first terminal and connection information corresponding to each transmission mode supported by the first terminal, where the connection information is provided by the first terminal;
a determining module, configured to determine a target transmission mode to be used according to a locally supported transmission mode, a transmission mode supported by the first terminal, and a preset priority order of each transmission mode;
and the transmission module is used for transmitting the data to be transmitted through the target transmission mode and the connection information corresponding to the target transmission mode.
7. The apparatus of claim 6, wherein the determining module is configured to:
determining a transmission mode supported locally and jointly by the first terminal according to the locally supported transmission mode and the transmission mode supported by the first terminal;
and determining the transmission mode with the highest priority in the transmission modes supported by the local terminal and the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
8. The apparatus of claim 7, wherein the obtaining module is configured to:
acquiring transmission modes supported by a first terminal, access point information of one or more transmission modes and connection information corresponding to each transmission mode supported by the first terminal, wherein the transmission modes are provided by the first terminal;
the determining module is configured to:
according to the transmission modes supported by the first terminal, acquiring the access point information of the one or more transmission modes, the locally supported transmission modes and the local access point information of the one or more transmission modes, and determining the transmission mode which can establish connection with the first terminal locally in the transmission modes supported by the local and the first terminal;
and determining the transmission mode with the highest priority in the transmission modes which can be locally connected with the first terminal as a target transmission mode to be used according to the preset priority sequence of each transmission mode.
9. The apparatus of claim 6, wherein the transmission modes supported by the first terminal are arranged according to a preset priority order of the transmission modes;
the determining module is configured to:
and searching locally supported transmission modes according to the priority order in the transmission modes supported by the first terminal which are arranged according to the preset priority order of each transmission mode, and when the locally supported first transmission mode is searched, determining the first transmission mode as a target transmission mode to be used.
10. The apparatus of claim 6, wherein the obtaining module is configured to:
scanning a graphic code displayed by a first terminal, and acquiring connection information corresponding to a transmission mode supported by the first terminal and each transmission mode supported by the first terminal, which are recorded in the graphic code; or,
and receiving connection information which is sent by a first terminal through a server and corresponds to the transmission mode supported by the first terminal and each transmission mode supported by the first terminal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410710310.2A CN105703808A (en) | 2014-11-28 | 2014-11-28 | Method and device for transmitting data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410710310.2A CN105703808A (en) | 2014-11-28 | 2014-11-28 | Method and device for transmitting data |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105703808A true CN105703808A (en) | 2016-06-22 |
Family
ID=56230933
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410710310.2A Pending CN105703808A (en) | 2014-11-28 | 2014-11-28 | Method and device for transmitting data |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105703808A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106714279A (en) * | 2016-11-14 | 2017-05-24 | 广东欧珀移动通信有限公司 | A hotspot network switching method and terminal equipment |
| CN106792434A (en) * | 2016-11-14 | 2017-05-31 | 广东欧珀移动通信有限公司 | A hotspot establishment method and terminal equipment |
| WO2019218951A1 (en) * | 2018-05-17 | 2019-11-21 | 华为技术有限公司 | Method and terminal for transmitting file |
| CN114500511A (en) * | 2022-01-29 | 2022-05-13 | 联想(北京)有限公司 | Data transmission method and device and electronic equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101384089A (en) * | 2008-09-24 | 2009-03-11 | 中兴通讯股份有限公司 | A system and implementation method for eliminating mutual interference between wireless access and Bluetooth radio frequency |
| CN101695189A (en) * | 2009-10-23 | 2010-04-14 | 深圳华为通信技术有限公司 | Method for conducting data synchronization by earphone, and corresponding earphone and mobile terminal |
| CN104038261A (en) * | 2014-06-03 | 2014-09-10 | 深圳天珑无线科技有限公司 | Multi device position information managing and sharing method and relevant device |
-
2014
- 2014-11-28 CN CN201410710310.2A patent/CN105703808A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101384089A (en) * | 2008-09-24 | 2009-03-11 | 中兴通讯股份有限公司 | A system and implementation method for eliminating mutual interference between wireless access and Bluetooth radio frequency |
| CN101695189A (en) * | 2009-10-23 | 2010-04-14 | 深圳华为通信技术有限公司 | Method for conducting data synchronization by earphone, and corresponding earphone and mobile terminal |
| CN104038261A (en) * | 2014-06-03 | 2014-09-10 | 深圳天珑无线科技有限公司 | Multi device position information managing and sharing method and relevant device |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106714279A (en) * | 2016-11-14 | 2017-05-24 | 广东欧珀移动通信有限公司 | A hotspot network switching method and terminal equipment |
| CN106792434A (en) * | 2016-11-14 | 2017-05-31 | 广东欧珀移动通信有限公司 | A hotspot establishment method and terminal equipment |
| WO2019218951A1 (en) * | 2018-05-17 | 2019-11-21 | 华为技术有限公司 | Method and terminal for transmitting file |
| CN114500511A (en) * | 2022-01-29 | 2022-05-13 | 联想(北京)有限公司 | Data transmission method and device and electronic equipment |
| CN114500511B (en) * | 2022-01-29 | 2023-12-26 | 联想(北京)有限公司 | Data transmission method and device and electronic equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107094294B (en) | Network connection method and device | |
| CN104518953B (en) | Method for deleting message, instant communication terminal and system | |
| CN108255683B (en) | Method for prompting message in terminal and terminal | |
| TWI512525B (en) | Method and system for associating two terminals with each other, terminal and computer-readable storage medium | |
| WO2015090248A1 (en) | Server overload protection method and device | |
| CN104915091B (en) | A kind of method and apparatus for the prompt information that Shows Status Bar | |
| CN106371964B (en) | Method and device for prompting message | |
| CN106658354B (en) | Data transmission method and equipment | |
| CN106341809B (en) | Data transmission method and equipment | |
| WO2018006841A1 (en) | Qr code information transmission method, device and apparatus | |
| HK1204373A1 (en) | A launch control method and apparatus for application programs | |
| CN107278380A (en) | Method for connecting bluetooth device and terminal device | |
| CN106131930A (en) | A WiFi network access control method, device and terminal | |
| WO2017096909A1 (en) | Data connection establishing method and apparatus | |
| CN104660769B (en) | A kind of methods, devices and systems for adding associated person information | |
| CN106454976B (en) | A wireless network switching method, device and terminal | |
| CN104917905B (en) | Processing method, terminal and the server of Stranger Calls | |
| CN109495769B (en) | Video communication method, terminal, smart television, server and storage medium | |
| CN104202301B (en) | Numeric value transfer and device | |
| CN113613310A (en) | WIFI connection method and device, storage medium and mobile terminal | |
| CN105703808A (en) | Method and device for transmitting data | |
| CN107317828B (en) | File downloading method and device | |
| CN106470234B (en) | Equipment discovery method and device | |
| CN105577712B (en) | A kind of file uploading method, device and system | |
| CN112749074A (en) | Test case recommendation method and device |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160622 |
|
| RJ01 | Rejection of invention patent application after publication |