CN107222937B - Data transmission method, device and terminal - Google Patents

Data transmission method, device and terminal Download PDF

Info

Publication number
CN107222937B
CN107222937B CN201710524188.3A CN201710524188A CN107222937B CN 107222937 B CN107222937 B CN 107222937B CN 201710524188 A CN201710524188 A CN 201710524188A CN 107222937 B CN107222937 B CN 107222937B
Authority
CN
China
Prior art keywords
terminal
module
data transmission
connection
frequency band
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
CN201710524188.3A
Other languages
Chinese (zh)
Other versions
CN107222937A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710524188.3A priority Critical patent/CN107222937B/en
Publication of CN107222937A publication Critical patent/CN107222937A/en
Application granted granted Critical
Publication of CN107222937B publication Critical patent/CN107222937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic or resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information

Abstract

The embodiment of the invention discloses a data transmission method, a device and a terminal, wherein the method comprises the following steps: establishing a first connection with a second terminal; acquiring first performance information of the first terminal, and acquiring second performance information of the second terminal through the first connection; determining a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information, and notifying the second terminal of the data transmission mode; establishing at least one second connection with the second terminal according to the determined data transmission mode, and interacting data on the at least one second connection; the data transmission mode indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection. By adopting the invention, the data transmission efficiency can be improved.

Description

