[go: up one dir, main page]

CN107018554B - A data transmission method, device and intelligent terminal - Google Patents

A data transmission method, device and intelligent terminal Download PDF

Info

Publication number
CN107018554B
CN107018554B CN201710132669.XA CN201710132669A CN107018554B CN 107018554 B CN107018554 B CN 107018554B CN 201710132669 A CN201710132669 A CN 201710132669A CN 107018554 B CN107018554 B CN 107018554B
Authority
CN
China
Prior art keywords
connection
terminal
data
queue
identifier
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.)
Expired - Fee Related
Application number
CN201710132669.XA
Other languages
Chinese (zh)
Other versions
CN107018554A (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 CN201710132669.XA priority Critical patent/CN107018554B/en
Publication of CN107018554A publication Critical patent/CN107018554A/en
Priority to PCT/CN2018/078001 priority patent/WO2018161870A1/en
Priority to MYPI2019003058A priority patent/MY203977A/en
Application granted granted Critical
Publication of CN107018554B publication Critical patent/CN107018554B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Communication Control (AREA)

Abstract

本发明实施例公开了一种数据传输方法、装置及智能终端,其中,所述方法包括:第一终端在检测到数据发送指令时,显示包括传输标识的用户界面;第一终端在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端;其中,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,并通过所述第一连接交互连接数据,根据第二连接策略和交互的连接数据建立所述第一终端和第二终端之间的第二连接。采用本发明实施例,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。

Figure 201710132669

Embodiments of the present invention disclose a data transmission method, a device, and an intelligent terminal, wherein the method includes: when the first terminal detects a data transmission instruction, displaying a user interface including a transmission identifier; During the selection operation of the transmission identifier, the data to be transmitted is sent to the second terminal through the second connection; wherein, the first terminal establishes a first connection with the second terminal based on the first connection policy, and The connection data is exchanged through the first connection, and a second connection between the first terminal and the second terminal is established according to the second connection strategy and the exchanged connection data. By adopting the embodiment of the present invention, a connection mode such as Bluetooth with low power consumption can be used as the first connection, and data is exchanged through the first connection to establish a connection mode such as WiFi that can transmit a large amount of data quickly, which not only saves the terminal Energy consumption, and can meet the user's requirements for fast data transmission and large capacity.

Figure 201710132669

Description

一种数据传输方法、装置及智能终端A data transmission method, device and intelligent terminal

技术领域technical field

本发明涉及计算机应用技术领域,尤其涉及一种数据传输方法、装置及智能终端。The present invention relates to the technical field of computer applications, and in particular, to a data transmission method, a device and an intelligent terminal.

背景技术Background technique

随着计算机技术和电子技术的发展,智能终端能够为用户提供各种功能的服务,为用户的工作、学习和生活带来帮助。一般的智能终端中,可以通过提供系统服务或者用户安装功能应用的方式,来体验相应的功能。With the development of computer technology and electronic technology, intelligent terminals can provide users with services of various functions and help users in their work, study and life. In a general smart terminal, the corresponding functions can be experienced by providing system services or installing functional applications by users.

智能终端提供的数据传输服务是用户常用的服务之一。目前两个终端之间进行数据传输一般是基于移动通信网络、计算机网络,并使用即时通讯应用来实现。如何在两个终端之间更好地进行数据传输成为研究的热点问题。The data transmission service provided by the intelligent terminal is one of the services commonly used by users. At present, data transmission between two terminals is generally based on a mobile communication network and a computer network, and is realized by an instant messaging application. How to better perform data transmission between two terminals has become a hot research issue.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种数据传输方法、装置及智能终端,可简捷地进行终端之间的数据传输。The embodiments of the present invention provide a data transmission method, a device and an intelligent terminal, which can simply perform data transmission between terminals.

一方面,本发明实施例提供了一种数据传输方法,包括:On the one hand, an embodiment of the present invention provides a data transmission method, including:

第一终端在检测到数据发送指令时,显示包括传输标识的用户界面;When the first terminal detects the data sending instruction, it displays a user interface including the transmission identifier;

第一终端在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端;The first terminal sends the data to be transmitted to the second terminal through the second connection when detecting the selection operation on the transmission identifier;

其中,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,并通过所述第一连接交互连接数据,根据第二连接策略和所述交互的连接数据建立所述第一终端和第二终端之间的第二连接。Wherein, the first terminal establishes a first connection with the second terminal based on a first connection strategy, exchanges connection data through the first connection, and establishes the connection data according to the second connection strategy and the exchanged connection data. A second connection between the first terminal and the second terminal.

相应地,本发明实施例还提供了一种数据传输装置,包括:Correspondingly, an embodiment of the present invention also provides a data transmission device, including:

显示模块,用于在检测到数据发送指令时,显示包括传输标识的用户界面;a display module, used for displaying a user interface including a transmission identifier when a data sending instruction is detected;

传输模块,用于在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端;a transmission module, configured to send the data to be transmitted to the second terminal through the second connection when the selection operation on the transmission identifier is detected;

连接模块,用于基于第一连接策略建立第一终端与第二终端之间的第一连接,并通过所述第一连接交互连接数据,根据第二连接策略和所述交互的连接数据建立所述第一终端和第二终端之间的第二连接。The connection module is configured to establish a first connection between the first terminal and the second terminal based on the first connection strategy, exchange connection data through the first connection, and establish all the connection data according to the second connection strategy and the exchanged connection data. the second connection between the first terminal and the second terminal.

相应地,本发明实施例还提供了一种智能终端,包括处理器,第一通信接口、第二通信接口,其中:Correspondingly, an embodiment of the present invention also provides an intelligent terminal, including a processor, a first communication interface, and a second communication interface, wherein:

所述处理器,用于调用第一通信接口建立与第二终端之间的第一连接,并通过所述第一连接交互连接数据,调用第二通信接口根据第二连接策略和所述交互的连接数据建立所述第一终端和第二终端之间的第二连接;The processor is configured to call the first communication interface to establish a first connection with the second terminal, and to exchange connection data through the first connection, and to call the second communication interface according to the second connection strategy and the interactive data. The connection data establishes a second connection between the first terminal and the second terminal;

所述处理器,还用于在检测到数据发送指令时,显示包括传输标识的用户界面,在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端。The processor is further configured to display a user interface including a transmission identifier when detecting a data sending instruction, and when detecting a selection operation on the transmission identifier, send the data to be transmitted to the first through the second connection. Two terminals.

在建立终端之间用于进行传输数据的通信连接时,可通过两个能实现不同连接性能的连接方式建立连接,从而满足用户不同的连接需求和数据传输需求,在本发明实施例中,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。When establishing a communication connection between terminals for transmitting data, the connection can be established through two connection modes that can realize different connection performances, so as to meet the different connection requirements and data transmission requirements of users. A connection method such as Bluetooth with low power consumption is used as the first connection, and data is exchanged through the first connection to establish a connection method such as WiFi that can transmit a large amount of data quickly, which not only saves the energy consumption of the terminal, but also satisfies the user requirements. Fast and large-capacity requirements for data transmission.

附图说明Description of drawings

图1是本发明实施例的一种用户界面的示意图;1 is a schematic diagram of a user interface according to an embodiment of the present invention;

图2是本发明实施例的建立第一终端和第二终端之间的连接的交互示意图;2 is an interactive schematic diagram of establishing a connection between a first terminal and a second terminal according to an embodiment of the present invention;

图3是本发明实施例的其中一种建立蓝牙连接的流程示意图;3 is a schematic flow chart of establishing a Bluetooth connection according to an embodiment of the present invention;

图4是本发明实施例的另一种用户界面的示意图;4 is a schematic diagram of another user interface according to an embodiment of the present invention;

图5是本发明实施例的一种数据传输方法的流程流程示意图;5 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;

图6是本发明实施例的第一连接建立方法的流程流程示意图;6 is a schematic flowchart of a first connection establishment method according to an embodiment of the present invention;

图7是本发明实施例的一种数据传输装置的结构示意图;7 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention;

图8是本发明实施例的一种智能终端的结构示意图。FIG. 8 is a schematic structural diagram of an intelligent terminal according to an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例中,为了减少用户操作,在检测到用户需要发送某个数据时,即显示一个包含传输标识的用户界面,用户只需通过触摸点击等方式选择该传输标识后,终端即可通过建立的第二连接发送该数据,如图1所示,包括了用户已经选中的待传输图片数据101和提供给用户的传输接口标识102,用户一旦点击了传输接口标识102,则基于建立的第二连接即开始传输数据。在下述的各个实施例中,发送端可以均认为是第一终端,而接收端则可以认为是可以与第一终端建立第一连接和第二连接的第二终端。In this embodiment of the present invention, in order to reduce user operations, when it is detected that the user needs to send certain data, a user interface containing a transmission identifier is displayed. The established second connection sends the data, as shown in FIG. 1, including the picture data 101 to be transmitted selected by the user and the transmission interface identification 102 provided to the user. Once the user clicks the transmission interface identification 102, based on the established first The second connection starts to transmit data. In each of the following embodiments, the transmitting end may be regarded as a first terminal, and the receiving end may be regarded as a second terminal that can establish a first connection and a second connection with the first terminal.

并且,本发明实施例采用的是自动配对方式,基于第一连接来建立第二连接,可以采用功耗较小的第一连接来确定需要数据传输的双方终端,然后在第一连接的基础上建立功耗较大的第二连接,在一定程度上节省了功耗。In addition, the embodiment of the present invention adopts an automatic pairing method, and establishes a second connection based on the first connection. Establishing a second connection with a relatively high power consumption saves power consumption to a certain extent.

在一个实施例中,可以采用蓝牙BLE自动扫描建立第一连接,采用WiFi P2P等(基于WiFi的点对对传输)方式来建立第二连接。由于WiFi P2P前期的连接点标识的扫描操作所消耗的功耗较大,而WiFi P2P的方式能够更好地传输数据,特别是大数据。因此,在本发明实施例中,基于蓝牙确定数据传输的双方终端,并建立第一连接,在第一连接的基础上建立WiFi P2P连接,节省了WiFi P2P的连接数据交互阶段的功耗,方便终端之间更好地传递数据。In one embodiment, the first connection may be established by using Bluetooth BLE automatic scanning, and the second connection may be established by means such as WiFi P2P (WiFi-based peer-to-peer transmission). Since the scanning operation of the connection point identification in the early stage of WiFi P2P consumes a large amount of power, the WiFi P2P method can better transmit data, especially large data. Therefore, in the embodiment of the present invention, the two terminals of the data transmission are determined based on Bluetooth, and the first connection is established, and the WiFi P2P connection is established on the basis of the first connection, which saves the power consumption in the connection data interaction stage of the WiFi P2P, which is convenient Better transfer of data between terminals.

在本发明实施例中,建立第二连接传输数据的基本交互流程大致上可以包括三个阶段,即蓝牙扫描、蓝牙连接以及建立WiFi P2P连接。In the embodiment of the present invention, the basic interaction process of establishing the second connection to transmit data may roughly include three stages, that is, Bluetooth scanning, Bluetooth connection, and establishing a WiFi P2P connection.

在一个实施例中,如图2所示,是本发明实施例的建立第一终端和第二终端之间的连接的交互示意图,在图2中大致描述了第一终端和第二终端之间建立连接的过程。In one embodiment, as shown in FIG. 2 , it is an interactive schematic diagram of establishing a connection between a first terminal and a second terminal according to an embodiment of the present invention. In FIG. 2 , the connection between the first terminal and the second terminal is roughly described. The process of establishing a connection.

本发明实施例的所述第一终端作为数据发送端,可以是在检测到对传输标识的选中操作时,触发执行图2所示的步骤,建立所述第一终端和作为接收端的第二终端之间的第二连接,在其他实施例中,也可以是在第一终端的用户开启了蓝牙扫描等操作后,触发执行图2所示的步骤建立第一终端和第二终端之间的第二连接,以便于后续在对传输标识的选中操作时,能够直接开始发送待传输数据。所述第二连接需要开启诸如蓝牙、WiFi等功能,以便于与所述第一终端之间配合。所述第二终端在开启了相应功能后,进入广告模式,建立GATT(Generic Attribute Profile,普通属性协议)服务等以便于建立第二连接。In this embodiment of the present invention, the first terminal acts as a data sending end, and may trigger the execution of the steps shown in FIG. 2 when detecting the selection operation of the transmission identifier, and establish the first terminal and the second terminal serving as the receiving end In other embodiments, the second connection between the first terminal and the second terminal may be triggered to execute the steps shown in FIG. Second connection, so that the transmission of the data to be transmitted can be directly started when the selection operation of the transmission identifier is performed subsequently. The second connection needs to enable functions such as Bluetooth and WiFi, so as to facilitate cooperation with the first terminal. After enabling the corresponding function, the second terminal enters the advertisement mode, and establishes a GATT (Generic Attribute Profile, common attribute protocol) service, etc., in order to establish the second connection.

如图2所示,第一终端首先扫描处于广告阶段的设备,第一终端在S201中发送扫描数据请求,在S202中接收包括第二终端等其他终端返回的数据。第一终端在S203中从返回的数据中选择确定出第二终端,并在S204中发送连接请求以请求连接到第二终端。在S205中建立第一终端和第二终端之间的双向通信连接,即第一连接。在建立第一连接后,所述第一终端在S206中在第一连接的通道上,发送请求传输连接建立的数据给第二终端。所述第二终端在收到请求传输连接建立数据后,得到建立传输连接指令,进入WiFi连接阶段。所述第二终端在S207中向第一终端返回请求数据。所述第一终端在收到请求数据后,得到建立传输连接指令进入WiFi连接阶段。所述第一终端在S208发送进入传输连接阶段指令,所述第二终端在S209中返回发送成功回执。收到建立传输连接指令回执后第一终端也进入WIFI连接阶段。至此,第一终端和第二终端之间完成第二连接的建立。As shown in FIG. 2 , the first terminal first scans the devices in the advertisement stage, the first terminal sends a scan data request in S201 , and receives data returned by other terminals including the second terminal in S202 . The first terminal selects and determines the second terminal from the returned data in S203, and sends a connection request to request to connect to the second terminal in S204. In S205, a bidirectional communication connection between the first terminal and the second terminal, that is, the first connection, is established. After the first connection is established, the first terminal sends the data requesting the establishment of the transmission connection to the second terminal on the channel of the first connection in S206. After receiving the request for establishing the transmission connection, the second terminal obtains an instruction for establishing the transmission connection, and enters the WiFi connection stage. The second terminal returns the request data to the first terminal in S207. After receiving the request data, the first terminal obtains an instruction to establish a transmission connection and enters the WiFi connection stage. The first terminal sends an instruction to enter the transmission connection stage in S208, and the second terminal returns a sending success receipt in S209. The first terminal also enters the WIFI connection stage after receiving the receipt of the instruction to establish the transmission connection. So far, the establishment of the second connection between the first terminal and the second terminal is completed.

在一个实施例中,针对蓝牙BLE广告的广告包,可以携带31bytes数据,为了在这个阶段就显示所有接收端的名称以便于从中选择出第二终端,需要携带蓝牙的MAC地址以及接收端的连接标识,例如接收端的名字。In one embodiment, the advertisement packet for Bluetooth BLE advertisement can carry 31 bytes of data. In order to display the names of all receivers at this stage so that the second terminal can be selected from them, it is necessary to carry the Bluetooth MAC address and the connection identifier of the receiver. For example the name of the receiver.

如表1所示,示出了终端在广告其连接标识的三种广告模式。As shown in Table 1, three advertisement modes in which the terminal advertises its connection identification are shown.

表1:Table 1:

广告模式advertising model 间隔(毫秒)interval (milliseconds) 功耗Power consumption 低延时low latency 100100 high 平衡balance 250250 平衡balance 高延时high latency 10001000 Low

基于表1所示,综合考虑功耗和成功率,广告可以采用的策略包括:接收端广告暂不设置广告总时长(只要用户开启了本发明实施例所说的数据传输功能就一直开着,直到用户关闭该数据传输功能开关。确认待机之后能通过连接唤醒,可以广告和扫描到),并且在前60秒设置为低延时模式增加扫描到的概率,后续的时间都设置为平衡模式,降低功耗。蓝牙完成连接并确定WIFI建立连接之后,发送端的广告停止降低功耗,蓝牙和wifi的干扰也可以减少。Based on Table 1, taking power consumption and success rate into consideration, strategies that can be adopted for advertisements include: the total duration of advertisements is temporarily not set for advertisements at the receiving end (as long as the user enables the data transmission function in the embodiment of the present invention, it is always on, and Until the user turns off the data transmission function switch. After confirming that the standby can be woken up through the connection, it can be advertised and scanned), and set the low-latency mode in the first 60 seconds to increase the probability of scanning, and the subsequent time is set to the balance mode, Reduce power consumption. After Bluetooth completes the connection and confirms that the WIFI is connected, the advertisement on the sender stops to reduce power consumption, and the interference between Bluetooth and wifi can also be reduced.

本发明实施例中还设置了对可能出现的异常的处理,可以包括:接收端广告包的数据过大的异常:这种异常可通过严格控制接收端的名字来避免出现。接收端广告过多和其他内部异常:由于总的蓝牙BLE的广告数有限制例如最多支持10个,超过限制之后广告会失败。该异常情况可以通过重新扫描来避免,在一个实施例中,延时后进行重试广告或者扫描三次,延时时间按照梯度设置,例如设置第一次重试等待2s,第二次5s,第三次10s,重试三次仍然异常则关闭蓝牙再开启。关闭重启可以只执行一次,重新打开蓝牙重试三次之后不成功则可以进行用户提示。The embodiment of the present invention also provides processing for possible exceptions, which may include: an exception that the data of the advertisement packet of the receiving end is too large: this kind of abnormality can be avoided by strictly controlling the name of the receiving end. Too many advertisements on the receiver side and other internal anomalies: Since the total number of Bluetooth BLE advertisements is limited, for example, a maximum of 10 advertisements are supported, and the advertisement will fail after the limit is exceeded. The abnormal situation can be avoided by rescanning. In one embodiment, the advertisement is retried or scanned three times after a delay. The delay time is set according to the gradient, for example, set the first retry to wait 2s, the second time to 5s, and the second time to wait for 2s. Three times for 10s, retry three times and still abnormal, turn off the Bluetooth and turn it on again. The shutdown and restart can be performed only once, and the user can be prompted after re-opening the Bluetooth and retrying three times if it fails.

在一个实施例中,如表2所示,示出了终端在扫描连接标识的三种模式。In one embodiment, as shown in Table 2, three modes in which the terminal is scanning the connection identifier are shown.

表2:Table 2:

扫描模式scan mode 窗口(mills)windows (mills) 间隔(mills)interval (mills) 功耗Power consumption 低功耗Low power consumption 500500 50005000 Low 平衡balance 20002000 50005000 平衡balance 低延时low latency 50005000 50005000 high

发送端单次设置的扫描时间可以为60s,前20s可以设置为低时延模式,后续时间可以设置为平衡模式。蓝牙完成连接并确定WiFi建立连接(第二连接)之后,接收端的扫描操作停止降低功耗,蓝牙和wifi的干扰也可以减少。扫描主要会存在超时未扫描到广告设备的异常,考虑到用户交互场景,可以不给用户失败提示,不停的扫描重试,直到用户退出选择发送界面。The scan time set by the sender for a single time can be 60s, the first 20s can be set to low-latency mode, and the subsequent time can be set to balanced mode. After Bluetooth completes the connection and determines that the WiFi connection (second connection) is established, the scanning operation at the receiving end stops to reduce power consumption, and the interference between Bluetooth and WiFi can also be reduced. Scanning mainly has the exception that the advertising device is not scanned after timeout. Considering the user interaction scenario, it is not necessary to give the user a failure prompt, and continue to scan and retry until the user exits the option to send interface.

在蓝牙连接建立阶段,即第一连接的建立阶段,扫描到的接收端在用户进行选择之后会进行连接请求,以确定数据传输连接。数据传输的连接分可以为单接收端连接和多接收端的连接。对于第一终端和第二终端之间的单终端连接(第一连接),接收端作为GATT的服务端,发送端(第一终端)启动连接,连接建立并找寻到服务端(第二终端)之后,服务端和发送端对底层数据传输连接方式进行协商,主要是三个信息:WiFi连接方式,包括P2P或者热点连接;传输服务器信息(WiFi P2P MAC地址或者热点名称和密码)、传输客户端信息(用于服务端鉴别连接的发送端,连接过程中不能控制,只能在传输数据中加入发送端信息以便处理指定用户的数据);开启连接的指令(WIFI P2P扫描Discovery的指令,或者开启热点指令)。传输数据包格式Characteristic(UUID,value)。In the Bluetooth connection establishment stage, that is, the establishment stage of the first connection, the scanned receiving end will make a connection request after the user makes a selection to determine the data transmission connection. Connections for data transmission can be divided into single-receiver connections and multi-receiver connections. For the single-terminal connection (first connection) between the first terminal and the second terminal, the receiving end acts as the server of GATT, the sending end (the first terminal) starts the connection, the connection is established and the server (the second terminal) is found. After that, the server and the sender negotiate the underlying data transmission connection mode, mainly including three pieces of information: WiFi connection mode, including P2P or hotspot connection; transmission server information (WiFi P2P MAC address or hotspot name and password), transmission client Information (used by the server to identify the sender of the connection, cannot be controlled during the connection process, only the sender information can be added to the transmission data to process the data of the specified user); the command to open the connection (WIFI P2P scan Discovery command, or turn on hot command). Transmission packet format Characteristic (UUID, value).

如图3所示,是本发明实施例的其中一种建立蓝牙连接的流程示意图。在扫描到对应的一个或者多个接收端的连接标识后,所述第一终端在S301中选择目标连接标识,该目标连接标识即为用户希望的作为接收端的第二终端的连接标识。第一终端在S302中请求建立连接,即请求建立第一连接。所述第一终端在S303中判断连接是否成功,如果成功则执行S304和S305,如果没有成功则执行S306,在S306中判断次数是否超过重连次数阈值,如果超过,则在S307中确定连接失败。如果没有超过则重新请求建立第一连接执行所述S302,进行重连处理。As shown in FIG. 3 , it is a schematic flow chart of establishing a Bluetooth connection according to an embodiment of the present invention. After scanning the corresponding one or more connection identifiers of the receiving end, the first terminal selects a target connection identifier in S301, where the target connection identifier is the connection identifier of the second terminal that the user desires as the receiving end. The first terminal requests to establish a connection in S302, that is, requests to establish a first connection. The first terminal judges whether the connection is successful in S303, executes S304 and S305 if successful, executes S306 if not successful, judges whether the number of times exceeds the threshold of the number of reconnections in S306, and if so, determines that the connection fails in S307 . If it does not exceed, then re-request to establish the first connection, execute the S302, and perform reconnection processing.

在S305中对建立的第一连接进行连接监听,在S308中判断第一连接是否中断,如果没有中断,则继续监听,执行S305。如果第一连接中断,则执行所述S306,判断中断前的连接是否已经是第N次中断重连,如果是,则确定连接失败。如果否,则再次执行S302,执行下一次中断后重连。In S305, connection monitoring is performed on the established first connection, and in S308, it is judged whether the first connection is interrupted, if not, the monitoring is continued, and S305 is executed. If the first connection is interrupted, S306 is executed to determine whether the connection before the interruption has been the Nth interrupted reconnection, and if so, it is determined that the connection fails. If not, execute S302 again, and execute the reconnection after the next interruption.

在S304中,基于已建立的第一连接,发送端可以向接收端发送数据请求,该数据请求用于向接收端确认该接收端是否可以开始接收数据,在发送完数据请求后,即开始计时,在S309中判断在预设的时间范围是否接收到接收端返回的确认能够接收数据的确认信息。如果在预设的时间范围内没有接收到确认信息,则执行S310判断发送数据请求的次数是否超过预设的次数阈值,若没有超过预设的次数阈值,则再次执行S304。若超过次数阈值,则可以执行S311确定连接失败。在确定连接失败后,可以重新请求建立第一连接执行所述S302。In S304, based on the established first connection, the sending end may send a data request to the receiving end, and the data request is used to confirm to the receiving end whether the receiving end can start to receive data, and after sending the data request, start timing , in S309 , it is determined whether the confirmation information returned by the receiving end confirming that the data can be received is received within the preset time range. If no confirmation information is received within the preset time range, execute S310 to determine whether the number of times of sending data requests exceeds the preset times threshold, and if not, execute S304 again. If the number of times exceeds the threshold, S311 may be executed to determine that the connection fails. After it is determined that the connection fails, the first connection may be re-requested to perform the S302.

如果在S309中判断结果为接收到确认信息,则执行S312,在S312中开始发送用于建立第一终端和第二终端之间的第二连接的相关指令,在发送相关指令后,开始计时,并在S313中判断在预设的时间范围内是否接收到接收端的回执信息,所述回执信息用于表明接收端开始接收数据、指令,并可以回复相应的用于建立第二连接的相关数据、指令。如果接收到接收端的回执信息,则执行S314,触发进入第二连接的连接处理。如果没有接收到接收端的回执信息,则执行S315判断发送第二连接的相关指令的次数是否超过了预设的次数阈值,若没有超过预设的次数阈值,则再次执行所述S312。超过预设的次数阈值,则执行S311确定连接失败。在确定连接失败后,可以重新请求建立第一连接执行所述S302。If the judging result in S309 is that the confirmation information is received, then execute S312, in S312, start sending the relevant instruction for establishing the second connection between the first terminal and the second terminal, after sending the relevant instruction, start timing, In S313, it is judged whether the receipt information of the receiving end is received within the preset time range, and the receipt information is used to indicate that the receiving end starts to receive data and instructions, and can reply the relevant data for establishing the second connection, instruction. If the receipt information of the receiving end is received, S314 is executed to trigger the connection process of entering the second connection. If the receipt information from the receiving end is not received, execute S315 to determine whether the number of times of sending the relevant instruction of the second connection exceeds a preset number of times threshold, and if not, execute S312 again. If the preset times threshold is exceeded, S311 is executed to determine that the connection fails. After it is determined that the connection fails, the first connection may be re-requested to perform the S302.

在多接收端连接的情况下,当用户选择扫描到的连接标识中多个终端作为接收端时,将所有需要传输的接收端的连接标识纳入到一个队列中,并依次基于队列中的所有连接标识进行发送端和接收端之间的连接处理。当确定的连接标识所对应的终端无法建立连接,通过上述的异常处理流程均无法成功建立连接时,可以重新启动蓝牙扫描并等待5s,如果没有扫描到同样的连接标识则将该无法建立连接的连接标识放置到另外一个重试队列中,继续执行下一个接收端连接,如果找到吻合的设备则重新进行连接处理。当选择的连接标识都完成了重连处理后,蓝牙设备再进行一次5s的扫描,与重试队列中的各个连接标识进行对比,如果可以再次扫描到重试队列中的连接标识,则进行对应连接标识所指示终端的第一连接处理。In the case of multi-receiver connections, when the user selects multiple terminals in the scanned connection identifiers as the receiving terminals, the connection identifiers of all the receiving terminals that need to be transmitted are incorporated into a queue, and all connection identifiers in the queue are sequentially based on the queue. Perform connection processing between the sender and the receiver. When the terminal corresponding to the determined connection identifier cannot establish a connection, and the connection cannot be successfully established through the above exception handling process, you can restart the Bluetooth scan and wait for 5s. If the same connection identifier is not scanned, the connection cannot be established. The connection identifier is placed in another retry queue, and the next receiver connection is continued. If a matching device is found, the connection processing is performed again. When the selected connection identifiers have completed the reconnection process, the Bluetooth device performs another 5s scan, and compares it with each connection identifier in the retry queue. If the connection identifier in the retry queue can be scanned again, the corresponding The first connection processing of the terminal indicated by the connection identifier.

在通过上述方式完成了第一连接的建立后,即在第一连接的基础上进行第二连接处理。在一个实施例中,可以通过解析蓝牙连接中获取到的底层连接信息,即获取到上述的第二连接的连接类型(WiFi P2P或者WiFi热点),选择当前支持的最佳连接方式建立第二连接,也就是根据第一连接传输的数据,第一终端选择WiFi P2P的连接方式或WiFi热点的连接方式建立第二连接。After the establishment of the first connection is completed in the above manner, the second connection processing is performed on the basis of the first connection. In one embodiment, by analyzing the underlying connection information obtained in the Bluetooth connection, that is, obtaining the connection type (WiFi P2P or WiFi hotspot) of the above-mentioned second connection, the currently supported best connection mode can be selected to establish the second connection , that is, according to the data transmitted by the first connection, the first terminal selects the connection mode of WiFi P2P or the connection mode of WiFi hotspot to establish the second connection.

在建立WiFi P2P(第二连接)时,第一终端和第二终端均可进入扫描Discovery模式,执行WiFi P2P连接的状态监听。发送端将扫描到的所有点peers(P2P连接中,各个发送端和接收端称为点peer)进行过滤,选取MAC地址符合蓝牙BLE发送的地址的设备进行连接,可以指定接收端为连接服务器。其中,在上述的蓝牙BLE连接中,发送端和接收端之间交互接收端的MAC地址,以便于发送端在建立WiFi P2P连接进行扫描时,可以从已经扫描到的多个接收端的连接点标识(MAC地址)中直接找到想要传输数据的接收端的连接点标识。When the WiFi P2P (second connection) is established, both the first terminal and the second terminal can enter the scanning Discovery mode to perform state monitoring of the WiFi P2P connection. The sender filters all scanned peers (in the P2P connection, each sender and receiver are called peers), selects the device whose MAC address matches the address sent by Bluetooth BLE to connect, and can specify the receiver as the connection server. Among them, in the above-mentioned Bluetooth BLE connection, the MAC address of the receiving end is exchanged between the transmitting end and the receiving end, so that when the transmitting end establishes a WiFi P2P connection for scanning, it can be scanned from the connection point identifiers of multiple receiving ends ( MAC address), directly find the connection point identifier of the receiver that wants to transmit data.

在一个实施例中,进行WiFi P2P连接时的异常处理包括:扫描Discovery时可能出现不支持P2P的异常情况,如果发送端不能提前判断,所以这个异常的处理可以再次通过上述的蓝牙连接(第一连接)来重新协商底层数据传输连接方式,或者再重新进行一次蓝牙连接,重新确定出第二连接的连接类型。当前P2P设备忙的异常情况,在扫描Discovery和连接connect的发起时都有可能发生此类异常情况,为了克服此类异常情况,可以通过设置当前请求延时(梯度的第一次重试可以等待15s,第二次可以等待25s,第三次可以等待35s)后重试,重新请求次数不超过三次,超过三次则可以确认为连接失败。建立传输连接过程的超时时间可以为30s,未检测到设备直接重试,总重试次数不超过三次,三次后还未检测到则可以判定为连接失败。需要说明的是,WiFi P2P连接均以广播的形式,可以将流程统一到单独的线程中,做同步处理,避免状态异常。In one embodiment, the exception handling during WiFi P2P connection includes: when scanning Discovery, an exception that does not support P2P may occur. If the sender cannot judge in advance, the exception handling can be performed again through the above-mentioned Bluetooth connection (first connection) to renegotiate the underlying data transmission connection mode, or perform a Bluetooth connection again to re-determine the connection type of the second connection. The abnormal situation that the current P2P device is busy may occur when scanning Discovery and the initiation of the connection. In order to overcome this abnormal situation, you can set the current request delay (the first retry of the gradient can wait for 15s, wait for 25s for the second time, and wait for 35s for the third time) and try again. The number of re-requests does not exceed three times, and it can be confirmed as a connection failure if it exceeds three times. The timeout period for establishing a transmission connection can be 30s. If the device is not detected, it will retry directly. The total number of retries should not exceed three times. If it is not detected after three times, it can be determined that the connection fails. It should be noted that all WiFi P2P connections are in the form of broadcast, which can unify the process into a separate thread for synchronous processing to avoid abnormal status.

在建立了WiFi P2P连接后,可能存在的异常及其处理方式包括:连接异常断开,在WIFI P2P的直连建立之后启动监听任务,检测到断开则立刻进行重连,重连成功后数据会进行重传。重连出现失败,重试三次,如果仍然无法建立则判定传输失败。After the WiFi P2P connection is established, the possible exceptions and their processing methods include: the connection is abnormally disconnected, start the monitoring task after the WiFi P2P direct connection is established, and immediately reconnect when the disconnection is detected. After the reconnection is successful, the data will be retransmitted. If the reconnection fails, try again three times. If it still cannot be established, it is determined that the transmission fails.

在需要建立发送端与多个接收端之间的WiFi P2P连接时,当前执行的接收端不能建立第二连接,则直接进行下一个连接,将暂时失败的放到最后执行重新连接的处理。其中,发送端与多个接收端建立连接的情况处理如下。When a WiFi P2P connection between the sender and multiple receivers needs to be established, and the receiver that is currently executing cannot establish the second connection, the next connection is directly performed, and the temporary failure is performed at the end to perform the reconnection process. Wherein, the case where the sender establishes connections with multiple receivers is handled as follows.

在建立了发送端(第一终端)和接收端(第二终端)的第二连接后,即可进行相应文件的传输,在建立的第二连接后传输采用网络应用程序接口socket操作。在一个实施例中,指令传输创建了两个socket队列,其中一个socket同时需要支持文件传输。创建两个socket传输指令的目的在于,首先,传输时,可能存在有一部分数据需要支持消息同步队列,此时,先发送的数据先送达,后发送的后送达,所以可以创建一个同步消息队列,在这个队列里面传输需要同步的信息和文件。而当该同步队列在传输数据量较大的数据时,会阻塞这个队列,所以可以同时创建了一个异步的异步消息队列保证消息也能及时送达对方,这个异步是相对于上一个同步队列的异步,但其本身的队列也是保持着先后关系的,异步消息队列支持双向,用于支持连接双方的状态信息和指令交互,例如文件达到,是否同意接收,接收状态等。After the second connection between the sending end (the first terminal) and the receiving end (the second terminal) is established, the corresponding file can be transmitted. After the second connection is established, the transmission adopts the network application program interface socket operation. In one embodiment, the instruction transfer creates two socket queues, one of which needs to support file transfer at the same time. The purpose of creating two socket transmission instructions is that, first, during transmission, there may be some data that needs to support message synchronization queues. At this time, the data sent first will be delivered first, and the data sent later will be delivered, so a synchronization message can be created. Queue, in which information and files that need to be synchronized are transmitted. When the synchronous queue transmits data with a large amount of data, it will block the queue, so an asynchronous asynchronous message queue can be created at the same time to ensure that the message can also be delivered to the other party in time. This asynchronous is relative to the previous synchronous queue. Asynchronous, but its own queue also maintains a sequential relationship. Asynchronous message queue supports two-way, which is used to support the interaction of status information and instructions between the two sides of the connection, such as file arrival, whether to agree to receive, receiving status, etc.

在本发明实施例中,文件等数据的传输可以创建三个socket队列,包括上述的同步消息队列(一个连接)、异步消息队列(一个连接),并包括异步文件队列,三个socket连接使用的是同一队列,不保证先加入队列的会先传输。In the embodiment of the present invention, the transmission of data such as files can create three socket queues, including the above-mentioned synchronous message queue (one connection), asynchronous message queue (one connection), and an asynchronous file queue. The three socket connections use It is the same queue, and it is not guaranteed that the one that joins the queue first will be transmitted first.

第一终端和第二终端之间协商的编解码的格式如下各个表所示,其中,表3是指令编码格式,表4是文件编码格式,表5是心跳信息编码格式。The encoding and decoding formats negotiated between the first terminal and the second terminal are shown in the following tables, wherein Table 3 is the instruction encoding format, Table 4 is the file encoding format, and Table 5 is the heartbeat information encoding format.

表3:table 3:

Figure BDA0001240507760000081
Figure BDA0001240507760000081

表4:Table 4:

Figure BDA0001240507760000082
Figure BDA0001240507760000082

表5:table 5:

VersionVersion DataTypeDataType Body LengthBody Length Resp/ReqResp/Req

上述的表3、4以及5中,前3列为头部信息,关于头部信息的说明如下表6所述。其中,在下述表6中的描述中,数据包的长度不包括前面版本号和数据类型长度。关于指令编码格式中其他列的说明如下表7所述。关于文件编码格式中,其他列的说明如下表8所述。In the above-mentioned Tables 3, 4 and 5, the first three columns are header information, and the description of the header information is as described in Table 6 below. Wherein, in the description in Table 6 below, the length of the data packet does not include the previous version number and data type length. The descriptions of other columns in the instruction encoding format are described in Table 7 below. Regarding the file encoding format, the descriptions of other columns are described in Table 8 below.

表6:Table 6:

名称name 数据类型type of data 说明illustrate VersionVersion IntInt 数据包的版本号the version number of the packet DataTypeDataType IntInt 数据类型(见数据类型说明)data type (see data type description) BodyLengthBodyLength LongLong 数据包的长度length of packet

表7:Table 7:

Figure BDA0001240507760000091
Figure BDA0001240507760000091

表8:Table 8:

Figure BDA0001240507760000092
Figure BDA0001240507760000092

进一步地,在本发明实施例中,针对上述提及的各种数据类型的说明如下表9所述。Further, in this embodiment of the present invention, descriptions for the various data types mentioned above are as described in Table 9 below.

表9:Table 9:

名称name 取值value 说明illustrate DATA_TYPE_COMMANDDATA_TYPE_COMMAND 0x000010000x00001000 指令数据类型Instruction data type DATA_TYPE_FILEDATA_TYPE_FILE 0x000020000x00002000 文件数据类型file data type DATA_TYPE_HEARTBEATDATA_TYPE_HEARTBEAT 0x000040000x00004000 心跳数据类型Heartbeat data type

另外,在数据编码中,STRING字符串型字段采用1个INTEGER作为长度字段,标识字符串所占字节数长度(不包括长度字段所占的4个字节)。字符串采用UTF-8编码。特殊的:空字符串””长度字段为0,无数据。即空字符串也要占用4个字节长度。INTEGER整型字段占4个字节,采用高位在前的编码方式。取值范围为0到4294967295。LONG长整型字段占8个字节,采用高位在前的编码方式。取值范围为0到18446744073709551615。In addition, in the data encoding, the STRING string type field adopts 1 INTEGER as the length field to identify the length of the number of bytes occupied by the character string (excluding the 4 bytes occupied by the length field). Strings are encoded in UTF-8. Special: empty string "" length field is 0, no data. That is, the empty string also occupies 4 bytes in length. The INTEGER integer field occupies 4 bytes, and the encoding method is used with high order bits first. The value range is 0 to 4294967295. The LONG long integer field occupies 8 bytes, and adopts the encoding method of high order. The value range is 0 to 18446744073709551615.

本发明实施例中,设置传输过程中监听连接状态设置Socket超时监听,以便于实现断开自动重连。设置两个传输队列,一个待传输队列,一个传输队列,当开始传输时将任务从待传输队列移动到传输队列,当接收端发回成功指令再移除传输队列的任务,如果连接中断、传输超时或者后续的文件校验失败都会将传输队列的任务进行重新传输。还会考虑文件的断点续传。待传输队列的数据可以通过上述提到的三个socket队列传输。In the embodiment of the present invention, the monitoring connection state during the transmission process is set to set the Socket timeout monitoring, so as to realize automatic reconnection after disconnection. Set up two transmission queues, one to be transmitted and one to be transmitted. When the transmission starts, the task is moved from the to-be-transmitted queue to the transmission queue. When the receiver sends back a successful command, the task of the transmission queue is removed. If the connection is interrupted, the transmission Timeout or subsequent file verification failures will retransmit the tasks in the transmission queue. Resuming file transfers will also be considered. The data of the queue to be transmitted can be transmitted through the three socket queues mentioned above.

在本发明实施例中,还可以对传输的数据进行校验,可以通过比较md5值的方式来进行数据校验,接收端判断不一致,则通过指令通道通知发送端重新发送此数据,即将传输队列中的该任务重新添加到待传输队列。针对数据的传输还可以考虑增加压缩模块对待传输的数据进行压缩,提高传输效率。In the embodiment of the present invention, the transmitted data can also be verified, and the data verification can be performed by comparing the md5 value. If the receiving end judges that it is inconsistent, the sending end is notified through the command channel to re-send the data, which is about to transmit the queue. The task in is re-added to the pending transmission queue. For data transmission, it is also possible to consider adding a compression module to compress the data to be transmitted to improve transmission efficiency.

在本发明实施例中,大部分数据内容可以当成文件传输,特别的:文字、联系人和书签直接传输(当成字符流直接传输,限制大小,超过1M采用文件形式处理),将支持的类型和处理器作为Processor动态加载(类似备份还原和云服务的代理agent)提供类型解析和数据处理方法,找不到加载器的类型统一按照文件处理。In this embodiment of the present invention, most of the data content can be transmitted as files, especially: direct transmission of text, contacts, and bookmarks (directly transmitted as character streams, limited in size, and processed in the form of files over 1M), the supported types and The processor is dynamically loaded as a Processor (similar to the proxy agent of backup and restoration and cloud services) to provide type analysis and data processing methods. The type of the loader that cannot be found is processed uniformly according to the file.

需要说明的是,上述各个位置处提及的诸如具体时间数值、次数值以及文件数据量值等具体数值仅为举例,在其他实施例中还可以由其他数值,例如在表1中,低延时的广告模式下,间隔时间值还可以为150毫秒等,重新连接的次数可以为上述提及的三次,也可以为四次、五次等,上述提到的“超过1M采用文件形式处理”,在其他实施例中也可以为超过2M时采用文件形式处理。It should be noted that the specific values such as the specific time value, the number of times, and the file data volume value mentioned in the above-mentioned various positions are only examples. In other embodiments, other values can also be used. In the current advertising mode, the interval time value can also be 150 milliseconds, etc., and the number of reconnections can be the three times mentioned above, or four times, five times, etc. The above-mentioned "more than 1M is processed in file form" , in other embodiments, it can also be processed in the form of a file when it exceeds 2M.

在本发明实施例中还包括对传输数据的大小的限制。发送端计算所选文件的总大小,通过命令通道传输到接收端,接收端计算自己的剩余空间,然后回复到发送端,空间不够做相应的用户提示即可。如果接收端的存储空间足够则可以进行文件传输的相应步骤。In this embodiment of the present invention, a limit on the size of the transmitted data is also included. The sender calculates the total size of the selected file, transmits it to the receiver through the command channel, the receiver calculates its own remaining space, and then replies to the sender. If the storage space of the receiving end is sufficient, the corresponding steps of file transfer can be performed.

本发明实施例中,包含上述实施例所描述的处理方式和功能可以通过一个系统控件的形式来实现,或者由一个可执行的应用程序来实现。所能够传输的数据范围包括照片、视频、音乐、文档、压缩包、安装包等不同类别的文件,文件夹,文字及联系人等文本类,网址类。已安装的非系统应用程序的数据不传输。其中,当作为一个系统控件时,可以在用户界面中显著位置处提供触发该系统控件的传输标识,一旦点击该传输标识,该系统控件开始工作,执行上述提及的各种处理方式,最终实现数据传输等功能。智能终端的控制中心则增加开启该系统控件的入口,控制接收文件权限,即控制是否接收文件的权限。In the embodiments of the present invention, the processing methods and functions described in the foregoing embodiments may be implemented in the form of a system control, or implemented by an executable application program. The range of data that can be transmitted includes different types of files such as photos, videos, music, documents, compressed packages, installation packages, folders, texts and contacts, and URLs. Data for installed non-system applications is not transferred. Among them, when used as a system control, a transmission identifier that triggers the system control can be provided at a prominent position in the user interface. Once the transmission identifier is clicked, the system control starts to work, executes the various processing methods mentioned above, and finally realizes the data transmission and other functions. The control center of the intelligent terminal adds an entrance to open the system control to control the permission to receive files, that is, the permission to control whether to receive files.

当智能终端作为接收端时,接收到的文件可以存储到指定的文件夹下,接收以及存储原则是根据文件类型放置在系统对应设置的文件夹中。在一个实施例中,图片可以对应存储到在终端中预置的截图(Sceenshots)文件夹、拍照(Camera)文件夹、其他图片(Pictures)文件夹;视频可以对应存储在预置的相机拍摄文件夹、其他影像(Movies)文件件等;音乐则存储在预置的音乐(Music)文件夹;网址则存储在预置的浏览器收藏夹下;文字则可以生成一个便签或者TXT文件来记录传输的文字等;联系人信息则存储到终端的联系人文件夹中。对于没有提到的其他文件类,则可以通过一个带传输路径的文件夹来存储该其他文件类,例如文件名为“接收XXX的文件”的文件夹。When the smart terminal is used as the receiving end, the received files can be stored in the specified folder, and the principle of receiving and storing is to place them in the corresponding folder set by the system according to the file type. In one embodiment, pictures may be stored in a preset screenshot (Sceenshots) folder, a camera (Camera) folder, and other pictures (Pictures) folders preset in the terminal; videos may be stored in a preset camera shooting file correspondingly folder, other video (Movies) files, etc.; music is stored in the preset Music (Music) folder; URLs are stored in the preset browser favorites; text can generate a note or TXT file to record the transmission text, etc.; the contact information is stored in the contact folder of the terminal. For other file types not mentioned, you can store the other file types through a folder with a transfer path, such as a folder named "receive XXX files".

在一个实施例中,相册中文件的发送处理逻辑可以根据用户的选择进行。首先,相册中选择缩略图或者单个图片和视频发送,进入链接及传输流程可以继续、取消和选择文件操作。再次选择的文件范围为下次发送内容,与正在发送的内容无关。如图4所示,用户在相册中选中了两张图片401和402,并在用户界面上提供了传输的入口即传输标识。用户在点击选择了该传输标识后即开始向已经建立第二连接的一个或者多个接收端(每一个接收端可以认为是第二终端)的用户,例如图4中的用户A403和用户B。In one embodiment, the sending processing logic of the files in the album may be performed according to the user's selection. First, select thumbnails or single pictures and videos in the album to send, and enter the link and transfer process to continue, cancel and select file operations. The range of files selected again is the content to be sent next time, regardless of the content being sent. As shown in FIG. 4 , the user selects two pictures 401 and 402 in the album, and provides the transmission entry, that is, the transmission identifier, on the user interface. After the user clicks and selects the transmission identifier, he starts to communicate with the users of one or more receivers (each receiver can be regarded as a second terminal) that has established the second connection, such as user A403 and user B in FIG. 4 .

针对大图单张发起发送的时候,可以再次选择其他照片一起发送。选择多张进行发送时,需要确认选择图片是否合适,尤其对于连拍照片多的情况非常重要。照片需要发送多人,但是每个人的图片范围不同,避免多次连接。进一步地,照片相似度高的文件比较多,需要根据照片内容及质量挑选所需传输的文件。单张大图进行发送可以很好挑选出质量等符合用户要求的照片,而通过缩略图选择想要发送的照片时,则可以同时选择多张。When sending a single large image, you can select other photos to send together. When selecting multiple photos to send, you need to confirm whether the selected photos are suitable, especially for the situation where there are many continuous photos. Photos need to be sent to multiple people, but each person has a different picture range to avoid multiple connections. Further, there are many files with high photo similarity, and the files to be transmitted need to be selected according to the content and quality of the photos. Sending a single large image can well select photos that meet the user's requirements in terms of quality and so on. When selecting the photos you want to send through thumbnails, you can select multiple photos at the same time.

缩略图预览的文件的范围和顺序可以和启动所述系统控件时确定的可以供用户发送的文件的范围和顺序一致。缩略图预览文件的尺寸大小可以按照预设的尺寸规则进行调整。在一个实施例中,图片全部等比例放大到高度为232DP,长度最大为324DP、最小为36DP,若高度或者长度超过最大或者最小要求,则可以按照最大要求截取图片中间部分。The range and sequence of the files previewed by the thumbnails may be consistent with the range and sequence of the files that can be sent by the user determined when the system control is activated. The size of the thumbnail preview file can be adjusted according to the preset size rules. In one embodiment, all pictures are proportionally enlarged to a height of 232DP, a maximum length of 324DP and a minimum length of 36DP. If the height or length exceeds the maximum or minimum requirements, the middle part of the picture can be cut out according to the maximum requirements.

在智能终端的相册中启动所述系统控件后,可以继续增加选择或者取消已经选择图片和视频,之后继续发送。其他多选或者单个文件发送,一旦启动所述系统控件,则在本次发送中不能再选择新的数据。在开始发送文件时,能够提示对应的接收端怎么操作。After the system control is activated in the album of the smart terminal, the selected pictures and videos can be continued to be added or canceled, and then continue to be sent. For other multi-selection or single file sending, once the system control is activated, new data cannot be selected in this sending. When starting to send a file, it can prompt the corresponding receiver how to operate.

在发送端可以显示发送的用户,即显示第二终端的用户标识等信息,明确知道本次发送的文件所要发送的目标用户。在一个实施例中,发送端可以显示所有已经建立了第二连接的第二终端对应的用户标识,用户标识可以是注册的账号名称或者智能终端的设备名称等设备标识,用户标识还可以包括对应用户所使用的头像等标识。点击了显示的第二终端的用户标识(例如点击头像后)后即触发开始通过第二连接传输数据,再次点击用户标识可以确定为取消对应数据的传输。用户也可以同时选择多个用户标识,可以同时将选择的文件数据传输给该多个用户标识所对应的第二终端。The sending user can be displayed on the sending end, that is, information such as the user ID of the second terminal can be displayed, and the target user to which the file sent this time is to be sent can be clearly known. In one embodiment, the sending end may display all user identifiers corresponding to the second terminals that have established the second connection. The user identifiers may be device identifiers such as a registered account name or a device name of an intelligent terminal, and the user identifiers may also include corresponding identifiers. The avatar and other identifiers used by the user. After clicking on the displayed user identifier of the second terminal (for example, after clicking on the avatar), the start of data transmission through the second connection is triggered, and clicking the user identifier again may determine that the transmission of the corresponding data is canceled. The user can also select multiple user IDs at the same time, and can simultaneously transmit the selected file data to the second terminals corresponding to the multiple user IDs.

在一个实施例中,可以提供相应的用于提示传输状态的用户界面,以便于用户能够清晰地知道传输进展并且可以取消传输。在一个实施例中,点击用户标识(可以认为是传输标识)开始传输数据后,在用户界面中可以显示等待传输、取消传输、传输进度、传输完成中的任意一种或者多种状态信息。点击用户标识(例如点击用户头像)还可以中止当前与所有接收端用户之间的数据传输,中止传输时,已经传输的文件数据不删除。In one embodiment, a corresponding user interface for prompting the transmission status may be provided, so that the user can clearly know the progress of the transmission and can cancel the transmission. In one embodiment, after clicking on the user ID (which can be regarded as a transfer ID) to start data transfer, any one or more status information of waiting for transfer, canceling transfer, transfer progress, and transfer completion can be displayed in the user interface. Clicking on the user ID (for example, clicking on the user's avatar) can also suspend the current data transmission with all recipient users. When the transmission is suspended, the transmitted file data will not be deleted.

在一个实施例中,接收端在开启了所述系统控件或数据传输应用后,在接收端可以显示发送端需要传输的文件类型、文件数量、文件大小中的任意一种或多种。即使建立了双方之间的第二连接,发送端在发送数据时,接收端也可以选择接受或拒绝接收。接收端也可以查看接收数据的进度等信息。传输完成后,用户可以快速查看已经接收的文件。用户可以选择直接打开接收文件,根据不同文件类型,可以直接调用相对应的应用程序打开已经传输的文件。其中,传输的文字使用便签等文字应用打开,图片使用相册等对图片进行管理的应用打开。视频则使用视频播放器等应用打开并播放。音乐使用本地音乐播放器等应用打开并开始播放。联系人信息则使用终端的联系人应用直接打开,处于联系人详情界面。网址直接用浏览器应用打开。其他带有路径的文件直接在文件管理应用中打开。In one embodiment, after the receiving end opens the system control or the data transmission application, the receiving end can display any one or more of the file type, file quantity, and file size that the sending end needs to transmit. Even if the second connection between the two parties is established, when the sender sends data, the receiver can choose to accept or reject the data. The receiving end can also view information such as the progress of receiving data. After the transfer is complete, the user can quickly view the files that have been received. The user can choose to open the received file directly, and according to different file types, can directly call the corresponding application to open the transferred file. Among them, the transmitted text is opened by a text application such as a sticky note, and the picture is opened by an application that manages pictures, such as an album. Videos are opened and played using an app such as a video player. Music opens and starts playing using an app such as a local music player. Contact information is directly opened using the contact application of the terminal, and it is in the contact details interface. The URL is opened directly with the browser application. Other files with paths are opened directly in the file management application.

数据的传输过程可以后台运行,并且保证网络体验正常。发送端用户在后台运行并传输数据后,可以在智能终端的通知栏进行通知指示,该通知指示用于向用户指示当前数据传输的状态,并且点击该通知指示能够进入详细的数据传输界面。The data transfer process can run in the background, and the network experience is guaranteed to be normal. After the sender user runs in the background and transmits data, a notification indication can be made in the notification bar of the smart terminal. The notification indication is used to indicate the current data transmission status to the user, and clicking the notification indication can enter the detailed data transmission interface.

发送端在第一次开启所述的系统控件或者应用后,可以提示用户需要使用蓝牙和wlan权限,在用户点击同意后,后续建立终端之间的连接可以自动开启蓝牙和WiFi相应功能。After the sender opens the system control or application for the first time, it can prompt the user to use Bluetooth and wlan permissions. After the user clicks to agree, the subsequent connection between the terminals can automatically enable the corresponding functions of Bluetooth and WiFi.

另外,在取得用户的数据统计授权后,本发明实施例还可以对数据进行统计,包括统计确定发送端机型、接收端机型、文件类型、不同文件类型的个数分布、一次性传输文件个数的占比、传输文件夹的用户占比、文件传输速度分布、传输成功率、传输次数/人数、传输失败的原因、日程操作路径统计中的任意一种或多种。基于这些统计数据对本发明实施例的数据传输方法进行优化。In addition, after obtaining the user's authorization for data statistics, the embodiment of the present invention may also perform statistics on the data, including statistical determination of the model of the sender, the model of the receiver, the file type, the number distribution of different file types, and the one-time transmission of files. Any one or more of the proportion of the number of files, the proportion of users in the transfer folder, the distribution of file transfer speeds, the success rate of transfer, the number of transfers/number of people, the reasons for transfer failures, and the statistics of schedule operation paths. Based on these statistical data, the data transmission method of the embodiment of the present invention is optimized.

在建立终端之间用于进行传输数据的通信连接时,可通过两个能实现不同连接性能的连接方式建立连接,从而满足用户不同的连接需求和数据传输需求,在本发明实施例中,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。When establishing a communication connection between terminals for transmitting data, the connection can be established through two connection modes that can realize different connection performances, so as to meet the different connection requirements and data transmission requirements of users. A connection method such as Bluetooth with low power consumption is used as the first connection, and data is exchanged through the first connection to establish a connection method such as WiFi that can transmit a large amount of data quickly, which not only saves the energy consumption of the terminal, but also satisfies the user requirements. Fast and large-capacity requirements for data transmission.

下面对本发明实施例的数据传输方法、装置及智能终端进行描述。The data transmission method, device, and intelligent terminal according to the embodiments of the present invention are described below.

请参见图5,是本发明实施例的一种数据传输方法的流程流程示意图,本发明实施例的所述方法可以在智能终端中执行,该智能终端可以是智能手机、平板电脑、智能可穿戴设备等带数据传输功能的终端。这些智能终端具备蓝牙等低功耗的数据传输功能,并包括WiFi等可以快速传输各种数据的数据传输功能。在本发明实施例中,所述第一终端作为发送端、第二终端作为接收端,两个终端均配置了执行数据传输处理功能的系统控件或应用程序。本发明实施例的所述方法包括如下步骤。Please refer to FIG. 5 , which is a schematic flowchart of a data transmission method according to an embodiment of the present invention. The method in the embodiment of the present invention may be executed in a smart terminal, and the smart terminal may be a smart phone, a tablet computer, a smart wearable Equipment and other terminals with data transmission function. These smart terminals have low-power data transmission functions such as Bluetooth, and include data transmission functions such as WiFi that can quickly transmit various data. In this embodiment of the present invention, the first terminal is used as a sending end and the second terminal is used as a receiving end, and both terminals are configured with a system control or an application program that performs a data transmission processing function. The method of the embodiment of the present invention includes the following steps.

S501:第一终端基于第一连接策略建立与第二终端之间的第一连接。所述第一连接策略包括本次需要建立的第一连接的类型,还可以包括连接失败时的处理规则,例如重连的次数,异常处理规则,如何提醒用户等规则。在一个实施例中,所述第一连接策略主要指示建立所述第一终端和第二终端之间的功耗较小的蓝牙连接类型,建立所述第一终端和第二终端之间的蓝牙连接。S501: A first terminal establishes a first connection with a second terminal based on a first connection policy. The first connection policy includes the type of the first connection to be established this time, and may also include processing rules when the connection fails, such as the number of reconnections, exception handling rules, and rules on how to remind the user. In an embodiment, the first connection policy mainly instructs to establish a Bluetooth connection type with low power consumption between the first terminal and the second terminal, and establish a Bluetooth connection between the first terminal and the second terminal. connect.

在成功建立第一终端与第二终端之间的蓝牙连接后,执行下述的S502,如果按照第一连接策略没有成功建立第一连接,例如多次重连后仍然无法建立第一连接,则可以向用户发出提示,提示第一连接不成功,或者进一步还可以提示用户连接失败的原因,这些原因例如可以是上述实施例中提及的蓝牙连接异常等情况。After the Bluetooth connection between the first terminal and the second terminal is successfully established, the following S502 is performed. If the first connection is not successfully established according to the first connection strategy, for example, the first connection cannot be established after multiple reconnections, then The user may be prompted that the first connection is unsuccessful, or the user may be further prompted for the reasons for the failure of the connection, such as the abnormal Bluetooth connection mentioned in the above embodiment.

第一连接策略中还可以包括蓝牙扫描的相关规则和蓝牙广告的相关规则,包括扫描频率,扫描时长,连接标识广告频率,广告时长等规则。可参考上述实施例中关于扫描和广告的描述。The first connection policy may further include related rules of Bluetooth scanning and related rules of Bluetooth advertisement, including rules such as scanning frequency, scanning duration, connection identification advertisement frequency, advertisement duration and the like. Reference may be made to the descriptions of scanning and advertising in the above embodiments.

如果建立第一连接失败,则可以通过重连机制再次发起建立第一连接。在一个实施例中,第一终端广播连接标识后没有接收到第二终端的连接请求。If the establishment of the first connection fails, the establishment of the first connection may be initiated again through a reconnection mechanism. In one embodiment, the first terminal does not receive a connection request from the second terminal after broadcasting the connection identifier.

在一个实施例中,所述第一终端基于第一连接策略的指示,在第一时间范围内,以第一扫描频率扫描获取连接标识;所述第一终端基于第一连接策略的指示,在第二时间范围内,以第二扫描频率扫描获取连接标识;所述第一终端在扫描结束后,从扫描得到的各个连接标识中确定出目标连接标识,并基于所述目标连接标识建立与第二终端之间的第一连接,所述目标连接标识为所述第二终端的连接标识。In one embodiment, the first terminal scans, within a first time range, a connection identifier at a first scanning frequency based on the indication of the first connection strategy; the first terminal, based on the indication of the first connection strategy, Within the second time range, scan at the second scanning frequency to obtain the connection identifier; after the scanning is completed, the first terminal determines the target connection identifier from the respective connection identifiers obtained by scanning, and establishes a connection with the first terminal based on the target connection identifier. For the first connection between two terminals, the target connection identifier is the connection identifier of the second terminal.

或者,在一个实施例中,所述第一终端基于第一连接策略的指示,在第一时间范围内,以第一广播频率广播本终端的连接标识;所述第一终端基于第一连接策略的指示,在第二时间范围内,以第二广播频率广播本终端的连接标识;所述第一终端在广播结束、且接收到第二终端的连接请求后,建立与所述第二终端之间的第一连接,所述连接请求是所述第二终端基于扫描到的所述第一终端广播的连接标识发出的。Or, in an embodiment, the first terminal broadcasts the connection identifier of the terminal at the first broadcast frequency within a first time range based on the indication of the first connection policy; the first terminal is based on the first connection policy within the second time range, broadcast the connection identifier of the terminal at the second broadcast frequency; after the broadcast ends and the first terminal receives the connection request from the second terminal, it establishes a connection with the second terminal. The connection request is sent by the second terminal based on the scanned connection identifier broadcasted by the first terminal.

S502:第一终端通过所述第一连接交互连接数据,根据第二连接策略和交互的连接数据建立所述第一终端和第二终端之间的第二连接。在成功建立第一连接后,通过第一连接交互连接数据。所交互的连接数据包括用于建立第二连接所需的所有必要数据,例如第二终端的MAC地址、WiFi热点标识、连接密码等数据。所述第二连接策略指示了第二连接的类型,还可以包括重连的次数,异常处理规则,连接建立失败如何通知用户的规则等。所述第一连接可以是基于WiFi的通信连接,例如可以是WiFi热点通信连接方式或基于WiFi的点对点P2P通信连接方式。S502: The first terminal exchanges connection data through the first connection, and establishes a second connection between the first terminal and the second terminal according to the second connection policy and the exchanged connection data. After the first connection is successfully established, the connection data is exchanged through the first connection. The exchanged connection data includes all necessary data for establishing the second connection, such as the MAC address of the second terminal, the WiFi hotspot identifier, the connection password and other data. The second connection policy indicates the type of the second connection, and may also include the number of reconnections, exception handling rules, rules for how to notify the user of a connection establishment failure, and the like. The first connection may be a WiFi-based communication connection, such as a WiFi hotspot communication connection or a WiFi-based peer-to-peer P2P communication connection.

其中,在建立第二连接时,所述第一终端从用于建立第二连接的连接点标识中选择出由所述第一连接交互的连接点标识;所述第一终端通过所述第一连接与所述连接点标识所对应的第二终端交互连接信息,建立所述第一终端和第二终端之间的第二连接。Wherein, when establishing the second connection, the first terminal selects the identification of the connection point interacted by the first connection from the identifications of the connection point used for establishing the second connection; The connection exchanges connection information with the second terminal corresponding to the connection point identifier, and establishes a second connection between the first terminal and the second terminal.

由于建立第二连接所需的数据都是通过功耗较小的第一连接交互的,所以,在建立基于WiFi的第二连接时,基于WiFi扫描到需要建立连接的终端后,直接通过第一连接根据扫描结果交互相连的用于建立连接的数据,完成第一终端和第二终端之间的基于WiFi的连接,包括WiFi P2P连接或WiFi热点连接。而在WiFi连接时,针对扫描到的终端进行数据交互的功耗一般情况下远高于基于蓝牙等低功耗的通信连接交互数据时的功耗。因此,在本发明实施例中,节省了建立WiFi连接的功耗。建立第二连接后的数据传输所产生的功耗则与现有的基于WiFi热点或者WiFi P2P连接传输数据所产生的功耗大体相同。Since the data required to establish the second connection is all exchanged through the first connection with low power consumption, when establishing the second WiFi-based connection, after scanning the terminal that needs to establish the connection based on WiFi, the first connection is directly The connection is based on the data for establishing a connection that is interactively connected according to the scanning result, and completes a WiFi-based connection between the first terminal and the second terminal, including a WiFi P2P connection or a WiFi hotspot connection. In the case of WiFi connection, the power consumption of data interaction for the scanned terminal is generally much higher than the power consumption of data exchange based on low-power communication connection such as Bluetooth. Therefore, in the embodiment of the present invention, the power consumption for establishing the WiFi connection is saved. The power consumption generated by the data transmission after the second connection is established is substantially the same as the power consumption generated by the existing data transmission based on a WiFi hotspot or a WiFi P2P connection.

在本发明实施例中,第二连接的类型至少可以包括WiFi热点的连接类型和WiFiP2P的连接类型。在基于第一连接的交互数据中,可以包括指示第二连接的连接类型的数据。在所述S502中,第二连接策略是根据交互数据的指示,选择连接类型,并进一步基于该选择的连接类型交互数据以建立第二连接。In this embodiment of the present invention, the type of the second connection may include at least a connection type of a WiFi hotspot and a connection type of WiFiP2P. In the interaction data based on the first connection, data indicating the connection type of the second connection may be included. In the S502, the second connection strategy is to select a connection type according to the indication of the interaction data, and further exchange data based on the selected connection type to establish a second connection.

所述第一终端可以在第一终端检测到数据发送指令之前预先执行连接建立步骤,以便于预先建立第一终端和第二终端之间的连接,随时准备第一终端的用户向第二终端发送数据,第二终端需要开启用于执行数据传输处理的系统控件或者打开安装的相应数据传输处理功能的应用,以便于第一终端能够建立第一连接和第二连接。在其他实施例中,所述第一终端也可以是在检测到数据发送指令时,开始建立第一终端和第二终端之间的连接,以便于执行第一终端本次的数据发送指令。The first terminal may perform the connection establishment step in advance before the first terminal detects the data sending instruction, so as to establish the connection between the first terminal and the second terminal in advance, and prepare the user of the first terminal to send the data to the second terminal at any time. data, the second terminal needs to open a system control for executing data transmission processing or open an installed application with a corresponding data transmission processing function, so that the first terminal can establish the first connection and the second connection. In other embodiments, the first terminal may also start to establish a connection between the first terminal and the second terminal when detecting the data sending instruction, so as to execute the current data sending instruction of the first terminal.

在一个实施例中,通过所述第一连接交互的连接数据包括以下数据中的任意一种或多种:需要建立的第二连接的连接类型,所述连接类型包括点对点连接类型或WiFi热点连接类型;建立第二连接所需的客户端信息,所述客户端信息包括:连接点标识和鉴权密码,连接点标识可以为WiFi热点地址、终端MAC地址等;数据包的格式信息;建立第二连接的触发指令,该触发指令触发第一终端或第二终端开始建立第二连接,例如触发第一终端或第二终端开始打开WiFi热点,获取WiFi热点的名称和密码,以便于接入到WiFi热点中。In one embodiment, the connection data interacted through the first connection includes any one or more of the following data: a connection type of the second connection to be established, and the connection type includes a point-to-point connection type or a WiFi hotspot connection type; client information required for establishing the second connection, the client information includes: connection point identification and authentication password, the connection point identification can be WiFi hotspot address, terminal MAC address, etc.; data packet format information; The trigger instruction for the second connection, the trigger instruction triggers the first terminal or the second terminal to start establishing the second connection, for example, triggers the first terminal or the second terminal to start opening the WiFi hotspot, and obtains the name and password of the WiFi hotspot, so as to facilitate access to WiFi hotspot.

S503:第一终端在检测到数据发送指令时,显示包括传输标识的用户界面。所述用户界面可参考图1所示,并且在上述实施例中还包括了关于该用户界面的描述,在此不赘述。该传输标识配置了相应的触发逻辑,用于触发启动相应的执行数据传输处理的系统控件或应用,或者用于直接触发系统控件或应用开始传输数据。S503: When detecting the data sending instruction, the first terminal displays a user interface including a transmission identifier. For the user interface, reference may be made to that shown in FIG. 1 , and the above-mentioned embodiments also include descriptions about the user interface, which will not be repeated here. The transmission identifier is configured with corresponding trigger logic, which is used to trigger and start a corresponding system control or application that executes data transmission processing, or is used to directly trigger the system control or application to start transmitting data.

S504:第一终端在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端。用户通过用户点击操作等选择操作选中该传输标识后,所述系统控件或应用可以通过后台运行的方式最终通过第二连接传输所述待传输数据。S504: When detecting the selection operation on the transmission identifier, the first terminal sends the data to be transmitted to the second terminal through the second connection. After the user selects the transmission identifier through a selection operation such as a user click operation, the system control or application can finally transmit the data to be transmitted through the second connection by running in the background.

在其他实施例中,检测到所述选择操作后,开始执行S501和S502,后台运行第一终端和第二终端之间的第二连接的建立步骤,并执行S504将待传输数据通过第二连接发送给第二终端。In other embodiments, after the selection operation is detected, S501 and S502 are executed, the steps of establishing the second connection between the first terminal and the second terminal are executed in the background, and S504 is executed to pass the data to be transmitted through the second connection. sent to the second terminal.

所述待传输数据的数据传输格式、配置的传输队列、socket队列、以及第二终端对接收到的数据的指定文件夹存储、打开等操作处理均可参考上述实施例中的描述。The data transmission format of the data to be transmitted, the configured transmission queue, the socket queue, and the operation processing of the second terminal for storing and opening the received data in a designated folder can all refer to the descriptions in the above embodiments.

在一个实施例中,预置了第一任务队列和第二任务队列,所述将待传输数据通过第二连接发送给所述第二终端,包括:将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,所述第一任务队列中保存有所述待传输数据;从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端;若检测到通过所述第二连接未能成功发送所述待传输数据,则再次将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,并从所述第二任务队列中获取待传输数据,通过第二连接发送给所述第二终端。所述第一任务队列和第二任务队列与上述实施例中提到的待传输队列和传输队列对应。可以设置三个传输队列来传输所述第二任务队列中的数据。In one embodiment, a first task queue and a second task queue are preset, and the sending the data to be transmitted to the second terminal through the second connection includes: sending the to-be-transmitted data stored in the first task queue to the second terminal. The transmission data is stored in the second task queue, and the data to be transmitted is stored in the first task queue; the data to be transmitted is obtained from the second task queue, and sent to the first task queue through the second connection. Two terminals; if it is detected that the data to be transmitted is not successfully sent through the second connection, the data to be transmitted stored in the first task queue is stored in the second task queue again, and the data to be transmitted is stored in the second task queue from the The data to be transmitted is obtained from the second task queue, and sent to the second terminal through the second connection. The first task queue and the second task queue correspond to the queue to be transmitted and the transmission queue mentioned in the above embodiment. Three transmission queues may be set to transmit data in the second task queue.

在一个实施例中,设置的三个传输队列包括同步消息队列、异步消息队列、异步文件队列。若所述第二任务队列获取的待传输数据包括第一类数据,则将第一类数据转存到预置的同步消息队列中,通过第二连接将同步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第二类数据,则将所述第二了数据转存到预置的异步消息队列中,通过第二连接将异步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第三类数据,则将第三类数据转存到预置的异步文件队列中,通过第二连接将异步文件队列中的数据发送给所述第二终端。所述三个传输队列以及对应类型的数据的描述可参考上述实施例。In one embodiment, the set three transmission queues include a synchronous message queue, an asynchronous message queue, and an asynchronous file queue. If the data to be transmitted acquired by the second task queue includes the first type of data, the first type of data is dumped into a preset synchronous message queue, and the data in the synchronous message queue is sent to the The second terminal; if the data to be transmitted obtained by the second task queue includes the second type of data, the second data is transferred to the preset asynchronous message queue, and the data in the asynchronous message queue is transferred through the second connection. The data is sent to the second terminal; if the data to be transmitted obtained by the second task queue includes the third type of data, the third type of data is transferred to the preset asynchronous file queue, and the asynchronous file is transferred through the second connection. The data in the queue is sent to the second terminal. For the description of the three transmission queues and corresponding types of data, reference may be made to the foregoing embodiments.

在建立终端之间用于进行传输数据的通信连接时,可通过两个能实现不同连接性能的连接方式建立连接,从而满足用户不同的连接需求和数据传输需求,在本发明实施例中,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。When establishing a communication connection between terminals for transmitting data, the connection can be established through two connection modes that can realize different connection performances, so as to meet the different connection requirements and data transmission requirements of users. A connection method such as Bluetooth with low power consumption is used as the first connection, and data is exchanged through the first connection to establish a connection method such as WiFi that can transmit a large amount of data quickly, which not only saves the energy consumption of the terminal, but also satisfies the user requirements. Fast and large-capacity requirements for data transmission.

再请参见图6,是本发明实施例的第一连接建立方法的流程流程示意图,本发明实施例的所述方法可以在智能终端中执行,对应于上述的S501,该智能终端可以是智能手机、平板电脑、智能可穿戴设备等带数据传输功能的终端。特别地,这些智能终端具备蓝牙等低功耗的数据传输功能,并包括WiFi等可以快速传输各种数据的数据传输功能。在本发明实施例中,所述第一终端作为发送端、第二终端作为接收端,两个终端均配置了执行数据传输处理的功能的系统控件或应用程序。本发明实施例的所述方法包括如下步骤。Referring to FIG. 6 again, it is a schematic flowchart of a first connection establishment method according to an embodiment of the present invention. The method in the embodiment of the present invention may be executed in a smart terminal, corresponding to the above S501, and the smart terminal may be a smart phone , tablet computers, smart wearable devices and other terminals with data transmission functions. In particular, these smart terminals have low-power data transmission functions such as Bluetooth, and include data transmission functions such as WiFi that can quickly transmit various data. In this embodiment of the present invention, the first terminal is used as a sending end and the second terminal is used as a receiving end, and both terminals are configured with a system control or an application program that performs a function of data transmission processing. The method of the embodiment of the present invention includes the following steps.

S601:第一终端扫描连接标识。在本发明实施例中,所述连接标识是指终端提供的可以建立蓝牙连接的标识。所述第一终端开启蓝牙扫描模式扫描其他终端广告的蓝牙标识等连接标识。S601: The first terminal scans the connection identifier. In this embodiment of the present invention, the connection identifier refers to an identifier provided by the terminal that can establish a Bluetooth connection. The first terminal turns on the bluetooth scanning mode to scan connection identifiers such as bluetooth identifiers advertised by other terminals.

在本发明实施例中,所述S601可以包括:所述第一终端基于第一连接策略的指示,在第一时间范围内,以第一扫描频率扫描获取连接标识。所述第一终端基于第一连接策略的指示,在第二时间范围内,以第二扫描频率扫描获取连接标识。在其他实施例中,如有必要,可以配置更多的扫描梯度,在不同的时间段以不同的扫描频率进行扫描。一般情况下,需要建立传输数据的终端之间在确定要建立通信连接时,都会快速地打开蓝牙模块以便于建立蓝牙连接,在第一终端开始扫描的前几十秒的时间内,例如10秒的时间范围内,都会扫描到对应的第二终端的蓝牙标识,因此,可以在开始扫描后的第一时间范围内,采用较高的扫描频率扫描第二终端的蓝牙标识,在其他时间范围内则可以降低扫描频率以节省功耗。当然,用户在发现扫描到的连接标识列表中包括了第二终端的蓝牙标识后,可以关闭扫描,进入下一步。In this embodiment of the present invention, the S601 may include: the first terminal scans and acquires a connection identifier at a first scanning frequency within a first time range based on an indication of a first connection policy. The first terminal scans, within a second time range, a connection identifier at a second scanning frequency based on the indication of the first connection policy. In other embodiments, if necessary, more sweep gradients can be configured to sweep at different sweep frequencies at different time periods. Under normal circumstances, when the terminals that need to establish transmission data determine to establish a communication connection, they will quickly turn on the Bluetooth module to facilitate the establishment of the Bluetooth connection. Within the first tens of seconds before the first terminal starts scanning, for example, 10 seconds Within the time range, the Bluetooth logo of the corresponding second terminal will be scanned. Therefore, the Bluetooth logo of the second terminal can be scanned at a higher scanning frequency within the first time range after the scan starts, and the Bluetooth logo of the second terminal can be scanned within other time ranges. The scan frequency can then be reduced to save power. Of course, after finding that the scanned connection identifier list includes the Bluetooth identifier of the second terminal, the user can close the scan and proceed to the next step.

S602:所述第一终端在扫描结束后,从扫描得到的各个连接标识中确定出目标连接标识。所述目标连接标识包括第二终端的连接标识。在执行S601的扫描处理后,可以将扫描得到的所有连接标识显示在一个列表中提示给用户,由用户选择出一个或者多个作为目标连接标识,所选中的目标连接标识都可以分别作为第二终端的连接标识,分别发起对各个第二终端的连接处理。S602: After the scanning ends, the first terminal determines a target connection identifier from each connection identifier obtained by scanning. The target connection identifier includes the connection identifier of the second terminal. After the scanning process of S601 is performed, all the connection identifiers obtained by scanning can be displayed in a list to prompt the user, and the user can select one or more as the target connection identifiers, and the selected target connection identifiers can be respectively used as the second connection identifiers. The connection identifier of the terminal respectively initiates connection processing to each second terminal.

在一个实施例中,当扫描到多个连接标识时,可以将选择的多个等待与所述第一终端连接的终端的连接标识记录到预置的连接队列中;分别将所述连接队列中每一个终端的连接标识作为第二终端的连接标识,以便于分别建立与所述连接队列中每个终端之间的第一连接。该连接队列主要用于记录用户选中的目标连接标识,以便于后续依次建立与这些目标连接标识所对应终端的连接,避免在建立了与一个终端之间的连接后还需要用户选中下一个目标连接标识的情况。In one embodiment, when multiple connection identifiers are scanned, the connection identifiers of the selected multiple terminals waiting to be connected to the first terminal may be recorded in a preset connection queue; The connection identifier of each terminal is used as the connection identifier of the second terminal, so as to establish a first connection with each terminal in the connection queue respectively. The connection queue is mainly used to record the target connection identifiers selected by the user, so as to facilitate the subsequent establishment of connections with the terminals corresponding to these target connection identifiers, and avoid the need for the user to select the next target connection after the connection with one terminal is established. identified situation.

S603:第一终端基于所述目标连接标识建立与第二终端之间的第一连接。第一终端在得到了第二终端的蓝牙标识后,即可建立与所述第二终端之间的蓝牙连接(第一连接)。在建立第一连接的过程中,有可能存在异常情况,异常处理方式可参考上述实施例中的描述。这些异常情况可能导致第一连接建立失败,如果第一连接建立失败,则执行下述的S603。如果与连接队列中某个目标连接标识的第一连接成功,则继续针对所述连接队列中下一个目标连接标识建立与另一个第二终端之间的第一连接。S603: The first terminal establishes a first connection with the second terminal based on the target connection identifier. After the first terminal obtains the Bluetooth identifier of the second terminal, it can establish a Bluetooth connection (first connection) with the second terminal. During the process of establishing the first connection, there may be an abnormal situation, and reference may be made to the description in the above embodiment for the abnormal handling method. These abnormal conditions may cause the failure to establish the first connection. If the establishment of the first connection fails, the following S603 is performed. If the first connection with a certain target connection identifier in the connection queue is successful, continue to establish a first connection with another second terminal for the next target connection identifier in the connection queue.

S604:如果建立第一连接失败,所述第一终端按照预设的重建策略执行连接重建处理,以便于完成与所述第二终端之间的第一连接。其中,所述第一终端确定建立第一连接失败包括:所述第一终端没有扫描确定出第二终端的连接标识,即没有确定目标连接标识。S604: If the establishment of the first connection fails, the first terminal performs connection re-establishment processing according to a preset re-establishment policy, so as to complete the first connection with the second terminal. The determining by the first terminal that the establishment of the first connection fails includes: the first terminal fails to scan and determine the connection identifier of the second terminal, that is, the target connection identifier is not determined.

所述第一终端按照预设的重建策略执行连接重建处理包括:所述第一终端基于延时扫描规则再次扫描连接标识以确定出第二终端的连接标识,或所述第一终端关闭第一连接功能,并在预设的时长范围内重启已关闭的第一连接功能。The first terminal performing the connection re-establishment process according to the preset re-establishment policy includes: the first terminal scans the connection identifier again based on the delayed scanning rule to determine the connection identifier of the second terminal, or the first terminal closes the first terminal. connection function, and restart the closed first connection function within a preset time period.

在一个实施例中,若所述连接队列中存在建立第一连接失败的第三终端,所述第一终端按照重建策略重新建立与所述第三终端之间的连接;在一个实施例中,所述第一终端按照重建策略重新建立与所述第三终端之间的连接,包括:所述第一终端关闭第一连接功能后,重启第一连接功能;所述第一终端基于第一连接功能若重新扫描到所述第三终端的连接标识,则建立与所述第三终端的连接;所述第一终端若未能重新扫描到所述第三终端的连接标识,将所述第三终端的连接标识记录到预置的重试队列中。第一终端在完成了其他队其他连接标识所对应的终端的连接后,会再次针对重试队列中的连接标识进行扫描以及重连的步骤,直至满足结束条件,满足结束条件例如可以包括针对某一个连接标识的重连超过了次数阈值(例如三次),或者用户手动停止或者关闭蓝牙等第一连接的扫描等。In one embodiment, if there is a third terminal that fails to establish the first connection in the connection queue, the first terminal re-establishes the connection with the third terminal according to the reestablishment policy; in one embodiment, The first terminal re-establishing the connection with the third terminal according to the reestablishment policy includes: after the first terminal closes the first connection function, restarting the first connection function; the first terminal is based on the first connection If the connection identifier of the third terminal is rescanned, the function will establish a connection with the third terminal; if the first terminal fails to rescan the connection identifier of the third terminal, the third terminal will be rescanned. The connection ID of the terminal is recorded in the preset retry queue. After the first terminal has completed the connection of the terminals corresponding to other connection identifiers of other teams, it will scan and reconnect the connection identifiers in the retry queue again until the end condition is satisfied. The reconnection of a connection identifier exceeds the threshold of times (for example, three times), or the user manually stops or closes the scanning of the first connection such as Bluetooth, and so on.

在建立终端之间用于进行传输数据的通信连接时,可通过两个能实现不同连接性能的连接方式建立连接,从而满足用户不同的连接需求和数据传输需求,在本发明实施例中,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。When establishing a communication connection between terminals for transmitting data, the connection can be established through two connection modes that can realize different connection performances, so as to meet the different connection requirements and data transmission requirements of users. A connection method such as Bluetooth with low power consumption is used as the first connection, and data is exchanged through the first connection to establish a connection method such as WiFi that can transmit a large amount of data quickly, which not only saves the energy consumption of the terminal, but also satisfies the user requirements. Fast and large-capacity requirements for data transmission.

下面对本发明实施例的数据传输装置及智能终端进行详细描述。The data transmission device and the intelligent terminal according to the embodiments of the present invention are described in detail below.

请参见图7,是本发明实施例的一种数据传输装置的结构示意图,本发明实施例的所述数据传输装置可以设置在智能终端中,本发明实施例的所述装置可以设置在对应的第一终端中。所述装置包括如下模块。Please refer to FIG. 7 , which is a schematic structural diagram of a data transmission device according to an embodiment of the present invention. The data transmission device in the embodiment of the present invention may be set in a smart terminal, and the device in the embodiment of the present invention may be set in a corresponding in the first terminal. The device includes the following modules.

显示模块701,用于在检测到数据发送指令时,显示包括传输标识的用户界面;传输模块702,用于在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端;连接模块703,用于基于第一连接策略建立第一终端与第二终端之间的第一连接,并通过所述第一连接交互连接数据,根据第二连接策略和交互的连接数据建立所述第一终端和第二终端之间的第二连接。The display module 701 is used to display the user interface including the transmission identifier when the data sending instruction is detected; the transmission module 702 is used to send the data to be transmitted through the second connection when the selection operation of the transmission identifier is detected to the second terminal; the connection module 703 is configured to establish a first connection between the first terminal and the second terminal based on the first connection strategy, and exchange connection data through the first connection, according to the second connection strategy and The exchanged connection data establishes a second connection between the first terminal and the second terminal.

在一个实施例中,所述连接模块703,用于基于第一连接策略的指示,在第一时间范围内,以第一扫描频率扫描获取连接标识;基于第一连接策略的指示,在第二时间范围内,以第二扫描频率扫描获取连接标识;在扫描结束后,从扫描得到的各个连接标识中确定出目标连接标识,并基于所述目标连接标识建立与第二终端之间的第一连接,所述目标连接标识为所述第二终端的连接标识。In one embodiment, the connection module 703 is configured to scan, within a first time range, a connection identifier at a first scanning frequency based on the indication of the first connection strategy; based on the indication of the first connection strategy, in the second Within the time range, scan with the second scanning frequency to obtain the connection identification; after the scanning ends, determine the target connection identification from each of the scanned connection identifications, and establish a first connection with the second terminal based on the target connection identification. connection, and the target connection identifier is the connection identifier of the second terminal.

在一个实施例中,所述连接模块703,用于基于第一连接策略的指示,在第一时间范围内,以第一广播频率广播本终端的连接标识;基于第一连接策略的指示,在第二时间范围内,以第二广播频率广播本终端的连接标识;在广播结束、且接收到第二终端的连接请求后,建立与所述第二终端之间的第一连接,所述连接请求是所述第二终端基于扫描到的所述第一终端广播的连接标识发出的。In one embodiment, the connection module 703 is configured to broadcast the connection identifier of the terminal at the first broadcast frequency within the first time range based on the indication of the first connection policy; based on the indication of the first connection policy, in the Within the second time range, broadcast the connection identifier of the terminal at the second broadcast frequency; after the broadcast ends and the connection request from the second terminal is received, a first connection with the second terminal is established, and the connection is The request is sent by the second terminal based on the scanned connection identifier broadcast by the first terminal.

在一个实施例中,所述连接模块703,还用于如果建立第一连接失败,按照预设的重建策略执行连接重建处理,以便于完成与所述第二终端之间的第一连接;其中,确定建立第一连接失败包括:没有扫描确定出第二终端的连接标识,或广播连接标识后没有接收到第二终端的连接请求。In one embodiment, the connection module 703 is further configured to perform connection re-establishment processing according to a preset re-establishment strategy if the establishment of the first connection fails, so as to complete the first connection with the second terminal; wherein , determining that the establishment of the first connection fails includes: the connection identifier of the second terminal is not determined by scanning, or the connection request of the second terminal is not received after broadcasting the connection identifier.

在一个实施例中,所述连接模块703,用于基于延时扫描规则再次扫描连接标识以确定出第二终端的连接标识;或者,用于基于延时广播规则广播本端连接标识以便于第二终端发送连接请求;或者,用于关闭第一连接功能,并在预设的时长范围内重启已关闭的第一连接功能。In one embodiment, the connection module 703 is configured to scan the connection identifier again based on the delayed scanning rule to determine the connection identifier of the second terminal; The second terminal sends a connection request; or, it is used to close the first connection function, and restart the closed first connection function within a preset time period.

在一个实施例中,通过所述第一连接交互的连接数据包括以下数据中的任意一种或多种:需要建立的第二连接的连接类型,所述连接类型包括基于WiFi点对点P2P连接类型或WiFi热点连接类型;建立第二连接所需的客户端信息,所述客户端信息包括:连接点标识和鉴权密码;数据包的格式信息;建立第二连接的触发指令。In one embodiment, the connection data exchanged through the first connection includes any one or more of the following data: a connection type of the second connection to be established, the connection type includes a WiFi-based peer-to-peer P2P connection type or WiFi hotspot connection type; client information required for establishing the second connection, the client information includes: connection point identification and authentication password; format information of the data packet; and a trigger instruction for establishing the second connection.

在一个实施例中,所述连接模块703,用于将选择的多个等待与所述第一终端连接的终端的连接标识记录到预置的连接队列中;分别将所述连接队列中每一个终端的连接标识作为第二终端的连接标识,以便于分别建立与所述连接队列中每个终端之间的第一连接。In one embodiment, the connection module 703 is configured to record the connection identifiers of the selected multiple terminals waiting to be connected to the first terminal into a preset connection queue; respectively record the connection identifiers of each terminal in the connection queue The connection identifier of the terminal is used as the connection identifier of the second terminal, so as to establish a first connection with each terminal in the connection queue respectively.

在一个实施例中,所述连接模块703,用于若所述连接队列中存在建立第一连接失败的第三终端,按照重建策略重新建立与所述第三终端之间的连接;In one embodiment, the connection module 703 is configured to re-establish a connection with the third terminal according to a reestablishment policy if there is a third terminal in the connection queue that fails to establish the first connection;

其中,所述连接模块703,用于关闭第一连接功能后,重启第一连接功能;基于第一连接功能若重新扫描到所述第三终端的连接标识,则建立与所述第三终端的连接;若未能重新扫描到所述第三终端的连接标识,将所述第三终端的连接标识记录到预置的重试队列中。The connection module 703 is configured to restart the first connection function after closing the first connection function; if the connection identifier of the third terminal is rescanned based on the first connection function, establish a connection with the third terminal. connection; if the connection identifier of the third terminal cannot be rescanned, the connection identifier of the third terminal is recorded in a preset retry queue.

在一个实施例中,所述连接模块703,用于从用于建立第二连接的连接点标识中选择出由所述第一连接交互的连接点标识;通过所述第一连接与所述连接点标识所对应的第二终端交互连接信息,建立所述第一终端和第二终端之间的第二连接。In one embodiment, the connection module 703 is configured to select a connection point identifier interacted by the first connection from the connection point identifiers used for establishing the second connection; The second terminal corresponding to the point identifier exchanges connection information to establish a second connection between the first terminal and the second terminal.

在一个实施例中,预置有第一任务队列和第二任务队列,所述传输模块702,用于将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,所述第一任务队列中保存有所述待传输数据;从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端;若检测到通过所述第二连接未能成功发送所述待传输数据,则再次将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,并从所述第二任务队列中获取待传输数据,通过第二连接发送给所述第二终端。In one embodiment, a first task queue and a second task queue are preset, and the transmission module 702 is configured to store the data to be transmitted stored in the first task queue into the second task queue, The data to be transmitted is stored in the first task queue; the data to be transmitted is obtained from the second task queue, and sent to the second terminal through the second connection; if it is detected that the data to be transmitted through the second connection is detected If the data to be transmitted is not sent successfully, the data to be transmitted stored in the first task queue is stored in the second task queue again, and the data to be transmitted is obtained from the second task queue, and the The second connection is sent to the second terminal.

在一个实施例中,所述传输模块702,用于若所述第二任务队列获取的待传输数据包括第一类数据,则将第一类数据转存到预置的同步消息队列中,通过第二连接将同步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第二类数据,则将所述第二了数据转存到预置的异步消息队列中,通过第二连接将异步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第三类数据,则将第三类数据转存到预置的异步文件队列中,通过第二连接将异步文件队列中的数据发送给所述第二终端。In one embodiment, the transmission module 702 is configured to, if the data to be transmitted acquired by the second task queue includes the first type of data, transfer the first type of data to a preset synchronous message queue, and use the The second connection sends the data in the synchronous message queue to the second terminal; if the data to be transmitted obtained by the second task queue includes the second type of data, the second data is transferred to the preset asynchronous In the message queue, the data in the asynchronous message queue is sent to the second terminal through the second connection; if the data to be transmitted obtained by the second task queue includes the third type of data, the third type of data is transferred to the pre-processor. The data in the asynchronous file queue is sent to the second terminal through the second connection.

本发明实施例所述装置的各个模块的具体实现可参考图1至图6所对应实施例中相关内容的描述,在此不赘述。For the specific implementation of each module of the apparatus according to the embodiment of the present invention, reference may be made to the description of the related content in the embodiments corresponding to FIG. 1 to FIG. 6 , which will not be repeated here.

在建立终端之间用于进行传输数据的通信连接时,可通过两个能实现不同连接性能的连接方式建立连接,从而满足用户不同的连接需求和数据传输需求,在本发明实施例中,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。When establishing a communication connection between terminals for transmitting data, the connection can be established through two connection modes that can realize different connection performances, so as to meet the different connection requirements and data transmission requirements of users. A connection method such as Bluetooth with low power consumption is used as the first connection, and data is exchanged through the first connection to establish a connection method such as WiFi that can transmit a large amount of data quickly, which not only saves the energy consumption of the terminal, but also satisfies the user requirements. Fast and large-capacity requirements for data transmission.

再请参见图8,是本发明实施例的一种智能终端的结构示意图,本发明实施例所述的智能终端例如可以是智能手机、平板电脑、智能可穿戴设备等带蓝牙通信功能和WiFi通信功能的终端。所述智能终端包括电源模块、各种壳体等结构,还包括处理器801、用户接口802、存储器803、第一通信接口804以及第二通信接口805。Please refer to FIG. 8 again, which is a schematic structural diagram of a smart terminal according to an embodiment of the present invention. The smart terminal described in the embodiment of the present invention may be, for example, a smart phone, a tablet computer, a smart wearable device, etc. with a Bluetooth communication function and WiFi communication. functional terminal. The intelligent terminal includes a power module, various casings and other structures, and further includes a processor 801 , a user interface 802 , a memory 803 , a first communication interface 804 and a second communication interface 805 .

所述用户接口802可以为触摸屏、按键等,基于用户接口802完成用户与智能终端之间的交互,用户接口802可以用于向用户程序数据、信息,也能够接收用户的诸如触屏选择、语音输入等数据。在本发明实施例中,第一通信接口804在被使用时所消耗的电能低于所述第二通信接口805运行时所消耗的电能。所述第一通信接口804可以为蓝牙等低功耗的通信接口,所述第二通信接口805可以为基于WiFi模块的接口。The user interface 802 can be a touch screen, buttons, etc., based on the user interface 802 to complete the interaction between the user and the smart terminal, the user interface 802 can be used to program data and information to the user, and can also receive user information such as touch screen selection, voice Enter data etc. In this embodiment of the present invention, the power consumed by the first communication interface 804 when being used is lower than the power consumed by the second communication interface 805 when it is running. The first communication interface 804 may be a low-power communication interface such as Bluetooth, and the second communication interface 805 may be an interface based on a WiFi module.

所述存储器803可以包括易失性存储器(volatile memory),例如RAM(random-access memory,随机存取存储器);存储器803也可以包括非易失性存储器(non-volatilememory),例如快闪存储器(flash memory),硬盘或固态硬盘;存储器803还可以包括上述种类的存储器的组合。The memory 803 may include a volatile memory (volatile memory), such as RAM (random-access memory, random access memory); the memory 803 may also include a non-volatile memory (non-volatile memory), such as a flash memory ( flash memory), hard disk or solid-state disk; the memory 803 may also include a combination of the above-mentioned types of memory.

所述处理器801可以是CPU(central processing unit,中央处理器)。所述处理器801还可以进一步包括硬件芯片。可以是ASIC(application-specific integratedcircuit,专用集成电路),PLD(programmable logic device,可编程逻辑器件)或其组合。上述PLD可以是CPLD(complex programmable logic device,复杂可编程逻辑器件),FPGA(field-programmable gate array,现场可编程逻辑门阵列)或其任意组合。The processor 801 may be a CPU (central processing unit, central processing unit). The processor 801 may further include a hardware chip. It can be an ASIC (application-specific integrated circuit, application-specific integrated circuit), a PLD (programmable logic device, programmable logic device) or a combination thereof. The above-mentioned PLD may be a CPLD (complex programmable logic device, complex programmable logic device), FPGA (field-programmable gate array, field programmable logic gate array) or any combination thereof.

可选地,所述存储器803还用于存储程序指令。所述处理器801可以调用所述程序指令,实现本发明实施例的数据传输方法。Optionally, the memory 803 is further used to store program instructions. The processor 801 may invoke the program instructions to implement the data transmission method of the embodiment of the present invention.

在本发明实施例中,所述处理器801,调用所述存储器803中存储的程序,用于调用第一通信接口804建立与第二终端之间的第一连接,并通过所述第一连接交互连接数据,调用第二通信接口805根据第二连接策略和交互的连接数据建立所述第一终端和第二终端之间的第二连接;所述处理器801,还用于在检测到数据发送指令时,显示包括传输标识的用户界面,在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端。In this embodiment of the present invention, the processor 801 calls a program stored in the memory 803 to call the first communication interface 804 to establish a first connection with the second terminal, and use the first connection to establish a first connection with the second terminal. exchange connection data, call the second communication interface 805 to establish a second connection between the first terminal and the second terminal according to the second connection strategy and the exchanged connection data; the processor 801 is further configured to detect the data When an instruction is sent, a user interface including a transmission identifier is displayed, and when a selection operation on the transmission identifier is detected, the data to be transmitted is sent to the second terminal through the second connection.

在一个实施例中,所述处理器801,在用于基于第一连接策略建立与第二终端之间的第一连接时,用于基于第一连接策略的指示,在第一时间范围内,以第一扫描频率扫描获取连接标识;基于第一连接策略的指示,在第二时间范围内,以第二扫描频率扫描获取连接标识;在扫描结束后,从扫描得到的各个连接标识中确定出目标连接标识,并基于所述目标连接标识建立与第二终端之间的第一连接,所述目标连接标识为所述第二终端的连接标识。In one embodiment, when the processor 801 is configured to establish the first connection with the second terminal based on the first connection policy, based on the indication of the first connection policy, within the first time range, Scanning at the first scanning frequency to obtain the connection identification; based on the indication of the first connection strategy, within the second time range, scanning at the second scanning frequency to obtain the connection identification; after the scanning is completed, determine from each connection identification obtained by scanning A target connection identifier is established, and a first connection with the second terminal is established based on the target connection identifier, where the target connection identifier is the connection identifier of the second terminal.

在一个实施例中,所述处理器801,在用于基于第一连接策略建立与第二终端之间的第一连接时,用于基于第一连接策略的指示,在第一时间范围内,以第一广播频率广播本终端的连接标识;基于第一连接策略的指示,在第二时间范围内,以第二广播频率广播本终端的连接标识;在广播结束、且接收到第二终端的连接请求后,建立与所述第二终端之间的第一连接,所述连接请求是所述第二终端基于扫描到的所述第一终端广播的连接标识发出的。In one embodiment, when the processor 801 is configured to establish the first connection with the second terminal based on the first connection policy, based on the indication of the first connection policy, within the first time range, Broadcast the connection identification of the terminal with the first broadcast frequency; broadcast the connection identification of the terminal with the second broadcast frequency within the second time range based on the indication of the first connection policy; After a connection request is made, a first connection with the second terminal is established, and the connection request is sent by the second terminal based on the scanned connection identifier broadcasted by the first terminal.

在一个实施例中,所述处理器801,还用于如果建立第一连接失败,所述第一终端按照预设的重建策略执行连接重建处理,以便于完成与所述第二终端之间的第一连接;其中,所述第一终端确定建立第一连接失败包括:所述第一终端没有扫描确定出第二终端的连接标识,或所述第一终端广播连接标识后没有接收到第二终端的连接请求。In one embodiment, the processor 801 is further configured to, if the establishment of the first connection fails, the first terminal to perform connection re-establishment processing according to a preset re-establishment policy, so as to complete the connection between the first terminal and the second terminal. The first connection; wherein, the first terminal determining that the establishment of the first connection fails includes: the first terminal does not scan to determine the connection identifier of the second terminal, or the first terminal does not receive the second terminal after broadcasting the connection identifier. Terminal connection request.

在一个实施例中,所述处理器801,在用于按照预设的重建策略执行连接重建处理时,用于基于延时扫描规则再次扫描连接标识以确定出第二终端的连接标识;或者基于延时广播规则广播本端连接标识以便于第二终端发送连接请求;或者关闭第一连接功能,并在预设的时长范围内重启已关闭的第一连接功能。In one embodiment, when the processor 801 is configured to perform connection re-establishment processing according to a preset re-establishment policy, the processor 801 is configured to scan the connection identifier again based on the delayed scanning rule to determine the connection identifier of the second terminal; or The delayed broadcast rule broadcasts the local connection identifier to facilitate the second terminal to send a connection request; or closes the first connection function, and restarts the closed first connection function within a preset time period.

在一个实施例中,通过所述第一连接交互的连接数据包括以下数据中的任意一种或多种:需要建立的第二连接的连接类型,所述连接类型包括基于WiFi点对点P2P连接类型或WiFi热点连接类型;建立第二连接所需的客户端信息,所述客户端信息包括:连接点标识和鉴权密码;数据包的格式信息;建立第二连接的触发指令。In one embodiment, the connection data exchanged through the first connection includes any one or more of the following data: a connection type of the second connection to be established, the connection type includes a WiFi-based peer-to-peer P2P connection type or WiFi hotspot connection type; client information required for establishing the second connection, the client information includes: connection point identification and authentication password; format information of the data packet; and a trigger instruction for establishing the second connection.

在一个实施例中,所述处理器801,在用于基于第一连接策略建立与第二终端之间的第一连接时,用于将选择的多个等待与所述第一终端连接的终端的连接标识记录到预置的连接队列中;分别将所述连接队列中每一个终端的连接标识作为第二终端的连接标识,以便于分别建立与所述连接队列中每个终端之间的第一连接。In one embodiment, when the processor 801 is configured to establish the first connection with the second terminal based on the first connection policy, the processor 801 is configured to select a plurality of terminals waiting to be connected to the first terminal The connection identifier is recorded in the preset connection queue; the connection identifier of each terminal in the connection queue is used as the connection identifier of the second terminal, so as to establish the first connection with each terminal in the connection queue. a connection.

在一个实施例中,所述处理器801,在用于基于第一连接策略建立与第二终端之间的第一连接时,还用于若所述连接队列中存在建立第一连接失败的第三终端,所述第一终端按照重建策略重新建立与所述第三终端之间的连接;In one embodiment, when the processor 801 is configured to establish the first connection with the second terminal based on the first connection policy, if there is a first connection in the connection queue that fails to establish the first connection Three terminals, the first terminal re-establishes the connection with the third terminal according to the reestablishment policy;

其中,所述处理器801用于所述第一终端关闭第一连接功能后,重启第一连接功能;基于第一连接功能若重新扫描到所述第三终端的连接标识,则建立与所述第三终端的连接;若未能重新扫描到所述第三终端的连接标识,将所述第三终端的连接标识记录到预置的重试队列中。The processor 801 is configured to restart the first connection function after the first terminal closes the first connection function; based on the first connection function, if the connection identifier of the third terminal is rescanned, establish a connection with the third terminal. The connection of the third terminal; if the connection identifier of the third terminal cannot be rescanned, the connection identifier of the third terminal is recorded in a preset retry queue.

在一个实施例中,所述处理器801,在用于根据第二连接策略和交互的连接数据建立所述第一终端和第二终端之间的第二连接时,用于从用于建立第二连接的连接点标识中选择出由所述第一连接交互的连接点标识;通过所述第一连接与所述连接点标识所对应的第二终端交互连接信息,建立所述第一终端和第二终端之间的第二连接。In one embodiment, when the processor 801 is configured to establish the second connection between the first terminal and the second terminal according to the second connection policy and the interaction data From the connection point identifiers of the two connections, the connection point identifier that is interacted by the first connection is selected; the connection information is exchanged between the first connection and the second terminal corresponding to the connection point identifier to establish the first terminal and the connection point identifier. A second connection between the second terminals.

在一个实施例中,预置有第一任务队列和第二任务队列,所述处理器801,在用于将待传输数据通过第二连接发送给所述第二终端时,用于将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,所述第一任务队列中保存有所述待传输数据;从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端;若检测到通过所述第二连接未能成功发送所述待传输数据,再次将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,并从所述第二任务队列中获取待传输数据,通过第二连接发送给所述第二终端。In one embodiment, a first task queue and a second task queue are preset, and when the processor 801 is configured to send the data to be transmitted to the second terminal through the second connection, the processor 801 is configured to send the data to be transmitted to the second terminal. The data to be transmitted stored in the first task queue is stored in the second task queue, and the data to be transmitted is stored in the first task queue; the data to be transmitted is obtained from the second task queue, and passed The second connection is sent to the second terminal; if it is detected that the data to be transmitted is not successfully sent through the second connection, the data to be transmitted stored in the first task queue is stored in the second terminal again. In the task queue, the data to be transmitted is obtained from the second task queue, and sent to the second terminal through the second connection.

在一个实施例中,所述处理器801,在用于从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端时,用于若所述第二任务队列获取的待传输数据包括第一类数据,所述第一终端将第一类数据转存到预置的同步消息队列中,通过第二连接将同步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第二类数据,所述第一终端将所述第二了数据转存到预置的异步消息队列中,通过第二连接将异步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第三类数据,所述第一终端将第三类数据转存到预置的异步文件队列中,通过第二连接将异步文件队列中的数据发送给所述第二终端。In one embodiment, when the processor 801 is configured to acquire the data to be transmitted from the second task queue and send it to the second terminal through the second connection, the processor 801 is configured to: The data to be transmitted obtained by the queue includes the first type of data, the first terminal dumps the first type of data into a preset synchronous message queue, and sends the data in the synchronous message queue to the second type through the second connection terminal; if the data to be transmitted obtained by the second task queue includes the second type of data, the first terminal transfers the second data to the preset asynchronous message queue, and sends the asynchronous message queue through the second connection The data in the file is sent to the second terminal; if the data to be transmitted obtained by the second task queue includes the third type of data, the first terminal transfers the third type of data to the preset asynchronous file queue, through The second connection sends the data in the asynchronous file queue to the second terminal.

本发明实施例所述智能终端的各个结构模块的具体实现可参考图1至图6所对应实施例中相关内容的描述,在此不赘述。For the specific implementation of each structural module of the smart terminal according to the embodiment of the present invention, reference may be made to the description of the relevant content in the embodiments corresponding to FIG. 1 to FIG. 6 , and details are not described here.

在建立终端之间用于进行传输数据的通信连接时,可通过两个能实现不同连接性能的连接方式建立连接,从而满足用户不同的连接需求和数据传输需求,在本发明实施例中,可以采用功耗低的蓝牙等连接方式作为第一连接,而通过第一连接来交互数据从而建立能够较快速传输大数据量的数据的WiFi等连接方式,既节省了终端能耗,又能满足用户对数据传输的快捷及大容量的要求。When establishing a communication connection between terminals for transmitting data, the connection can be established through two connection modes that can realize different connection performances, so as to meet the different connection requirements and data transmission requirements of users. A connection method such as Bluetooth with low power consumption is used as the first connection, and data is exchanged through the first connection to establish a connection method such as WiFi that can transmit a large amount of data quickly, which not only saves the energy consumption of the terminal, but also satisfies the user requirements. Fast and large-capacity requirements for data transmission.

Claims (23)

1.一种数据传输方法,其特征在于,包括:1. a data transmission method, is characterized in that, comprises: 第一终端在检测到数据发送指令时,显示包括传输标识的用户界面;When the first terminal detects the data sending instruction, it displays a user interface including the transmission identifier; 第一终端在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给第二终端;When the first terminal detects the selection operation on the transmission identifier, it sends the data to be transmitted to the second terminal through the second connection; 其中,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,并通过所述第一连接交互连接数据,根据第二连接策略和所述第一连接对应的所述连接数据建立所述第一终端和第二终端之间的第二连接,所述第一连接交互的连接数据包括所述第一连接通道中传输携带的底层连接信息,所述底层连接信息包括所述第二连接的连接类型;Wherein, the first terminal establishes a first connection with the second terminal based on a first connection policy, and exchanges connection data through the first connection, according to the second connection policy and the first connection corresponding to the first connection The connection data establishes a second connection between the first terminal and the second terminal, and the connection data exchanged by the first connection includes the underlying connection information carried in the transmission in the first connection channel, and the underlying connection information includes all the connection type of the second connection; 所述待传输数据发送包括:指令传输创建三个socket队列,所述三个socket队列分别包括同步消息队列、异步消息队列以及异步文件队列,所述三个socket队列的连接使用同一队列,且不限定加入队的时间与传输时间对应,所述同步消息队列用于传输需要同步的信息和文件,且先发送的数据先送达,后发送的后送达,所述异步消息队列用于保证异步消息也能及时送达所述第二终端,所述异步为相对于上一个同步队列的异步,所述异步消息队列保持着先后关系,所述异步消息队列为双向传输且支持连接双方的状态信息和指令交互。The sending of the data to be transmitted includes: instructing transmission to create three socket queues, the three socket queues respectively include a synchronous message queue, an asynchronous message queue and an asynchronous file queue, and the connection of the three socket queues uses the same queue, and does not use the same queue. The time for joining the team is limited to correspond to the transmission time. The synchronous message queue is used to transmit information and files that need to be synchronized, and the data sent first is delivered first, and the data sent later is delivered. The asynchronous message queue is used to ensure asynchronous The message can also be delivered to the second terminal in time, the asynchronous is the asynchronous relative to the previous synchronous queue, the asynchronous message queue maintains a sequential relationship, the asynchronous message queue is bidirectional transmission and supports the status information of both parties in the connection interact with commands. 2.如权利要求1所述的方法,其特征在于,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,包括:2. The method of claim 1, wherein the first terminal establishes a first connection with the second terminal based on a first connection policy, comprising: 所述第一终端基于第一连接策略的指示,在第一时间范围内,以第一扫描频率扫描获取连接标识;The first terminal scans, within a first time range, a connection identifier at a first scanning frequency based on the indication of the first connection policy; 所述第一终端基于第一连接策略的指示,在第二时间范围内,以第二扫描频率扫描获取连接标识;The first terminal scans, within a second time range, a connection identifier at a second scanning frequency based on the indication of the first connection policy; 所述第一终端在扫描结束后,从扫描得到的各个连接标识中确定出目标连接标识,并基于所述目标连接标识建立与第二终端之间的第一连接,所述目标连接标识为所述第二终端的连接标识。After the scanning ends, the first terminal determines a target connection identifier from each connection identifier obtained by scanning, and establishes a first connection with the second terminal based on the target connection identifier, where the target connection identifier is the target connection identifier. the connection identifier of the second terminal. 3.如权利要求1所述的方法,其特征在于,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,包括:3. The method of claim 1, wherein the first terminal establishes a first connection with the second terminal based on a first connection policy, comprising: 所述第一终端基于第一连接策略的指示,在第一时间范围内,以第一广播频率广播本终端的连接标识;The first terminal broadcasts the connection identifier of the terminal at the first broadcast frequency within the first time range based on the indication of the first connection policy; 所述第一终端基于第一连接策略的指示,在第二时间范围内,以第二广播频率广播本终端的连接标识;The first terminal broadcasts the connection identifier of the terminal at the second broadcast frequency within the second time range based on the indication of the first connection policy; 所述第一终端在广播结束、且接收到第二终端的连接请求后,建立与所述第二终端之间的第一连接,所述连接请求是所述第二终端基于扫描到的所述第一终端广播的连接标识发出的。After the broadcast ends and the first terminal receives a connection request from the second terminal, the first terminal establishes a first connection with the second terminal, and the connection request is based on the scanned It is sent by the connection identifier broadcasted by the first terminal. 4.如权利要求2或3所述的方法,其特征在于,还包括:4. The method of claim 2 or 3, further comprising: 如果建立第一连接失败,所述第一终端按照预设的重建策略执行连接重建处理,以便于完成与所述第二终端之间的第一连接;If the establishment of the first connection fails, the first terminal performs connection re-establishment processing according to a preset re-establishment policy, so as to complete the first connection with the second terminal; 其中,所述第一终端确定建立第一连接失败包括:所述第一终端没有扫描确定出第二终端的连接标识,或所述第一终端广播连接标识后没有接收到第二终端的连接请求。The determining by the first terminal that the establishment of the first connection fails includes: the first terminal fails to scan and determine the connection identifier of the second terminal, or the first terminal does not receive a connection request from the second terminal after broadcasting the connection identifier . 5.如权利要求4所述的方法,其特征在于,所述第一终端按照预设的重建策略执行连接重建处理包括以下步骤的任意一种:5. The method according to claim 4, wherein the connection re-establishment process performed by the first terminal according to a preset re-establishment strategy comprises any one of the following steps: 所述第一终端基于延时扫描规则再次扫描连接标识以确定出第二终端的连接标识;The first terminal scans the connection identifier again based on the delayed scanning rule to determine the connection identifier of the second terminal; 所述第一终端基于延时广播规则广播本端连接标识以便于第二终端发送连接请求;The first terminal broadcasts the local connection identifier based on the delayed broadcast rule, so that the second terminal can send a connection request; 所述第一终端关闭第一连接功能,并在预设的时长范围内重启已关闭的第一连接功能。The first terminal closes the first connection function, and restarts the closed first connection function within a preset time period. 6.如权利要求1所述的方法,其特征在于,通过所述第一连接交互的连接数据包括以下数据中的任意一种或多种:6. The method of claim 1, wherein the connection data interacted through the first connection comprises any one or more of the following data: 需要建立的第二连接的连接类型,所述连接类型包括基于WiFi点对点P2P连接类型或WiFi热点连接类型;建立第二连接所需的客户端信息,所述客户端信息包括:连接点标识和鉴权密码;数据包的格式信息;建立第二连接的触发指令。The connection type of the second connection to be established, the connection type includes a WiFi-based point-to-point P2P connection type or a WiFi hotspot connection type; client information required for establishing the second connection, the client information includes: connection point identification and authentication password; format information of the data packet; trigger instruction to establish the second connection. 7.如权利要求1所述的方法,其特征在于,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,包括:7. The method of claim 1, wherein the first terminal establishes a first connection with the second terminal based on a first connection policy, comprising: 将选择的多个等待与所述第一终端连接的终端的连接标识记录到预置的连接队列中;Recording the connection identifiers of the selected multiple terminals waiting to be connected to the first terminal into a preset connection queue; 分别将所述连接队列中每一个终端的连接标识作为第二终端的连接标识,以便于分别建立与所述连接队列中每个终端之间的第一连接。The connection identifier of each terminal in the connection queue is respectively used as the connection identifier of the second terminal, so as to establish a first connection with each terminal in the connection queue respectively. 8.如权利要求7所述的方法,其特征在于,所述第一终端基于第一连接策略建立与第二终端之间的第一连接,还包括:8. The method of claim 7, wherein the first terminal establishes a first connection with the second terminal based on a first connection policy, further comprising: 若所述连接队列中存在建立第一连接失败的第三终端,所述第一终端按照重建策略重新建立与所述第三终端之间的连接;If there is a third terminal in the connection queue that fails to establish the first connection, the first terminal re-establishes the connection with the third terminal according to the reestablishment policy; 其中,所述第一终端按照重建策略重新建立与所述第三终端之间的连接,包括:Wherein, the first terminal re-establishes the connection with the third terminal according to the re-establishment policy, including: 所述第一终端关闭第一连接功能后,重启第一连接功能;After the first terminal closes the first connection function, restarts the first connection function; 所述第一终端基于第一连接功能若重新扫描到所述第三终端的连接标识,则建立与所述第三终端的连接;If the first terminal rescans the connection identifier of the third terminal based on the first connection function, then establishes a connection with the third terminal; 所述第一终端若未能重新扫描到所述第三终端的连接标识,将所述第三终端的连接标识记录到预置的重试队列中。If the first terminal fails to rescan the connection identifier of the third terminal, the connection identifier of the third terminal is recorded in a preset retry queue. 9.如权利要求1所述的方法,其特征在于,所述第一终端根据第二连接策略和交互的连接数据建立所述第一终端和第二终端之间的第二连接,包括:9. The method of claim 1, wherein the first terminal establishes a second connection between the first terminal and the second terminal according to a second connection policy and the exchanged connection data, comprising: 所述第一终端从用于建立第二连接的连接点标识中选择出由所述第一连接交互的连接点标识;selecting, by the first terminal, a connection point identifier that is interacted by the first connection from the connection point identifiers used to establish the second connection; 所述第一终端通过所述第一连接与所述连接点标识所对应的第二终端交互连接信息,建立所述第一终端和第二终端之间的第二连接。The first terminal exchanges connection information with the second terminal corresponding to the connection point identifier through the first connection to establish a second connection between the first terminal and the second terminal. 10.如权利要求1所述的方法,其特征在于,预置有第一任务队列和第二任务队列,所述第一终端将待传输数据通过第二连接发送给所述第二终端,包括:10. The method of claim 1, wherein a first task queue and a second task queue are preset, and the first terminal sends data to be transmitted to the second terminal through a second connection, comprising: : 所述第一终端将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,所述第一任务队列中保存有所述待传输数据;The first terminal stores the data to be transmitted stored in the first task queue in the second task queue, where the data to be transmitted is stored in the first task queue; 所述第一终端从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端;The first terminal obtains the data to be transmitted from the second task queue, and sends it to the second terminal through the second connection; 若检测到通过所述第二连接未能成功发送所述待传输数据,所述第一终端再次将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,并从所述第二任务队列中获取待传输数据,通过第二连接发送给所述第二终端。If it is detected that the to-be-transmitted data is not successfully sent through the second connection, the first terminal stores the to-be-transmitted data stored in the first task queue into the second task queue again, and stores the data to be transmitted from the first task queue again. The data to be transmitted is obtained from the second task queue and sent to the second terminal through the second connection. 11.如权利要求10所述的方法,其特征在于,所述第一终端从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端,包括:11. The method of claim 10, wherein the first terminal obtains the data to be transmitted from the second task queue, and sends it to the second terminal through a second connection, comprising: 若所述第二任务队列获取的待传输数据包括第一类数据,所述第一终端将第一类数据转存到预置的同步消息队列中,通过第二连接将同步消息队列中的数据发送给所述第二终端;If the data to be transmitted acquired by the second task queue includes the first type of data, the first terminal dumps the first type of data into a preset synchronization message queue, and transfers the data in the synchronization message queue through the second connection sent to the second terminal; 若所述第二任务队列获取待传输数据包括第二类数据,所述第一终端将所述第二类数据转存到预置的异步消息队列中,通过第二连接将异步消息队列中的数据发送给所述第二终端;If the data to be transmitted obtained by the second task queue includes the second type of data, the first terminal dumps the second type of data into the preset asynchronous message queue, and sends the data in the asynchronous message queue through the second connection. sending data to the second terminal; 若所述第二任务队列获取待传输数据包括第三类数据,所述第一终端将第三类数据转存到预置的异步文件队列中,通过第二连接将异步文件队列中的数据发送给所述第二终端。If the data to be transmitted obtained by the second task queue includes the third type of data, the first terminal transfers the third type of data to the preset asynchronous file queue, and sends the data in the asynchronous file queue through the second connection to the second terminal. 12.一种数据传输装置,其特征在于,包括:12. A data transmission device, comprising: 显示模块,用于在检测到数据发送指令时,显示包括传输标识的用户界面;a display module, used for displaying a user interface including a transmission identifier when a data sending instruction is detected; 传输模块,用于在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给第二终端;a transmission module, configured to send the data to be transmitted to the second terminal through the second connection when the selection operation on the transmission identifier is detected; 连接模块,用于基于第一连接策略建立第一终端与第二终端之间的第一连接,并通过所述第一连接交互连接数据,根据第二连接策略和所述第一连接对应的所述连接数据建立所述第一终端和第二终端之间的第二连接,所述第一连接交互的连接数据包括所述第一连接通道中传输携带的底层连接信息,所述底层连接信息包括所述第二连接的连接类型;The connection module is configured to establish a first connection between the first terminal and the second terminal based on the first connection strategy, and exchange connection data through the first connection, according to the second connection strategy and the first connection corresponding to the first connection. The connection data establishes a second connection between the first terminal and the second terminal, the connection data exchanged by the first connection includes the underlying connection information carried in the transmission in the first connection channel, and the underlying connection information includes the connection type of the second connection; 所述待传输数据发送包括:指令传输创建三个socket队列,所述三个socket队列分别包括同步消息队列、异步消息队列以及异步文件队列,所述三个socket队列的连接使用同一队列,且不限定加入队的时间与传输时间对应,所述同步消息队列用于传输需要同步的信息和文件,且先发送的数据先送达,后发送的后送达,所述异步消息队列用于保证异步消息也能及时送达所述第二终端,所述异步为相对于上一个同步队列的异步,所述异步消息队列保持着先后关系,所述异步消息队列为双向传输且支持连接双方的状态信息和指令交互。The sending of the data to be transmitted includes: instructing transmission to create three socket queues, the three socket queues respectively include a synchronous message queue, an asynchronous message queue and an asynchronous file queue, and the connection of the three socket queues uses the same queue, and does not use the same queue. The time for joining the team is limited to correspond to the transmission time. The synchronous message queue is used to transmit information and files that need to be synchronized, and the data sent first is delivered first, and the data sent later is delivered. The asynchronous message queue is used to ensure asynchronous The message can also be delivered to the second terminal in time, the asynchronous is the asynchronous relative to the previous synchronous queue, the asynchronous message queue maintains a sequential relationship, the asynchronous message queue is bidirectional transmission and supports the status information of both parties in the connection interact with commands. 13.如权利要求12所述的装置,其特征在于,13. The apparatus of claim 12, wherein 所述连接模块,用于基于第一连接策略的指示,在第一时间范围内,以第一扫描频率扫描获取连接标识;基于第一连接策略的指示,在第二时间范围内,以第二扫描频率扫描获取连接标识;在扫描结束后,从扫描得到的各个连接标识中确定出目标连接标识,并基于所述目标连接标识建立与第二终端之间的第一连接,所述目标连接标识为所述第二终端的连接标识。The connection module is configured to scan at a first scanning frequency to obtain a connection identifier within a first time range based on the indication of the first connection strategy; The scanning frequency scans to obtain the connection identifier; after the scanning is completed, the target connection identifier is determined from the respective connection identifiers obtained by scanning, and the first connection with the second terminal is established based on the target connection identifier, and the target connection identifier is is the connection identifier of the second terminal. 14.如权利要求12所述的装置,其特征在于,14. The apparatus of claim 12, wherein 所述连接模块,用于基于第一连接策略的指示,在第一时间范围内,以第一广播频率广播本终端的连接标识;基于第一连接策略的指示,在第二时间范围内,以第二广播频率广播本终端的连接标识;在广播结束、且接收到第二终端的连接请求后,建立与所述第二终端之间的第一连接,所述连接请求是所述第二终端基于扫描到的所述第一终端广播的连接标识发出的。The connection module is configured to broadcast the connection identification of the terminal at the first broadcast frequency within the first time range based on the indication of the first connection policy; based on the indication of the first connection policy, within the second time range, use the The second broadcast frequency broadcasts the connection identifier of the terminal; after the broadcast ends and a connection request from the second terminal is received, a first connection is established with the second terminal, and the connection request is for the second terminal Sent based on the scanned connection identifier broadcasted by the first terminal. 15.如权利要求13或14所述的装置,其特征在于,还包括:15. The apparatus of claim 13 or 14, further comprising: 所述连接模块,还用于如果建立第一连接失败,按照预设的重建策略执行连接重建处理,以便于完成与所述第二终端之间的第一连接;其中,确定建立第一连接失败包括:没有扫描确定出第二终端的连接标识,或广播连接标识后没有接收到第二终端的连接请求。The connection module is further configured to perform connection re-establishment processing according to a preset re-establishment strategy if the establishment of the first connection fails, so as to facilitate the completion of the first connection with the second terminal; wherein, it is determined that establishment of the first connection fails It includes: the connection identifier of the second terminal is not determined by scanning, or the connection request of the second terminal is not received after broadcasting the connection identifier. 16.如权利要求15所述的装置,其特征在于,16. The apparatus of claim 15, wherein 所述连接模块,用于基于延时扫描规则再次扫描连接标识以确定出第二终端的连接标识;或者,用于基于延时广播规则广播本端连接标识以便于第二终端发送连接请求;或者,用于关闭第一连接功能,并在预设的时长范围内重启已关闭的第一连接功能。The connection module is configured to scan the connection identifier again based on the delayed scanning rule to determine the connection identifier of the second terminal; or, be used to broadcast the local connection identifier based on the delayed broadcast rule to facilitate the second terminal to send a connection request; or , which is used to close the first connection function and restart the closed first connection function within a preset time period. 17.如权利要求12所述的装置,其特征在于,通过所述第一连接交互的连接数据包括以下数据中的任意一种或多种:17. The apparatus of claim 12, wherein the connection data interacted through the first connection comprises any one or more of the following data: 需要建立的第二连接的连接类型,所述连接类型包括基于WiFi点对点P2P连接类型或WiFi热点连接类型;建立第二连接所需的客户端信息,所述客户端信息包括:连接点标识和鉴权密码;数据包的格式信息;建立第二连接的触发指令。The connection type of the second connection to be established, the connection type includes a WiFi-based point-to-point P2P connection type or a WiFi hotspot connection type; client information required for establishing the second connection, the client information includes: connection point identification and authentication password; format information of the data packet; trigger instruction to establish the second connection. 18.如权利要求12所述的装置,其特征在于,18. The apparatus of claim 12, wherein 所述连接模块,用于将选择的多个等待与所述第一终端连接的终端的连接标识记录到预置的连接队列中;分别将所述连接队列中每一个终端的连接标识作为第二终端的连接标识,以便于分别建立与所述连接队列中每个终端之间的第一连接。The connection module is configured to record the connection identifiers of the selected multiple terminals waiting to be connected to the first terminal into a preset connection queue; respectively use the connection identifier of each terminal in the connection queue as the second connection identifier. The connection identifier of the terminal, so as to establish the first connection with each terminal in the connection queue respectively. 19.如权利要求18所述的装置,其特征在于,19. The apparatus of claim 18, wherein 所述连接模块,用于若所述连接队列中存在建立第一连接失败的第三终端,按照重建策略重新建立与所述第三终端之间的连接;The connection module is configured to re-establish a connection with the third terminal according to a reestablishment policy if there is a third terminal that fails to establish the first connection in the connection queue; 其中,所述连接模块,用于在关闭第一连接功能后,重启第一连接功能;基于第一连接功能若重新扫描到所述第三终端的连接标识,则建立与所述第三终端的连接;若未能重新扫描到所述第三终端的连接标识,将所述第三终端的连接标识记录到预置的重试队列中。The connection module is configured to restart the first connection function after closing the first connection function; if the connection identifier of the third terminal is rescanned based on the first connection function, establish a connection with the third terminal connection; if the connection identifier of the third terminal cannot be rescanned, the connection identifier of the third terminal is recorded in a preset retry queue. 20.如权利要求12所述的装置,其特征在于,20. The apparatus of claim 12, wherein 所述连接模块,用于从用于建立第二连接的连接点标识中选择出由所述第一连接交互的连接点标识;通过所述第一连接与所述连接点标识所对应的第二终端交互连接信息,建立所述第一终端和第二终端之间的第二连接。The connection module is configured to select a connection point identifier interacted by the first connection from the connection point identifiers used to establish the second connection; the second connection point corresponding to the connection point identifier through the first connection The terminals exchange connection information to establish a second connection between the first terminal and the second terminal. 21.如权利要求12所述的装置,其特征在于,预置有第一任务队列和第二任务队列,所述传输模块,用于将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,所述第一任务队列中保存有所述待传输数据;从所述第二任务队列中获取待传输数据,并通过第二连接发送给所述第二终端;若检测到通过所述第二连接未能成功发送所述待传输数据,则再次将所述第一任务队列中存储的待传输数据存储到所述第二任务队列中,并从所述第二任务队列中获取待传输数据,通过第二连接发送给所述第二终端。21. The device according to claim 12, wherein a first task queue and a second task queue are preset, and the transmission module is configured to store the data to be transmitted stored in the first task queue to a In the second task queue, the data to be transmitted is stored in the first task queue; the data to be transmitted is obtained from the second task queue, and sent to the second terminal through the second connection; if If it is detected that the data to be transmitted is not successfully sent through the second connection, the data to be transmitted stored in the first task queue is stored in the second task queue again, and the data to be transmitted is stored in the second task queue again. The data to be transmitted is obtained from the queue and sent to the second terminal through the second connection. 22.如权利要求21所述的装置,其特征在于,22. The apparatus of claim 21, wherein 所述传输模块,用于若所述第二任务队列获取的待传输数据包括第一类数据,则将第一类数据转存到预置的同步消息队列中,通过第二连接将同步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第二类数据,则将所述第二类数据转存到预置的异步消息队列中,通过第二连接将异步消息队列中的数据发送给所述第二终端;若所述第二任务队列获取待传输数据包括第三类数据,则将第三类数据转存到预置的异步文件队列中,通过第二连接将异步文件队列中的数据发送给所述第二终端。The transmission module is configured to, if the data to be transmitted obtained by the second task queue includes the first type of data, transfer the first type of data to the preset synchronization message queue, and send the synchronization message queue through the second connection. If the data to be transmitted obtained by the second task queue includes the second type of data, the second type of data is transferred to the preset asynchronous message queue, and the second type of data is transferred through the second The connection sends the data in the asynchronous message queue to the second terminal; if the data to be transmitted obtained by the second task queue includes the third type of data, the third type of data is transferred to the preset asynchronous file queue, The data in the asynchronous file queue is sent to the second terminal through the second connection. 23.一种智能终端,其特征在于,包括处理器,第一通信接口、第二通信接口,其中:23. An intelligent terminal, characterized by comprising a processor, a first communication interface, and a second communication interface, wherein: 所述处理器,用于调用第一通信接口建立与第二终端之间的第一连接,并通过所述第一连接交互连接数据,调用第二通信接口根据第二连接策略和所述第一连接对应的所述连接数据建立所述智能终端和第二终端之间的第二连接,所述第一连接交互的连接数据包括所述第一连接通道中传输携带的底层连接信息,所述底层连接信息包括所述第二连接的连接类型;The processor is configured to call the first communication interface to establish a first connection with the second terminal, exchange connection data through the first connection, and call the second communication interface according to the second connection policy and the first connection. The connection data corresponding to the connection establishes a second connection between the intelligent terminal and the second terminal, and the connection data exchanged by the first connection includes the underlying connection information carried in the transmission in the first connection channel. the connection information includes the connection type of the second connection; 所述处理器,还用于在检测到数据发送指令时,显示包括传输标识的用户界面,在检测到对所述传输标识的选择操作时,将待传输数据通过第二连接发送给所述第二终端;The processor is further configured to display a user interface including a transmission identifier when detecting a data sending instruction, and when detecting a selection operation on the transmission identifier, send the data to be transmitted to the first through the second connection. two terminals; 所述待传输数据发送包括:指令传输创建三个socket队列,所述三个socket队列分别包括同步消息队列、异步消息队列以及异步文件队列,所述三个socket队列的连接使用同一队列,且不限定加入队的时间与传输时间对应,所述同步消息队列用于传输需要同步的信息和文件,且先发送的数据先送达,后发送的后送达,所述异步消息队列用于保证异步消息也能及时送达所述第二终端,所述异步为相对于上一个同步队列的异步,所述异步消息队列保持着先后关系,所述异步消息队列为双向传输且支持连接双方的状态信息和指令交互。The sending of the data to be transmitted includes: instructing transmission to create three socket queues, the three socket queues respectively include a synchronous message queue, an asynchronous message queue and an asynchronous file queue, and the connection of the three socket queues uses the same queue, and does not use the same queue. The time for joining the team is limited to correspond to the transmission time. The synchronous message queue is used to transmit information and files that need to be synchronized, and the data sent first is delivered first, and the data sent later is delivered. The asynchronous message queue is used to ensure asynchronous The message can also be delivered to the second terminal in time, the asynchronous is the asynchronous relative to the previous synchronous queue, the asynchronous message queue maintains a sequential relationship, the asynchronous message queue is bidirectional transmission and supports the status information of both parties in the connection interact with commands.
CN201710132669.XA 2017-03-07 2017-03-07 A data transmission method, device and intelligent terminal Expired - Fee Related CN107018554B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201710132669.XA CN107018554B (en) 2017-03-07 2017-03-07 A data transmission method, device and intelligent terminal
PCT/CN2018/078001 WO2018161870A1 (en) 2017-03-07 2018-03-05 Data transmission method and apparatus and smart terminal
MYPI2019003058A MY203977A (en) 2017-03-07 2018-03-05 Data transmission method and apparatus and smart terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710132669.XA CN107018554B (en) 2017-03-07 2017-03-07 A data transmission method, device and intelligent terminal

Publications (2)

Publication Number Publication Date
CN107018554A CN107018554A (en) 2017-08-04
CN107018554B true CN107018554B (en) 2020-11-06

Family

ID=59440377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710132669.XA Expired - Fee Related CN107018554B (en) 2017-03-07 2017-03-07 A data transmission method, device and intelligent terminal

Country Status (3)

Country Link
CN (1) CN107018554B (en)
MY (1) MY203977A (en)
WO (1) WO2018161870A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12048039B2 (en) 2022-08-26 2024-07-23 Htc Corporation Electronic system, control method and non- transitory computer readable storage medium

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107018554B (en) * 2017-03-07 2020-11-06 Oppo广东移动通信有限公司 A data transmission method, device and intelligent terminal
CN109428915B (en) * 2017-08-25 2021-06-29 北京国双科技有限公司 Data acquisition method and device
CN108429751A (en) * 2018-03-15 2018-08-21 广州优视网络科技有限公司 File transfer control method, device and computer readable storage medium, terminal
CN110505712A (en) * 2018-05-17 2019-11-26 华为技术有限公司 A method and terminal for transferring files
CN111448825B (en) * 2018-06-13 2021-06-15 华为技术有限公司 A transmission control method and device
CN109150596B (en) * 2018-08-08 2021-08-03 新智能源系统控制有限责任公司 SCADA system real-time data dump method and device
CN109474848B (en) * 2018-09-14 2021-10-19 视联动力信息技术股份有限公司 Video processing method and device based on video network, electronic equipment and medium
CN109587667B (en) * 2018-11-23 2021-06-18 Oppo广东移动通信有限公司 A connection establishment method and device, device, and storage medium
CN109660973A (en) * 2018-12-28 2019-04-19 努比亚技术有限公司 Bluetooth control method, mobile terminal and storage medium
CN111867148B (en) * 2019-04-30 2024-08-06 青岛海信移动通信技术有限公司 Method and device for establishing device connection and data transmission
CN110072295B (en) * 2019-04-30 2022-08-09 西安商鼎能源科技有限公司 Dual-channel communication method, device, first terminal and medium
CN111866824B (en) * 2019-04-30 2025-01-24 青岛海信移动通信技术有限公司 A method and device for establishing communication connection and data transmission
CN112469014A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and electronic equipment for configuring Bluetooth connection parameters
CN111050415B (en) * 2019-12-23 2021-12-17 精诚工坊电子集成技术(北京)有限公司 Wireless data transmission method convenient to operate
CN111416889B (en) * 2020-01-16 2022-03-04 重庆大学 Communication method and system adapted through GATT and exception handling
WO2021179315A1 (en) * 2020-03-13 2021-09-16 深圳市大疆创新科技有限公司 Video live streaming method and system, and computer storage medium
CN111510349A (en) * 2020-04-09 2020-08-07 上海东普信息科技有限公司 Method, device, equipment and storage medium for service abnormity detection and alarm
CN111770491B (en) * 2020-06-08 2024-01-02 上海依图网络科技有限公司 Data link establishment method and device
CN114554619A (en) * 2020-11-24 2022-05-27 博泰车联网(南京)有限公司 Method and system for establishing point-to-point connection, storage medium and electronic equipment
CN112492520A (en) * 2020-12-15 2021-03-12 北京百度网讯科技有限公司 Positioning method, device, equipment and storage medium
CN113660311A (en) * 2021-07-21 2021-11-16 广州心娱网络科技有限公司 A method, system, electronic device and storage medium for updating user status
CN115776584A (en) * 2021-09-08 2023-03-10 Vidaa(荷兰)国际控股有限公司 Display device, terminal and interaction method of configuration information of terminal
CN115776582A (en) * 2021-09-08 2023-03-10 Vidaa(荷兰)国际控股有限公司 Display device and interaction method of configuration information thereof
CN117581624A (en) * 2022-04-28 2024-02-20 北京小米移动软件有限公司 Data communication method, device, electronic equipment and data communication system
CN116055581B (en) * 2022-11-23 2024-12-03 广东博力威科技股份有限公司 Data transmission control method, device, equipment and storage medium
WO2025050252A1 (en) * 2023-09-04 2025-03-13 Oppo广东移动通信有限公司 Connection negotiation methods and apparatuses, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015069031A1 (en) * 2013-11-06 2015-05-14 엘지전자(주) Method and apparatus for forming communication link using bluetooth
CN104935641A (en) * 2015-05-07 2015-09-23 广东欧珀移动通信有限公司 Method and device for accelerating file transfer
CN105472038A (en) * 2016-01-07 2016-04-06 腾讯科技(深圳)有限公司 Control method, control apparatus and control system for file transmission
CN106028261A (en) * 2016-04-29 2016-10-12 高翔 Wireless connection method, device and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8880663B2 (en) * 2010-09-27 2014-11-04 Nokia Corporation Method and apparatus for sharing user information
CN103974187A (en) * 2014-05-27 2014-08-06 深圳市中兴移动通信有限公司 Near-distance file transmission method and device as well as mobile terminal
CN104394600B (en) * 2014-10-24 2018-03-16 小米科技有限责任公司 Transmit the method and device of file
CN106028421A (en) * 2016-05-24 2016-10-12 上海斐讯数据通信技术有限公司 Wireless equipment connection method
CN107018554B (en) * 2017-03-07 2020-11-06 Oppo广东移动通信有限公司 A data transmission method, device and intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015069031A1 (en) * 2013-11-06 2015-05-14 엘지전자(주) Method and apparatus for forming communication link using bluetooth
CN104935641A (en) * 2015-05-07 2015-09-23 广东欧珀移动通信有限公司 Method and device for accelerating file transfer
CN105472038A (en) * 2016-01-07 2016-04-06 腾讯科技(深圳)有限公司 Control method, control apparatus and control system for file transmission
CN106028261A (en) * 2016-04-29 2016-10-12 高翔 Wireless connection method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12048039B2 (en) 2022-08-26 2024-07-23 Htc Corporation Electronic system, control method and non- transitory computer readable storage medium
TWI873557B (en) * 2022-08-26 2025-02-21 宏達國際電子股份有限公司 Electronic system, control method and non-transitory computer readable storage medium

Also Published As

Publication number Publication date
MY203977A (en) 2024-07-26
CN107018554A (en) 2017-08-04
WO2018161870A1 (en) 2018-09-13

Similar Documents

Publication Publication Date Title
CN107018554B (en) A data transmission method, device and intelligent terminal
JP6101861B2 (en) Group creation method, group withdrawal method, apparatus, program, and recording medium
JP6272552B2 (en) Device binding method, apparatus, program, and recording medium
US9451383B2 (en) Method and apparatus for maintaining one or more communication sessions
US9740515B2 (en) Exception handling method, apparatus, and client
US20160295457A1 (en) Method and apparatus for transmitting data in network system, and data transmission system
WO2015062512A1 (en) Content sharing method and apparatus
EP2715528A2 (en) Establishing connections among electronic devices
US11523146B2 (en) Live broadcast method and apparatus, electronic device, and storage medium
CN113014972B (en) Screen projection method, device and system
JP7328900B2 (en) FILE TRANSMISSION METHOD, APPARATUS, AND COMPUTER-READABLE STORAGE MEDIUM
US20090111375A1 (en) Automatic wireless photo upload for camera phone
EP2605460A1 (en) Method, apparatus, and system for transferring file to user of instant message system
CN105898181A (en) Video conversation system and method and related equipment
US9325898B2 (en) Communication apparatus and method for controlling the same
CN104158908B (en) Method and system based on WiFi equipment transmission file
CN106713127B (en) Method and device for acquiring and processing instant chat records
US20150092764A1 (en) Communication apparatus, data processing apparatus, control method thereof, and recording medium
WO2024017113A1 (en) Data synchronization method and apparatus, and electronic device
US12273586B2 (en) Multimedia apparatus and cast method
WO2015089790A1 (en) Service processing method, apparatus, and system
WO2013167069A2 (en) Method, system and central device for achieving service handover
WO2024027745A1 (en) Network connection method, electronic device, readable storage medium, and chip
JP2017142693A (en) Information processing system, information processing apparatus, information processing method, and information processing program
WO2014180436A1 (en) Inter-terminal communication method, and terminal

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

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201106

CF01 Termination of patent right due to non-payment of annual fee