Data transmission method, device and terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method, an apparatus, and a terminal.
Background
With the development of communication technology, terminals are becoming more and more popular in people's life, and people can transmit data, such as documents, pictures, audio and other data, through the terminals.
Generally, for most terminals, if data transmission is performed between the terminals, a traffic data service such as 4G is opened or a Wireless-Fidelity (Wi-Fi) is connected, and then a session connection is established and data is transmitted through an instant messaging application or the like. The existing data transmission mode is single, and the data transmission efficiency is influenced to a certain extent.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a data transmission device and a data transmission terminal, which can improve the data transmission efficiency.
In a first aspect, an embodiment of the present invention provides a data transmission method, including:
establishing a first connection with a second terminal;
acquiring first performance information of a first terminal, and acquiring second performance information of a second terminal through the first connection;
determining a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information, and notifying the second terminal of the data transmission mode;
establishing at least one second connection with the second terminal according to the determined data transmission mode, and interacting data on the at least one second connection; the data transmission mode indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection.
In a second aspect, an embodiment of the present invention provides a data transmission apparatus, including:
the first connection module is used for establishing first connection with the second terminal;
an obtaining module, configured to obtain first performance information of the first terminal, and obtain second performance information of the second terminal through the first connection;
a determining module, configured to determine a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information, and notify the second terminal of the data transmission mode;
the second connection module is used for establishing at least one second connection with the second terminal according to the determined data transmission mode and interacting data on the at least one second connection; the data transmission mode indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection.
In a third aspect, an embodiment of the present invention provides a terminal, including a processor, a communication interface, and a memory, where the processor, the communication interface, and the memory are connected to each other, where the memory is used to store an application program code, and the processor is configured to call the program code to execute the method provided in the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program including program instructions, which, when executed by a processor, cause the processor to execute the method provided in the first aspect.
In a fifth aspect, the present invention also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to make a computer execute the method provided in the first aspect.
The first terminal can establish a first connection with the second terminal, and the first terminal can determine a data transmission mode according to the acquired first performance information of the first terminal and the acquired performance information of the second terminal, so that the first terminal can establish a second connection with the second terminal according to the data transmission mode and perform data interaction based on the second connection, and the data transmission efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a system architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a data transmission method according to still another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data transmission apparatus 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
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," and the like in the description and in the claims, and in the above-described drawings, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
It should be understood that the first terminal or the second terminal described herein may include, but are not limited to: the mobile terminal has network connection and data transmission functions, such as a mobile phone (e.g., an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, and the like. The Mobile Terminal may also be referred to as a User Equipment (UE), a Terminal (Terminal), a wireless Terminal or a Mobile Station (MS), and the like, which is not limited in the embodiments of the present invention.
Fig. 1 is a system architecture according to an embodiment of the present invention, which includes a first terminal 10 and a second terminal 20. Wherein, the first terminal 10 and the second terminal 20 can establish connection in wireless communication mode. The wireless communication mode includes but is not limited to bluetooth, ultrasonic wave, infrared ray, NFC, Wi-Fi and other wireless communication modes. The first terminal 10 and the second terminal 20 may be various types of smart terminals, for example, terminals having a plurality of wireless communication modules, such as a smart phone, a tablet computer, a wearable Device, a computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like.
In one embodiment, the first terminal 10 may establish a first connection with the second terminal 20, and after the first connection is established, the first terminal 10 and the second terminal 20 may perform negotiation of data transmission modes, so that at least one second connection may be established according to the determined data transmission mode. And, data transmission can be performed based on the determined data transmission manner.
Wherein, the first terminal 10 can establish a direct communication connection with the second terminal 20. The direct communication connection refers to direct communication between the first terminal 10 and the second terminal 20 without the aid of a third party device, as shown in fig. 1. The manner of establishing the direct communication connection between the first terminal 10 and the second terminal 20 may include: the first terminal 10 and the second terminal 20 establish a first connection based on the first data transmission mode, and may exchange connection information of the second data transmission mode over the first connection. The first terminal 10 and the second terminal 20 can establish a second connection based on a second data transmission mode based on the connection information. The energy consumption value of the first connection during data interaction is smaller than the energy consumption value of the second connection during data interaction, or the energy consumption value of the first connection during data interaction is smaller than the energy consumption value of the first terminal 10 and the second terminal 20 during interaction of the connection information of the second data transmission mode.
The first connection established by the first data transmission mode includes, but is not limited to, a bluetooth connection, a radio frequency connection, such as a Near Field Communication (NFC) connection, an ultrasonic connection, and an electromagnetic wave connection, such as an infrared connection. The second connection established by the second data transmission mode includes, but is not limited to, a Wi-Fi connection.
In one embodiment, when the second connection is established, the first connection may be established first, for example, a bluetooth connection may be established between the first terminal 10 and the second terminal 20 first, and Wi-Fi connection information, such as a user name and a password of a Wi-Fi hotspot, may be interacted on the bluetooth connection. A second connection based on the Wi-Fi hotspot may be established between the first terminal 10 and the second terminal 20 based on the connection information. The first terminal 10 may actively start the Wi-Fi hotspot function of the first terminal 20 after establishing the first connection, so as to establish a second connection with the second terminal 20, or may trigger the second terminal 20 to start the Wi-Fi hotspot function through the first connection, so that the first terminal 101 accesses the second terminal 102 to complete establishment of the second connection.
In one embodiment, when a user of the first terminal 10 needs to transmit data to the second terminal 102, a direct communication button for managing a transmission mode (the transmission mode corresponds to at least one data transmission mode) on the first terminal 10 may be configured on the first terminal 10, and after the direct communication mode of the first terminal 10 is started by clicking the button, the first terminal 10 may automatically start a first transmission function corresponding to bluetooth and a second transmission function corresponding to Wi-Fi. Similarly, the user of the second terminal 20 may also start the direct communication button of the second terminal 20, and automatically start the first transmission function corresponding to the bluetooth and the second transmission function corresponding to the Wi-Fi. Then, the user of the first terminal 10 can determine the second terminal 20 from at least one terminal scanned by the first terminal 10 through bluetooth, and the first terminal 10 establishes the bluetooth connection with the second terminal 20.
Therefore, the embodiment of the invention can interact the connection information for establishing the Wi-Fi connection (i.e. the second connection) through the Bluetooth connection (i.e. the first connection), the connection information can be, for example, a user name and an access password of the terminal which is used as a Wi-Fi hotspot, and then the Wi-Fi connection (i.e. the second connection) is established according to the connection information, so that the energy consumption of the terminal is saved to a certain extent, the Wi-Fi connection (i.e. the second connection) can ensure a faster transmission speed, and meanwhile, the transmission efficiency of the terminal in data transmission is improved.
In an embodiment, when a second connection needs to be established, a Wi-Fi hotspot may be opened in the first terminal 10, and the user name and the password of the Wi-Fi hotspot are carried in a two-dimensional code manner, and the second terminal 20 may scan the two-dimensional code, so as to directly obtain the user name and the password of the Wi-Fi hotspot of the first terminal 10, and access to the first terminal 10 to establish a second connection between the two terminals. Or the second terminal 20 opens the Wi-Fi hotspot and carries the user name and the password of the Wi-Fi hotspot in a two-dimensional code manner, and the first terminal 10 may scan the two-dimensional code, and then directly obtain the user name and the password of the Wi-Fi hotspot of the second terminal 20, and access the second terminal 20 to establish a second connection between the two.
After the first terminal 10 and the second terminal 20 establish the first connection, the first performance information of the first terminal 10 and the second performance information of the second terminal 20 may be combined to determine a data transmission manner between the first terminal 10 and the second terminal 20. After determining the data transmission mode, the first terminal 10 may establish at least one second connection with the second terminal 20 based on the data transmission mode, and perform data interaction. The data transmission mode among the terminals is determined through the performance information of the terminals, so that the data transmission among the terminals is not limited to the data transmission mode corresponding to the first connection, the data transmission mode is expanded to a certain extent based on the performance information of the terminals, and the selectivity of the data transmission mode is improved.
In one embodiment, the first terminal 10 may include a plurality of wireless communication modules, and the second terminal 20 may also include a plurality of wireless communication modules, so that at least one connection is established between the first terminal 10 and the second terminal 20. Further, data may be exchanged over the established at least one connection. The plurality of wireless communication modules include, but are not limited to, a radio frequency module, a bluetooth module, a Wi-Fi module, an ultrasonic module, and other modules that can be used for wireless communication.
In one embodiment, the aforementioned first performance information may include parameters for determining data transmission capabilities of a plurality of wireless communication modules of the first terminal 10, such as a maximum data transmission speed and a data transmission range supported by each of the plurality of wireless communication modules, a data transmission type (such as large data transmission and small data transmission) applicable to each of the plurality of wireless communication modules, or an identifier of each of the plurality of wireless communication modules. In addition, the first performance information may further include parameters for determining an operating frequency band of a plurality of wireless communication modules of the first terminal 10, including but not limited to a first terminal identifier, identifiers of the plurality of wireless communication modules, or a value of an operating frequency band preset for the wireless communication module.
In one embodiment, the aforementioned second performance information may include parameters for determining data transmission capabilities of a plurality of wireless communication modules of the second terminal 20, such as a maximum data transmission speed and a data transmission range supported by each of the plurality of wireless communication modules, a data transmission type (such as large data transmission and small data transmission) applicable to each of the plurality of wireless communication modules, or an identifier of each of the plurality of wireless communication modules. In addition, the second performance information may further include parameters for determining an operating frequency band of a plurality of wireless communication modules included in the second terminal 20, including but not limited to a second terminal identifier, identifiers of the plurality of wireless transmission modules, or a value of the operating frequency band preset for the wireless communication module.
In an embodiment, the determining, by the first terminal 10, a data transmission manner between the first terminal 10 and the second terminal 20 by combining the first performance information of the first terminal 10 and the second performance information of the second terminal 20 may include: the first terminal 10 may determine a data transmission manner between the first terminal 10 and the second terminal 20 according to the transmission capability level determined by the first performance information and the transmission capability level determined by the second performance information. The determined data transmission mode may include a plurality of modes.
In one embodiment, the first capability information may include a maximum data transmission speed supported by a plurality of wireless communication modules included in the first terminal 10, and the second capability information may include a maximum data transmission speed supported by a plurality of wireless communication modules included in the second terminal. The first terminal 10 may rank the maximum data transmission speeds supported by the plurality of wireless communication modules included in the first performance information, such as from high to low, with the highest rank of the transmission capability ranked first. Also, the first terminal 10 may rank the maximum data transmission speeds supported by the plurality of wireless communication modules included in the second capability information, such as from high to low, with the highest transmission capability ranking first. The first terminal 10 may perform a plurality of data transmission manner combinations based on the transmission capability level determined by the first performance information and the transmission capability level determined by the second performance information to determine the data transmission manner between the first terminal 10 and the second terminal 20. The aim of optimizing the transmission rate can be achieved by combining strategies of a plurality of data transmission modes.
In one embodiment, the determining, by the first terminal 10, a data transmission manner between the first terminal 10 and the second terminal 20 by combining the first performance information of the first terminal 10 and the second performance information of the second terminal 20 may include: according to the information such as the size and the type of the transmission data, a data transmission mode suitable for large data transmission, small data transmission or data transmission in different formats is selected by combining the transmission capability of each wireless communication module of the first terminal 10 and the transmission capability of each wireless communication module of the second terminal 20. If the transmission data is smaller, using a data transmission mode corresponding to the wireless communication module with large data transmission or using a data transmission mode corresponding to the wireless communication module with small data transmission; the transmission data is large, and a data transmission mode corresponding to a wireless communication module for large data transmission, or a data transmission mode corresponding to a wireless communication module for small data transmission and a data transmission mode corresponding to a wireless communication module for large data transmission can be used. Wherein the transmission capability may be determined by a parameter included in the first performance information.
In one embodiment, the determining, by the first terminal 10, the data transmission mode between the first terminal 10 and the second terminal 20 by combining the performance information of the first terminal 10 and the performance information of the second terminal 20 may include: the first terminal 10 determines a data transmission mode between the first terminal 10 and the second terminal 20 according to the operating frequency band determined by the first performance information and the operating frequency band determined by the second performance information.
In one embodiment, when the first performance information includes parameters for determining an operating frequency band of each wireless communication module included in the first terminal 10, the first terminal 10 may determine the operating frequency band of each wireless communication module included in the first terminal 10 according to the first performance information. When the second performance information includes parameters for determining the operating frequency bands of the wireless communication modules included in the second terminal 20, the second terminal 20 may determine the operating frequency bands of the wireless communication modules included in the second terminal 20 according to the second performance information. The first terminal 10 may determine the data transmission mode between the first terminal 10 and the second terminal 20 according to the operating frequency band of each wireless communication module included in the first terminal 10 and the operating frequency band of each wireless communication module included in the second terminal 20.
The data transmission mode is determined by comparing and analyzing the operating frequency bands of the wireless communication modules included in the first terminal 10 and the operating frequency bands of the wireless communication modules included in the second terminal 20. Alternatively, when the difference between the operating frequency band of each wireless communication module included in the first terminal 10 and the operating frequency band of each wireless communication module included in the second terminal 20 is compared and analyzed, a comparison result may be generated; and selects a data transmission mode according to the comparison result.
In one embodiment, the plurality of wireless communication modules included in the first terminal 10 include at least a first module and a second module, and the plurality of wireless communication modules included in the second terminal 20 include at least a first module and a second module. The selection of the data transmission party according to the comparison result can be classified into the following cases:
in an embodiment, if the working frequency bands of the first module of the first terminal 10 and the first module of the second terminal 20 are the same, the working frequency bands of the second module of the first terminal 10 and the second module of the second terminal 20 are the same, but the working frequency bands of the first module and the second module are different, the first terminal 10 selects the data transmission mode corresponding to the first module and the data transmission mode corresponding to the second module.
For example, the first module of the first terminal 10 is a Wi-Fi module, the first module of the second terminal 20 is a Wi-Fi module, the second module of the first terminal 10 is a bluetooth module, and the second module of the second terminal 20 is a bluetooth module. If the working frequency band of the bluetooth module of the first terminal 10 is the same as the working frequency band of the bluetooth module of the second terminal 20, and the working frequency band of the Wi-Fi module of the first terminal 10 is the same as the working frequency band of the Wi-Fi module of the second terminal 20, the working frequency bands between the bluetooth module and the Wi-Fi module are different. The first terminal 10 selects a data transmission mode corresponding to the bluetooth module and a data transmission mode corresponding to the Wi-Fi module.
In an embodiment, if the working frequency bands of the first module of the first terminal 10 and the first module of the second terminal 20 are the same, the working frequency bands of the second module of the first terminal 10 and the second module of the second terminal 20 are the same, and the working frequency bands of the first module and the second module are the same, the first terminal 10 preferentially selects the data transmission mode corresponding to the first module.
For example, the first module of the first terminal 10 is a Wi-Fi module, the first module of the second terminal 20 is a Wi-Fi module, the second module of the first terminal 10 is a bluetooth module, and the second module of the second terminal 20 is a bluetooth module. If the working frequency band of the bluetooth module of the first terminal 10 is the same as the working frequency band of the bluetooth module of the second terminal 20, the working frequency band of the Wi-Fi module of the first terminal 10 is the same as the working frequency band of the Wi-Fi module of the second terminal 20, and the working frequency bands between the bluetooth module and the Wi-Fi module are the same. The first terminal 10 preferentially selects the data transmission mode corresponding to the Wi-Fi module.
In an embodiment, if the working frequency bands between the first module of the first terminal 10 and the first module of the second terminal 20 are the same, the working frequency bands between the second module of the first terminal 10 and the second module of the second terminal 20 are the same, and the working frequency bands between the first module and the second module are the same, the first terminal 10 may query whether there are other working frequency bands in the first module or the second module, if there are other working frequency bands in the first module or the second module, the working frequency bands in the first module or the second module are switched to other working frequency bands, and a data transmission mode corresponding to the first module and a data transmission mode corresponding to the second module are selected.
In an embodiment, if the operating frequency bands between the first module of the first terminal 10 and the first module of the second terminal 20 are the same, the operating frequency bands between the second module of the first terminal 10 and the second module of the second terminal 20 are the same, and the operating frequency bands between the first module and the second module are the same, the first terminal 10 may determine the number of antennas used by the first module and the second module of the first terminal 10 according to the antenna parameter of the first performance information, and may determine the number of antennas used by the first module and the second module of the second terminal 20 according to the antenna parameter of the second performance information. If the number of antennas used by the first module and the second module in the first terminal 10 is one or the number of antennas used by the first module and the second module in the second terminal 20 is one, the first terminal 10 preferentially selects the data transmission mode corresponding to the first module. If the number of antennas used by the first module and the second module in the first terminal 10 is two and the number of antennas used by the first module and the second module in the second terminal 20 is two, the first terminal 10 selects a data transmission mode corresponding to the first module and a data transmission mode corresponding to the second module.
In an embodiment, if the operating frequency bands of the first module of the first terminal 10 and the first module of the second terminal 20 are different, the operating frequency bands of the first module of the first terminal 10 and the first module of the second terminal 20 may be negotiated between the first terminal 10 and the second terminal 20, so that the operating frequency band of the first module of the first terminal 10 may be the same as the operating frequency band of the first module of the second terminal 20, and thus the first terminal 10 and the second terminal 20 establish the second connection in the same operating frequency band. Further, data transmission may be performed over the second connection. If the working frequency bands of the second module of the first terminal 10 and the second module of the second terminal 20 are different, the working frequency bands of the second module of the first terminal 10 and the second module of the second terminal 20 may be negotiated between the first terminal 10 and the second terminal 20, so that the working frequency band of the second module of the first terminal 10 may be the same as the working frequency band of the second module of the second terminal 20, and the first terminal 10 and the second terminal 20 establish a second connection in the same working frequency band. Further, data transmission may be performed over the second connection.
In one embodiment, the establishing, by the first terminal 10, at least one second connection with the second terminal 20 based on the determined data transmission manner may include: if the determined data transmission method does not include the data transmission method corresponding to the first connection, but is another data transmission method, the first terminal 10 may establish at least one second connection with the second terminal 20 based on the determined data transmission method, so as to perform data transmission on the second connection.
For example, if the first terminal 10 and the second terminal 20 establish the first connection through bluetooth, if the determined data transmission mode is a Wi-Fi based transmission mode, the first terminal 10 may establish a second connection through Wi-Fi with the second terminal 20 through the Wi-Fi based transmission mode, and perform data transmission on the second connection established through Wi-Fi.
In one embodiment, the establishing, by the first terminal 10, the second connection with the second terminal 20 based on the determined data transmission manner may further include: if the determined data transmission mode includes a data transmission mode corresponding to the first connection and also includes other data transmission modes, the first terminal 10 may establish at least one second connection with the second terminal 20 through the other data transmission modes, so that data transmission may be performed between the first terminal 10 and the second terminal 20 by using the at least one second connection and the first connection, and multiple second connections may be established for data transmission, thereby increasing the transmission rate.
For example, if a first connection is established between the first terminal 10 and the second terminal 20 through bluetooth, if the determined data transmission mode is a Wi-Fi based transmission mode and a bluetooth based transmission mode, the first terminal 10 may establish a second connection through the Wi-Fi based transmission mode and the second terminal 20 may establish a second connection through the Wi-Fi based transmission mode. After the second connection is established, data transmission can be performed between the first terminal 10 and the second terminal 20 through the second connection established by Wi-Fi, and data transmission can be performed through the first connection established by bluetooth.
In one embodiment, the first terminal 10 may compare and analyze the transmission parameters of each of the at least one second connection, so as to determine a target connection according to the at least one second connection and the transmission parameters, and may interact with the data based on the target connection. Wherein the target connection is a connection selected among the at least one second connection. The target connection may also be a connection established by a data transmission method corresponding to the operating frequency band of the switched wireless communication module.
For example, the first terminal 10 may select a data transmission mode with better transmission performance, such as an operating frequency band with a faster data transmission speed, according to the transmission parameters to establish the second connection, thereby improving the data transmission efficiency. That is to say, if the first terminal 10 detects that the data transmission performance based on the second connection is poor, or determines that the transmission performance of the other operating frequency bands of the wireless communication module is better, the first terminal 10 establishes the second connection with the second terminal 20 according to the data transmission mode of the operating frequency band with the better determined transmission performance, so as to perform switching of the data transmission modes of different operating frequency bands according to the transmission performance condition of the second connection established between the terminals, thereby effectively improving the efficiency of data transmission. Alternatively, the first terminal 10 may send test data to the second terminal 20 to test the data transmission manner.
In one embodiment, when the determined data transmission mode includes a Wi-Fi based transmission mode, if the first terminal 10 and the second terminal 20 do not establish the second connection through the Wi-Fi based transmission mode within a preset time period, determining whether the first terminal 10 and the second terminal 20 have established a Wi-Fi hotspot connection by using the second module; if the Wi-Fi hotspot connection is not established, triggering the establishment of the Wi-Fi hotspot connection between the first terminal 10 and the second terminal 20, so that the first terminal 10 and the second terminal 20 establish at least one second connection. The above manner of triggering the establishment of the hotspot includes, but is not limited to, triggering in the form of a notification message. Optionally, when the first module includes a plurality of working frequency bands, the user may select a working frequency band under the Wi-Fi hotspot, and the first terminal 10 may establish a second connection with a second terminal according to a data transmission mode of the selected working frequency band.
In one embodiment, the second terminal 20 may also be provided with the functionality implemented by the first terminal 10.
As can be seen from fig. 1, after the first terminal establishes the first connection with the second terminal, the first terminal and the second terminal may negotiate about a data transmission method, so that at least one second connection may be established according to the negotiated data transmission method, and data may be exchanged based on the at least one second connection.
Fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present invention. Wherein, the method can be applied to the system architecture shown in fig. 1. Moreover, the method can be applied to terminals including but not limited to smart terminals with a plurality of wireless communication modules, such as mobile phones, tablet computers and the like. Specifically, the method may include:
s201, a first connection is established between a first terminal and a second terminal.
In the embodiment of the present invention, the first connection includes, but is not limited to, a radio frequency based connection, such as an NFC-based connection, a bluetooth-based connection, an ultrasonic-based connection, and other connections.
S202, the first terminal obtains first performance information of the first terminal and obtains second performance information of the second terminal through the first connection.
It should be noted that the first terminal may include a plurality of wireless communication modules, and the second terminal may also include a plurality of wireless communication modules, so that at least one connection is established between the first terminal and the second terminal. Further, data may be exchanged over the established at least one connection. The plurality of wireless communication modules include, but are not limited to, a radio frequency module, a bluetooth module, a Wi-Fi module, an ultrasonic module, and other modules that can be used for wireless communication.
In this embodiment of the present invention, the aforementioned first performance information may include parameters for determining data transmission capabilities of a plurality of wireless communication modules of the first terminal, such as a maximum data transmission speed and a data transmission range supported by each of the plurality of wireless communication modules, data transmission types (such as large data transmission and small data transmission) respectively applicable to each of the plurality of wireless communication modules, or identifiers of the plurality of wireless communication modules. In addition, the first performance information may further include parameters for determining an operating frequency band of a plurality of wireless communication modules of the first terminal, including but not limited to a first terminal identifier, identifiers of the plurality of wireless communication modules, or a value of an operating frequency band preset for the wireless communication module.
In this embodiment of the present invention, the aforementioned second performance information may include parameters for determining data transmission capabilities of a plurality of wireless communication modules of the second terminal, such as a maximum data transmission speed and a data transmission range supported by each of the plurality of wireless communication modules, data transmission types (such as large data transmission and small data transmission) respectively applicable to each of the plurality of wireless communication modules, or identifiers of the plurality of wireless communication modules. In addition, the second performance information may further include parameters for determining an operating frequency band of a plurality of wireless communication modules included in the second terminal, including, but not limited to, a first terminal identifier, identifiers of the plurality of wireless transmission modules, or a value of an operating frequency band preset for the wireless communication module.
Optionally, the second performance information may be sent to the first terminal by the second terminal after the first connection is established between the first terminal and the second terminal. Alternatively, the second capability information may be obtained by the first terminal from a memory. For example, before the first terminal establishes the first connection with the second terminal, the first terminal may store the acquired second capability information when establishing the connection with the second terminal, and may directly acquire the second capability information from the memory when the second capability information needs to be acquired later.
In this embodiment of the present invention, the first performance information may further include parameters of antennas used by each wireless communication module of the first terminal, and the second performance information may further include parameters of antennas used by each wireless communication module of the second terminal.
S203, the first terminal determines a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information, and notifies the second terminal of the data transmission mode.
In this embodiment of the present invention, the determining, by the first terminal according to the first performance information and the second performance information, a data transmission mode between the first terminal and the second terminal in step S203 may include: and the first terminal determines a data transmission mode between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information.
It should be noted that the manner for the first terminal to determine the operating frequency band according to the first performance information includes: when the first performance information includes parameters for determining an operating frequency band of each wireless communication module included in the first terminal, the first terminal may determine the operating frequency band of each wireless communication module included in the first terminal according to the first performance information. The mode that the first terminal determines the working frequency band according to the second performance information comprises the following steps: when the second performance information includes parameters for determining the operating frequency bands of the wireless communication modules included in the second terminal, the second terminal may determine the operating frequency bands of the wireless communication modules included in the second terminal according to the second performance information.
Optionally, if the working frequency bands of each of the plurality of wireless communication modules included in the first terminal are different and the working frequency bands of each of the plurality of wireless communication modules included in the second terminal are different, the data transmission modes corresponding to the plurality of wireless communication modules may be simultaneously selected to establish at least one second connection, and the at least one second connection established by the selected data transmission mode may be switched. If it is determined that the target wireless communication module of the plurality of wireless communication modules of the first terminal and the target wireless communication module of the plurality of wireless communication modules of the second terminal establish the second connection, the target wireless communication module of the first terminal and the target wireless communication module of the second terminal may negotiate to the same operating frequency band. The target wireless communication module may be a plurality of modules, including but not limited to a radio frequency module, a bluetooth module, a Wi-Fi module, an ultrasonic module, and the like.
Optionally, if the working frequency bands of each of the plurality of wireless communication modules are the same, the data transmission mode corresponding to one of the target wireless communication modules is preferentially selected to establish the second connection. For example, if the target wireless communication module has a plurality of operating frequency bands, a data transmission mode switched to another operating frequency band may be selected to establish the second connection.
Further optionally, when the number of the target wireless communication modules is multiple and the working frequency bands of the target wireless communication modules are the same, the number of the antennas used by the target wireless communication modules is determined, and if at least two target wireless communication modules share one antenna, a data transmission mode corresponding to one of the target wireless communication modules is preferentially selected for data transmission for the two target wireless communication modules sharing the one antenna. If one target wireless communication module has a plurality of working frequency bands in the two target wireless communication modules sharing one antenna, establishing at least one second connection by adopting a data transmission mode of other working frequency bands of the target wireless communication module with the plurality of working frequency bands so as to carry out data interaction.
Optionally, according to the difference of the working frequency bands of the wireless communication modules, a data transmission mode corresponding to the working frequency band with a higher data transmission speed may be preferentially selected, or a combination of several data transmission modes may be adopted. And the first terminal and the second terminal can be switched according to second connection of different working frequency bands.
Optionally, the determining, by the first terminal in step S203, a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information may further include: and the first terminal determines a data transmission mode between the first terminal and the second terminal according to the transmission capacity level determined by the first performance information and the transmission capacity level determined by the second performance information.
It should be noted that the first performance information may include a maximum data transmission speed supported by a plurality of wireless communication modules included in the first terminal, the second performance information may include a maximum data transmission speed supported by a plurality of wireless communication modules included in the second terminal, and the transmission capability level may be determined by: the first terminal may rank the maximum data transmission speeds supported by the plurality of wireless communication modules included in the first performance information, such as from high to low, with the highest ranked transmission capability. And, the first terminal may rank the maximum data transmission speeds supported by the plurality of wireless communication modules included in the second performance information, such as from high to low, with the highest transmission capability ranked first.
Optionally, the first terminal performs a combination of multiple data transmission modes based on the transmission capability level determined by the first performance information and the transmission capability level determined by the second performance information to determine a data transmission mode between the first terminal and the second terminal. The aim of optimizing the transmission rate is achieved by combining strategies of a plurality of data transmission modes.
Further optionally, the first terminal may further select a proper data transmission mode after refining the data transmission mode by combining the type and size of the actually interacted data, the parameters of each wireless communication module included in the first performance information, and the parameters of each wireless communication module included in the second performance information, so as to improve the data transmission efficiency.
S204, according to the determined data transmission mode, the first terminal and the second terminal establish at least one second connection, and data is interacted on the at least one second connection.
Wherein the data transmission mode indicates a connection type of the first terminal and the second terminal for establishing the second connection. For example, in S203, it may be determined that the type of the data transmission manner is a Wi-Fi hotspot type, and in S204, according to the Wi-Fi hotspot type indicated by the data transmission manner, a second connection needs to be established between the first terminal and the second terminal by establishing a Wi-Fi hotspot.
It should be noted that, in step S203, a plurality of different methods for selecting a data transmission method according to the first performance information and the second performance information are proposed, and at least one data transmission method may be determined based on the methods. In step S204, according to the determined data transmission manner, at least one second connection is established between the first terminal and the second terminal, and data is exchanged over the at least one second connection.
Wherein the second connection includes, but is not limited to, other connections such as a Wi-Fi connection, and the second connection is not the first connection.
Optionally, the establishing, by the first terminal and the second terminal, at least one second connection, and the interacting data on the at least one second connection may include: if the determined data transmission mode does not include the data transmission mode corresponding to the first connection, and is another data transmission mode, the first terminal may establish at least one second connection with the second terminal based on the determined data transmission mode, so as to perform data transmission on the second connection.
Optionally, the establishing, by the first terminal, at least one second connection with the second terminal, and the interacting data on the at least one second connection may further include: if the determined data transmission mode includes a data transmission mode corresponding to the first connection and also includes other data transmission modes, the first terminal may establish at least one second connection with the second terminal through the other data transmission modes, so that the first terminal and the second terminal may perform data transmission by using the at least one second connection and the first connection, and may establish a plurality of second connections for data transmission, thereby improving the transmission rate.
Optionally, the establishing, by the first terminal and the second terminal, at least one second connection, and exchanging data over the at least one second connection, includes: the first terminal sends test data to the second terminals on the second connections; monitoring transmission parameters for sending the test data to the second terminal, wherein the transmission parameters at least comprise transmission duration and/or transmission speed; determining a target connection according to the transmission parameters and the at least one second connection; and exchanging data on the determined target connection.
In this embodiment of the present invention, the target connection may be selected from at least one second connection, for example, may be another second connection with better transmission performance (for example, higher data transmission speed), or may be a second connection that can be switched to a data transmission mode in a different operating frequency band.
As can be seen, in the embodiment shown in fig. 2, after the first terminal establishes the first connection with the second terminal, the first terminal may determine a data transmission mode between the first terminal and the second terminal according to the obtained first performance information and the obtained second performance information, and after determining the data transmission mode, send the determined data transmission mode to the second terminal, so that the first terminal and the second terminal may establish at least one second connection based on the determined data transmission mode and perform data interaction based on the second connection. The embodiment of the invention realizes the data transmission mode determination according to the performance information and achieves the purpose of improving the data transmission efficiency.
Fig. 3 is a schematic flow chart of a data transmission method according to another embodiment of the present invention. The method may be applied to the system architecture shown in fig. 1. The method can be applied to terminals including but not limited to smart terminals with a plurality of wireless communication modules, such as mobile phones, tablet computers and the like. Specifically, the method may include:
s301, a first connection is established between a first terminal and a second terminal;
s302, the first terminal obtains first performance information of the first terminal, and obtains second performance information of the second terminal through the first connection.
In the embodiment of the present invention, the established first connection includes, but is not limited to, radio frequency based connection, NFC-based connection, bluetooth-based connection, ultrasonic-based connection, and other connections. The first performance information includes, but is not limited to, parameters for determining an operating frequency band of a plurality of wireless communication modules of the first terminal, including, but not limited to, a first terminal identifier, identifiers of the plurality of wireless communication modules, or a value of an operating frequency band preset for the wireless communication module. The second performance information includes, but is not limited to, parameters for determining operating frequency bands of a plurality of wireless communication modules of the second terminal, such as second terminal identifiers, identifiers of the plurality of wireless communication modules, or values of the operating frequency bands preset for the wireless communication modules.
Optionally, the second performance information may be sent to the first terminal by the second terminal after the first connection is established between the first terminal and the second terminal. Alternatively, the second capability information may be obtained by the first terminal from a memory. For example, before the first terminal and the second terminal establish the first connection, when the first terminal establishes the direct connection with the second terminal, the obtained second performance information may be stored, and when the second performance information needs to be obtained later, if the device information broadcasted by the second terminal, such as the device identifier, the hardware address, and the like, is received, the device information may be directly obtained from the memory.
And S303, the first terminal determines a data transmission mode between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information, and notifies the second terminal of the data transmission mode.
In the embodiment of the present invention, the first terminal may include a plurality of wireless communication modules. And the second terminal may also include a plurality of wireless communication modules. The plurality of wireless communication modules included in the first terminal at least include a first module and a second module, and the plurality of wireless communication modules included in the second terminal at least include a first module and a second module.
Optionally, the determining, in step S303, a data transmission manner between the first terminal and the second terminal according to the operating frequency band indicated by the first performance information and the operating frequency band indicated by the second performance information includes: the first terminal determines the working frequency band of a first module and the working frequency band of a second module in the first terminal according to the first performance information; the first terminal determines the working frequency band of a first module and the working frequency band of a second module in the second terminal according to the second performance information; the first terminal compares the first module working frequency band and the second module working frequency band of the first terminal with the difference between the first module working frequency band and the second module working frequency band of the second terminal; the first terminal selects a data transmission mode according to the comparison result.
It should be noted that, when the first performance information includes a parameter for determining an operating frequency band of a first module and a parameter for determining an operating frequency band of a second module, which are included in the first terminal, the first terminal may determine the operating frequency band of the first module and the operating frequency band of the second module, which are included in the first terminal, according to the first performance information. When the second performance information includes a parameter for determining an operating frequency band of the first module and a parameter for determining an operating frequency band of the second module, the second terminal may determine the operating frequency band of the first module and the operating frequency band of the second module included in the second terminal according to the second performance information. The first terminal may determine a data transmission mode between the first terminal and the second terminal according to an operating frequency band of each wireless communication module included in the first terminal and an operating frequency band of each wireless communication module included in the second terminal.
Optionally, the selecting, by the first terminal, a data transmission mode according to the comparison result includes: if the working frequency bands between the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands between the second module of the first terminal and the second module of the second terminal are the same, but the working frequency bands between the first module and the second module are different, the first terminal selects the data transmission mode corresponding to the first module and the data transmission mode corresponding to the second module.
For example, the first module of the first terminal is a Wi-Fi module, the first module of the second terminal is a Wi-Fi module, the second module of the first terminal is a bluetooth module, and the second module of the second terminal is a bluetooth module. If the working frequency band of the Bluetooth module of the first terminal is the same as that of the Bluetooth module of the second terminal, and the working frequency band of the Wi-Fi module of the first terminal is the same as that of the Wi-Fi module of the second terminal, the working frequency bands between the Bluetooth module and the Wi-Fi module are different. The first terminal selects a data transmission mode corresponding to the bluetooth module and a data transmission mode corresponding to the Wi-Fi module.
It should be noted that, if the working frequency bands between the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands between the second module of the first terminal and the second module of the second terminal are the same, and the working frequency bands between the first module and the second module are the same, the first terminal preferentially selects the data transmission mode corresponding to the second module.
For example, the first module of the first terminal is a Wi-Fi module, the first module of the second terminal is a Wi-Fi module, the second module of the first terminal is a bluetooth module, and the second module of the second terminal is a bluetooth module. If the working frequency band of the Bluetooth module of the first terminal is the same as that of the Bluetooth module of the second terminal, and the working frequency band of the Wi-Fi module of the first terminal is the same as that of the Wi-Fi module of the second terminal, the working frequency bands between the Bluetooth module and the Wi-Fi module are the same. The first terminal preferentially selects a data transmission mode corresponding to the Wi-Fi module.
Optionally, if the working frequency bands between the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands between the second module of the first terminal and the second module of the second terminal are the same, and the working frequency bands between the first module and the second module are the same, the first terminal may query whether there are other working frequency bands in the first module or the second module, if so, the working frequency band of the first module or the working frequency band of the second module is switched to other working frequency bands, and a data transmission mode corresponding to the first module and a data transmission mode corresponding to the second module are selected.
For example, the first module of the first terminal is a Wi-Fi module, the first module of the second terminal is a bluetooth module, and the second module of the second terminal is a bluetooth module. If the working frequency band of the Bluetooth module of the first terminal is the same as that of the Bluetooth module of the second terminal, the working frequency band of the Wi-Fi module of the first terminal is the same as that of the Wi-Fi module of the second terminal, and the working frequency bands between the Bluetooth module and the Wi-Fi module are the same. If the Wi-Fi module comprises a first working frequency band, such as 2.4GHz, and a second working frequency band, such as 5GHz, the first terminal selects a data transmission mode that the working frequency band of the Wi-Fi module is 5 GHz. Alternatively, the data transmission mode may be a Wi-Fi transmission mode based on the 5GHz band and a bluetooth transmission mode.
Further optionally, if the working frequency bands between the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands between the second module of the first terminal and the second module of the second terminal are the same, and the working frequency bands between the first module and the second module are the same, the first terminal may determine the number of antennas used by the first module and the second module of the first terminal through the antenna parameter of the first performance information, and may determine the number of antennas used by the first module and the second module of the second terminal through the antenna parameter of the second performance information. And determining a data transmission mode according to the number of antennas used by the first module and the second module of the first terminal and the number of antennas used by the first module and the second module of the first terminal.
It should be noted that, the determining the data transmission mode according to the number of antennas used by the first module and the second module of the first terminal and according to the number of antennas used by the first module and the second module of the first terminal may include: if the number of the antennas used by the first module and the second module of the first terminal is one or the number of the antennas used by the first module and the second module of the second terminal is one, the first terminal preferentially selects the data transmission mode corresponding to the first module. If the number of the antennas used by the first module and the second module of the first terminal is two and the number of the antennas used by the first module and the second module of the second terminal is two, the first terminal selects a data transmission mode corresponding to the first module and a data transmission mode corresponding to the second module.
It should be noted that, if the working frequency bands of the first module of the first terminal and the first module of the second terminal are different, the working frequency bands of the first module of the first terminal and the first module of the second terminal may be negotiated between the first terminal and the second terminal, so that the working frequency band of the first module of the first terminal may be the same as the working frequency band of the first module of the second terminal, and thus the first terminal and the second terminal establish a connection in the same working frequency band.
Further, data transfer may be performed over the connection. If the working frequency ranges between the second module of the first terminal and the second module of the second terminal are different, the working frequency ranges between the second module of the first terminal and the second module of the second terminal can be negotiated between the first terminal and the second terminal, so that the working frequency range of the second module of the first terminal can be the same as the working frequency range of the second module of the second terminal, and the first terminal and the second terminal can establish connection in the same working frequency range. Further, data transfer may be performed over the connection.
S304, according to the determined data transmission mode, the first terminal and the second terminal establish at least one second connection, and data is interacted on the at least one second connection.
In step S303, the first terminal may determine a data transmission manner between the first terminal and the second terminal according to the operating frequency band determined by the first performance information and the operating frequency band determined by the second performance information. The number of the data transmission modes may be multiple. In step S304, according to the determined data transmission manner, the first terminal and the second terminal establish at least one second connection, and exchange data on the at least one second connection.
Optionally, the establishing, by the first terminal and the second terminal, at least one second connection, and the interacting data on the at least one second connection may include: if the determined data transmission mode does not include the data transmission mode corresponding to the first connection, but is other data transmission modes, the first terminal may establish at least one second connection with the second terminal based on the determined data transmission mode, so as to perform data transmission on the at least one second connection.
Optionally, the establishing, by the first terminal, at least one second connection with the second terminal, and the interacting data on the at least one second connection may further include: if the determined data transmission mode includes a data transmission mode corresponding to the first connection and also includes other data transmission modes, the first terminal may establish at least one second connection with the second terminal through the other data transmission modes, so that the first terminal and the second terminal may perform data transmission by using the at least one second connection and the first connection, and may establish a plurality of second connections for data transmission, thereby increasing the data transmission rate.
Optionally, if the determined data transmission mode is a Wi-Fi based transmission mode, the establishing, by the first terminal and the second terminal, at least one second connection includes: judging whether the first terminal and the second terminal establish Wi-Fi hotspot connection by using the first module; and if the Wi-Fi hotspot connection is not established, triggering to establish the Wi-Fi hotspot connection between the first terminal and the second terminal so as to establish at least one second connection between the first terminal and the second terminal.
It should be noted that, if it is detected that the first terminal does not turn on the Wi-Fi hotspot, the first terminal may be triggered to turn on the hotspot, where the triggering manner includes, but is not limited to, triggering in the form of a notification message. If the Wi-Fi hotspot is not started by the second terminal, the second terminal can be triggered to start the Wi-Fi hotspot, and the triggering mode includes but is not limited to a mode of sending a notification message to the second terminal. Further, in a process that the first terminal opens the Wi-Fi hotspot and/or a process that the second terminal opens the Wi-Fi hotspot, a corresponding working frequency band may be selected under the Wi-Fi hotspot, so that at least a second connection is established between the first terminal and the second terminal using a data transmission manner corresponding to the selected working frequency band.
As can be seen, in the embodiment shown in fig. 3, the first terminal may establish a first connection with the second terminal, and may obtain first performance information of the first terminal, and obtain second performance information of the second terminal through the first connection; and the first terminal determines a data transmission mode between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information. And informing the second terminal of the data transmission mode; and according to the determined data transmission mode, the first terminal and the second terminal establish at least one second connection, and data is interacted on the at least one second connection, so that the data transmission rate is improved.
Fig. 4 is a schematic structural diagram of a data transmission device according to an embodiment of the present invention. The device can be applied to terminals including but not limited to smart terminals with a plurality of wireless communication modules, such as mobile phones, tablet computers and the like. The apparatus may include a first connection module 401, an obtaining module 402, a determining module 403, and a second connection module 404, and specifically, the apparatus may include:
a first connection module 401, configured to establish a first connection with a second terminal.
An obtaining module 402, configured to obtain first performance information of a first terminal, and obtain second performance information of a second terminal through the first connection.
A determining module 403, configured to determine a data transmission manner between the first terminal and the second terminal according to the first performance information and the second performance information, and notify the second terminal of the data transmission manner.
A second connection module 404, configured to establish at least one second connection with the second terminal according to the determined data transmission manner, and interact data on the at least one second connection.
Wherein the data transmission manner indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection.
In this embodiment of the present invention, the first connection module 401 and the second connection module 404 may be communication interfaces of a first terminal, and specifically, the first connection module 401 may be other wireless communication modules, such as a radio frequency module, an ultrasonic module, and a bluetooth module, included in the communication interfaces. Meanwhile, the second connection module 404 may be other wireless communication modules such as a Wi-Fi module included in the communication interface. The second connection module 404 and the first connection module 401 are not the same module. The obtaining module 402 may be disposed in a processor of the first terminal, and the determining module 403 may also be disposed in the processor of the first terminal.
In an embodiment of the present invention, the first connection may include a radio frequency based connection, such as an NFC based connection, a bluetooth based connection, an ultrasonic based connection, or other connections. The second connection includes, but is not limited to, other connections such as Wi-Fi based connections. Wherein the second connection is not the first connection.
Optionally, the determining module 403 is specifically configured to determine a data transmission manner between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information.
It should be noted that the first performance information may include parameters for determining an operating frequency band of each wireless communication module of the first terminal, and the second performance information may include parameters for determining an operating frequency band of each wireless communication module of the first terminal. The determining module 403 may determine the data transmission mode between the first terminal and the second terminal according to the parameter included in the first performance information and used for determining the operating frequency band of each wireless communication module of the first terminal, and the parameter included in the second performance information and used for determining the operating frequency band of each wireless communication module of the first terminal.
Optionally, the determining module 403 may include: a first determining unit, configured to determine, according to the first performance information, a working frequency band of a first module and a working frequency band of a second module in the first terminal; a second determining unit, configured to determine, according to the second performance information, a working frequency band of a first module and a working frequency band of a second module in the second terminal; a comparing unit, configured to compare a working frequency band of the first module and a working frequency band of the second module of the first terminal with a difference between the working frequency band of the first module and the working frequency band of the second module of the second terminal; and the selection unit is used for selecting the data transmission mode according to the comparison result.
In the embodiment of the present invention, the plurality of wireless communication modules included in the first terminal at least include a first module and a second module, and the plurality of wireless communication modules included in the second terminal at least include a first module and a second module.
It should be noted that, when the first performance information includes a parameter for determining an operating frequency band of a first module and a parameter for determining an operating frequency band of a second module, which are included in the first terminal, the determining module 403 may determine the operating frequency band of the first module and the operating frequency band of the second module, which are included in the first terminal, according to the first performance information. When the second performance information includes a parameter for determining an operating frequency band of the first module and a parameter for determining an operating frequency band of the second module, the determining module 403 may determine the operating frequency band of the first module and the operating frequency band of the second module included in the second terminal according to the second performance information. The determining module 403 may determine the data transmission mode between the first terminal and the second terminal according to the working frequency band of each wireless communication module included in the first terminal and the working frequency band of each wireless communication module included in the second terminal.
Optionally, the determining module 403 is specifically configured to select a data transmission mode corresponding to the first module and a data transmission mode corresponding to the second module if the working frequency bands of the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands of the second module of the first terminal and the second module of the second terminal are the same, but the working frequency bands of the first module and the second module are different.
For example, the first module of the first terminal is a Wi-Fi module, the first module of the second terminal is a Wi-Fi module, the second module of the first terminal is a bluetooth module, and the second module of the second terminal is a bluetooth module. If the working frequency band of the Bluetooth module of the first terminal is the same as that of the Bluetooth module of the second terminal, and the working frequency band of the Wi-Fi module of the first terminal is the same as that of the Wi-Fi module of the second terminal, the working frequency bands between the Bluetooth module and the Wi-Fi module are the same. The determining module 403 preferentially selects the data transmission mode corresponding to the Wi-Fi module.
Optionally, the second connection module 404 is specifically configured to: sending test data to the second terminal on each second connection; monitoring transmission parameters for sending the test data to the second terminal, wherein the transmission parameters at least comprise transmission duration and/or transmission speed; determining a target connection according to the transmission parameters and at least one second connection; and exchanging data on the determined target connection.
In this embodiment of the present invention, the target connection may be selected from at least one second connection, for example, may be another second connection with better transmission performance (for example, higher data transmission speed), or may be a second connection that can be switched to a data transmission mode in a different operating frequency band.
As can be seen, in the embodiment shown in fig. 4, after the first terminal establishes the first connection with the second terminal, the first terminal may determine a data transmission mode between the first terminal and the second terminal according to the obtained first performance information and the obtained second performance information, and after determining the data transmission mode, send the determined data transmission mode to the second terminal, so that the first terminal and the second terminal may establish at least one second connection based on the determined data transmission mode and perform data interaction based on the second connection. The embodiment of the invention realizes the data transmission mode determination according to the performance information and achieves the purpose of improving the data transmission efficiency.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention, configured to execute the data transmission method shown in fig. 2 or fig. 3 in the present application. Specifically, as shown in fig. 5, the terminal according to the embodiment of the present invention may include: at least one processor 1000, at least one communication interface 2000, memory 3000, and the like. Wherein the components are communicatively coupled via one or more buses 4000. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 5 is not intended to limit embodiments of the present invention, and may be a bus configuration, a star configuration, a combination of more or fewer components than those shown, or a different arrangement of components. Wherein:
the processor 1000 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing programs and/or modules stored in the memory 3000 and calling data stored in the memory 3000. The processor 1000 may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the Processor 1000 may include only a Central Processing Unit (CPU), or may be a combination of a CPU, a Digital Signal Processor (DSP), a Graphics Processing Unit (GPU), and various control chips. In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
The communication interface 2000 may include a plurality of wireless communication modules, such as a radio frequency module, a Wi-Fi module, a bluetooth module, an ultrasonic module, and the like.
The memory 3000 can be used for storing computer programs and modules, and the processor 1000 and the communication interface 2000 execute various functional applications of the terminal and implement data processing by calling the computer programs and modules stored in the memory 3000. The memory 3000 mainly includes a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the data storage area may store data created according to the use of the terminal, and the like. In the embodiment of the present invention, the operating system may be an Android system, an iOS system, a Windows operating system, or the like.
Specifically, when the mobile terminal according to the embodiment of the present invention is used to execute the data transmission method shown in fig. 2 or fig. 3 of the present application, the processor 1000 calls the computer program stored in the memory 3000 to execute the following steps:
establishing a first connection with a second terminal through the communication interface 2000;
acquiring first performance information of the first terminal, and acquiring second performance information of the second terminal through the first connection;
determining a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information, and notifying the second terminal of the data transmission mode;
and establishing at least one second connection with the second terminal through the communication interface 2000 according to the determined data transmission mode, and interacting data on the at least one second connection.
Wherein the data transmission manner indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection.
Optionally, the processor 1000 invokes a computer program stored in the memory 3000, and the determining the data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information is further configured to perform the following steps:
and determining a data transmission mode between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information.
Optionally, the processor 1000 invokes a computer program stored in the memory 3000, and determines a data transmission mode between the first terminal and the second terminal according to the operating frequency band determined by the first performance information and the operating frequency band determined by the second performance information, and is further configured to execute the following steps:
determining the working frequency band of a first module and the working frequency band of a second module in the first terminal according to the first performance information;
determining the working frequency band of a first module and the working frequency band of a second module in the second terminal according to the second performance information;
comparing the working frequency band of the first module and the working frequency band of the second module of the first terminal with the difference between the working frequency band of the first module and the working frequency band of the second module of the second terminal;
and selecting a data transmission mode according to the comparison result.
Optionally, the processor 1000 invokes a computer program stored in the memory 3000, and the selecting a data transmission mode according to the comparison result is further configured to perform the following steps:
and if the working frequency bands of the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands of the second module of the first terminal and the second module of the second terminal are the same, but the working frequency bands of the first module and the second module are different, selecting the data transmission mode corresponding to the first module and the data transmission mode corresponding to the second module.
Optionally, the processor 1000 invokes a computer program stored in the memory 3000, establishes at least one second connection with the second terminal, and interacts data on the at least one second connection, and is further configured to perform the following steps:
sending test data to the second terminal over the respective second connection via the communication interface 2000;
monitoring transmission parameters when the test data is sent to the second terminal, wherein the transmission parameters at least comprise transmission duration and/or transmission speed;
determining a target connection according to the transmission parameters and at least one second connection;
data is exchanged over the determined target connection via the communication interface 2000.
In an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor 1000 to implement the data transmission method as described in the embodiment of fig. 2 or fig. 3 in the present application.
In one embodiment, there is also provided a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform a data transfer method as described in the embodiments of fig. 2 or fig. 3 of the present application.
As can be seen, in the embodiment shown in fig. 5, after the first terminal establishes the first connection with the second terminal, the first terminal may determine the data transmission mode between the first terminal and the second terminal according to the obtained first performance information and the obtained second performance information, and after determining the data transmission mode, send the determined data transmission mode to the second terminal, so that the first terminal and the second terminal may establish at least one second connection based on the determined data transmission mode and perform data interaction based on the second connection. The embodiment of the invention realizes that the data transmission mode is determined according to the performance information, and at least one second connection is established, thereby achieving the purpose of improving the data transmission efficiency.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A data transmission method is applied to a first terminal, and is characterized in that a direct connection communication button for managing a data transmission mode on the first terminal is configured on the first terminal, and after the direct connection communication button is clicked to start a direct connection communication mode of the first terminal, the first terminal automatically starts a first transmission function and a second transmission function, wherein the method comprises the following steps:
establishing a first connection with a second terminal, wherein the first connection corresponds to the first transmission function;
acquiring first performance information of the first terminal, and acquiring second performance information of the second terminal through the first connection;
determining a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information, and notifying the second terminal of the data transmission mode; when determining a data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information and notifying the second terminal of the data transmission mode, the method includes: determining a data transmission mode between the first terminal and the second terminal according to the transmission capability level of the first terminal determined by the first performance information and the transmission capability level of the second terminal determined by the second performance information; the transmission capability level of the first terminal is determined according to the maximum data transmission speed and/or the maximum data transmission range respectively supported by the plurality of wireless communication modules of the first terminal, which are included in the first performance information, and the transmission capability level of the second terminal is determined according to the maximum data transmission speed and/or the maximum data transmission range respectively supported by the plurality of wireless communication modules of the second terminal, which are included in the second performance information;
establishing at least one second connection with the second terminal according to the determined data transmission mode, and interacting data on the at least one second connection; the data transmission mode indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection, and the second connection at least corresponds to the second transmission function.
2. The method of claim 1, wherein the determining the data transmission mode between the first terminal and the second terminal according to the first performance information and the second performance information further comprises;
and determining a data transmission mode between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information.
3. The method according to claim 2, wherein determining the data transmission mode between the first terminal and the second terminal according to the operating frequency band determined by the first performance information and the operating frequency band determined by the second performance information comprises:
determining the working frequency band of a first module and the working frequency band of a second module in the first terminal according to the first performance information;
determining the working frequency band of a first module and the working frequency band of a second module in the second terminal according to the second performance information;
comparing the working frequency band of the first module and the working frequency band of the second module of the first terminal with the difference between the working frequency band of the first module and the working frequency band of the second module of the second terminal;
and selecting a data transmission mode according to the comparison result.
4. The method of claim 3, wherein selecting the data transmission mode according to the comparison comprises:
and if the working frequency bands of the first module of the first terminal and the first module of the second terminal are the same, the working frequency bands of the second module of the first terminal and the second module of the second terminal are the same, but the working frequency bands of the first module and the second module are different, selecting the data transmission mode corresponding to the first module and the data transmission mode corresponding to the second module.
5. The method according to any of claims 1-4, wherein establishing at least one second connection with the second terminal and exchanging data over the at least one second connection comprises:
sending test data to the second terminal on each second connection;
monitoring transmission parameters when the test data is sent to the second terminal, wherein the transmission parameters at least comprise transmission duration and/or transmission speed;
determining a target connection according to the transmission parameters and at least one second connection;
and exchanging data on the determined target connection.
6. A data transmission device is applied to a first terminal, and is characterized in that a direct connection communication button for managing a data transmission mode on the first terminal is configured on the first terminal, and after the direct connection communication button is clicked to start a direct connection communication mode of the first terminal, the first terminal automatically starts a first transmission function and a second transmission function, and the device comprises:
the first connection module is used for establishing a first connection with a second terminal, and the first connection corresponds to the first transmission function;
an obtaining module, configured to obtain first performance information of the first terminal, and obtain second performance information of the second terminal through the first connection;
a determining module, configured to determine a data transmission mode between the first terminal and the second terminal according to the transmission capability level of the first terminal determined by the first performance information and the transmission capability level of the second terminal determined by the second performance information, and notify the second terminal of the data transmission mode; the transmission capability level of the first terminal is determined according to the maximum data transmission speed and/or the maximum data transmission range respectively supported by the plurality of wireless communication modules of the first terminal, which are included in the first performance information, and the transmission capability level of the second terminal is determined according to the maximum data transmission speed and/or the maximum data transmission range respectively supported by the plurality of wireless communication modules of the second terminal, which are included in the second performance information;
the second connection module is used for establishing at least one second connection with the second terminal according to the determined data transmission mode and interacting data on the at least one second connection; the data transmission mode indicates a connection type of the first terminal and the second terminal for establishing the at least one second connection, and the second connection at least corresponds to the second transmission function.
7. The apparatus of claim 6,
the determining module is further configured to determine a data transmission mode between the first terminal and the second terminal according to the working frequency band determined by the first performance information and the working frequency band determined by the second performance information.
8. The apparatus of claim 7, wherein the determining module comprises:
a first determining unit, configured to determine, according to the first performance information, a working frequency band of a first module and a working frequency band of a second module in the first terminal;
a second determining unit, configured to determine, according to the second performance information, a working frequency band of a first module and a working frequency band of a second module in the second terminal;
a comparing unit, configured to compare a working frequency band of the first module and a working frequency band of the second module of the first terminal with a difference between the working frequency band of the first module and the working frequency band of the second module of the second terminal;
and the selection unit is used for selecting the data transmission mode according to the comparison result.
9. A terminal comprising a processor, a communication interface, a memory, the processor, the communication interface and the memory being interconnected, wherein the memory is configured to store application program code, and wherein the processor is configured to invoke the program code to perform the method of any of claims 1-5.
10. A computer-readable storage medium, in which a computer program is stored, characterized in that the computer program comprises program instructions, which, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-5.
CN201710524188.3A 2017-06-30 2017-06-30 Data transmission method, device and terminal Active CN107222937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710524188.3A CN107222937B (en) 2017-06-30 2017-06-30 Data transmission method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710524188.3A CN107222937B (en) 2017-06-30 2017-06-30 Data transmission method, device and terminal

Publications (2)

Publication Number Publication Date
CN107222937A CN107222937A (en) 2017-09-29
CN107222937B true CN107222937B (en) 2020-02-07

Family

ID=59951840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710524188.3A Active CN107222937B (en) 2017-06-30 2017-06-30 Data transmission method, device and terminal

Country Status (1)

Country Link
CN (1) CN107222937B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729483B (en) * 2017-10-17 2021-05-11 Oppo广东移动通信有限公司 Classification display method, classification display device, terminal and computer-readable storage medium
CN109302698A (en) * 2018-08-27 2019-02-01 优视科技新加坡有限公司 Near-field Data moving method and its device
CN110266537A (en) * 2019-06-21 2019-09-20 上海庆科信息技术有限公司 Equipment distribution method, apparatus, system, to distribution net equipment and terminal
CN110730448A (en) * 2019-09-18 2020-01-24 华为技术有限公司 Method for establishing connection between devices and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453496A (en) * 2016-09-05 2017-02-22 北京小米移动软件有限公司 File transmission method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102264158B (en) * 2011-08-04 2016-08-03 华为终端有限公司 The method of work of multi-mode device and multi-mode device
KR102092063B1 (en) * 2013-04-26 2020-03-23 삼성전자 주식회사 Method And Apparatus For Performing Communication Service
CN105376818B (en) * 2014-08-29 2018-09-11 展讯通信(上海)有限公司 The method and mobile terminal of various wireless communication technology co-existence in mobile terminal
US9668204B2 (en) * 2014-09-19 2017-05-30 Qualcomm Inc. Collaborative demand-based dual-mode Wi-Fi network control to optimize wireless power and performance
CN105430602A (en) * 2015-11-27 2016-03-23 广东欧珀移动通信有限公司 Networking method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453496A (en) * 2016-09-05 2017-02-22 北京小米移动软件有限公司 File transmission method and device

Also Published As

Publication number Publication date
CN107222937A (en) 2017-09-29

Similar Documents

Publication Publication Date Title
CN107222937B (en) Data transmission method, device and terminal
CN107360635B (en) Data transmission method, device, terminal and computer readable storage medium
EP3108694B1 (en) Traffic steering between wlan and cellular networks
CN106464303B (en) Data transmission method and terminal
KR20140110901A (en) Method for transmitting data between terminals and terminal
US10674556B2 (en) Method for data transmission and mobile terminal
CN107124690B (en) Method for data transmission between smart watch and mobile phone
CN104584490A (en) Data transmitting method and device
CN107613536A (en) Select method, apparatus, mobile terminal and the readable storage medium storing program for executing of network
US10542405B2 (en) Bluetooth profile fast connect
WO2019015429A1 (en) Data transmission method, device, terminal and computer-readable storage medium
CN108282846B (en) Service request processing method and device
CN110249661B (en) Network connection method and device
WO2022057119A1 (en) Cell switching method and apparatus, storage medium, and electronic device
CN105578567A (en) Network scanning method and terminal
US10716043B2 (en) Access point handover method and device
CN109803454B (en) Data transmission control method and related product
EP3783957A1 (en) Transmission path switching method and device
CN108966206B (en) Data traffic sharing method and device, terminal and storage medium
CN103813304B (en) A kind of method and device realized the communication resource and shared
WO2020024864A1 (en) Communication method and device
CN108566649B (en) Network segment management method of personal hotspot and related products
CN110461023B (en) Cell residence method and device for voice service, storage medium and main base station
CN109743456B (en) Data transmission method and related device
EP3979712A1 (en) Wifi roaming method and device, mobile terminal, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant