CN115022872B - Data transmission method, electronic equipment and readable storage medium - Google Patents
Data transmission method, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN115022872B CN115022872B CN202111308878.8A CN202111308878A CN115022872B CN 115022872 B CN115022872 B CN 115022872B CN 202111308878 A CN202111308878 A CN 202111308878A CN 115022872 B CN115022872 B CN 115022872B
- Authority
- CN
- China
- Prior art keywords
- channel
- electronic device
- module
- frequency band
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 189
- 230000005540 biological transmission Effects 0.000 title claims abstract description 135
- 230000004044 response Effects 0.000 claims description 140
- 230000008569 process Effects 0.000 claims description 82
- 230000015654 memory Effects 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 13
- 238000010367 cloning Methods 0.000 description 55
- 238000004891 communication Methods 0.000 description 51
- 230000006854 communication Effects 0.000 description 51
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 description 28
- 230000006870 function Effects 0.000 description 27
- 230000004913 activation Effects 0.000 description 21
- 238000007726 management method Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 16
- 238000010295 mobile communication Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 10
- 238000012546 transfer Methods 0.000 description 8
- 238000012216 screening Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000009434 installation Methods 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 239000002674 ointment Substances 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
- H04W12/068—Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/0268—Traffic management, e.g. flow control or congestion control using specific QoS parameters for wireless networks, e.g. QoS class identifier [QCI] or guaranteed bit rate [GBR]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing 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)
Abstract
Description
技术领域technical field
本申请涉及终端领域,尤其涉及一种数据传输的方法及电子设备、可读存储介质。The present application relates to the field of terminals, in particular to a data transmission method, electronic equipment, and a readable storage medium.
背景技术Background technique
用户换机时,经常需要将旧设备中的信息导入到新设备。现有的一种方式是,通过新设备上的克隆应用(application,App)建立数据传输通道,将旧设备上的数据备份到新设备,以达到便捷换机的目的。When a user changes a device, it is often necessary to import information from the old device to the new device. One existing method is to establish a data transmission channel through a cloning application (application, App) on the new device, and back up the data on the old device to the new device, so as to achieve the purpose of convenient replacement.
然而,当旧设备中的待导出数据较多时,数据传输花费的时间较长、效率较低,导致用户体验不佳。However, when there is a lot of data to be exported in the old device, data transmission takes a long time and is inefficient, resulting in poor user experience.
发明内容Contents of the invention
本申请提供了一种数据传输的方法及电子设备、可读存储介质,该方法通过电子设备在无法获取对端设备支持的目标频段信道时,在该电子设备自己支持的目标频段信道中选择一个信道尝试与对端建立Wi-Fi连接,解决双方在目标频段信道上建立Wi-Fi连接的概率太低的问题。The present application provides a data transmission method, an electronic device, and a readable storage medium. In the method, when the electronic device cannot obtain the target frequency band channel supported by the peer device, one of the target frequency band channels supported by the electronic device itself is selected. The channel tries to establish a Wi-Fi connection with the opposite end to solve the problem that the probability of both parties establishing a Wi-Fi connection on the target frequency band channel is too low.
第一方面,提供了一种数据传输的方法,应用于第一电子设备,所述第一电子设备支持第一目标频段能力,所述方法包括:获取第二电子设备的第一信道列表,所述第一信道列表用于指示所述第二电子设备支持的所述第一目标频段信道;当所述第一信道列表和第二信道列表的交集为空时,在第一信道上开启第一目标频段无线保真Wi-Fi热点,所述第二信道列表用于指示所述第一电子设备支持的所述第一目标频段信道,所述第一信道为所述第一电子设备支持的所述第一目标频段信道中的一个信道;当在预设时长内获取所述第二电子设备经由所述第一信道发送的Wi-Fi连接请求消息时,与所述第二电子设备在所述第一信道上建立Wi-Fi连接,所述Wi-Fi连接请求消息包括所述Wi-Fi热点的服务集标识SSID和对应的密码,并且所述Wi-Fi连接请求消息为所述第二电子设备在自身支持的所述第一目标频段信道发送的轮询消息;接收所述第二电子设备经由所述第一信道发送的数据。In a first aspect, a data transmission method is provided, which is applied to a first electronic device, and the first electronic device supports the capability of the first target frequency band, and the method includes: obtaining a first channel list of the second electronic device, the The first channel list is used to indicate the first target frequency band channel supported by the second electronic device; when the intersection of the first channel list and the second channel list is empty, start the first channel on the first channel A target frequency band wireless fidelity Wi-Fi hotspot, the second channel list is used to indicate the first target frequency band channel supported by the first electronic device, and the first channel is the first channel supported by the first electronic device one of the channels in the first target frequency band; when the Wi-Fi connection request message sent by the second electronic device via the first channel is obtained within a preset time period, communicate with the second electronic device in the A Wi-Fi connection is established on the first channel, the Wi-Fi connection request message includes the service set identifier SSID and the corresponding password of the Wi-Fi hotspot, and the Wi-Fi connection request message is the second electronic A polling message sent by the device on the first target frequency band channel supported by itself; receiving data sent by the second electronic device through the first channel.
在一种实现方式中,第一目标频段信道可以是5G信道,本申请实施例中的5G信道是指在5G频段上的Wi-Fi信道。In an implementation manner, the first target frequency band channel may be a 5G channel, and the 5G channel in this embodiment of the present application refers to a Wi-Fi channel on a 5G frequency band.
在一种实现方式中,第一电子设备可以是换机克隆场景下的数据接收设备,第二电子设备可以换机克隆场景下的数据发送设备。In an implementation manner, the first electronic device may be a data receiving device in a scenario of phone replacement and cloning, and the second electronic device may be a data sending device in a scenario of phone replacement and cloning.
在一种实现方式中,第一信道列表是指第二电子设备支持的第一目标频段信道集合;第二信道列表是指第一电子设备支持的第一目标频段信道集合。第一信道列表和第二信道列表交集为空是指,第一电子设备和第二电子设备不存在共同支持的第一目标频段信道,也即第一电子设备和第二电子设备共同支持的第一目标频段信道集合为空。In an implementation manner, the first channel list refers to a first target frequency band channel set supported by the second electronic device; the second channel list refers to the first target frequency band channel set supported by the first electronic device. The intersection of the first channel list and the second channel list is empty means that there is no first target frequency band channel supported by the first electronic device and the second electronic device, that is, the first target frequency band channel supported by the first electronic device and the second electronic device. A target band channel set is empty.
应理解,本申请实施例中导致第一信道列表和第二信道列表的交集为空的原因例如可以是:第二电子设备未成功查询到自身支持的第一目标频段信道。It should be understood that in this embodiment of the present application, the reason why the intersection of the first channel list and the second channel list is empty may be, for example, that the second electronic device fails to query the channel of the first target frequency band supported by itself.
根据本实现方式提供的数据传输的方法,通过在接收设备和发送设备支持的目标频段信道交集为空集时,接收设备选择自身支持的目标频段信道尝试与发送设备建立连接,尝试连接成功时,双方则在目标频段信道上进行克隆数据传输,能够提高克隆数据传输的效率,提升用户的使用体验。According to the data transmission method provided by this implementation mode, when the intersection of the target frequency band channels supported by the receiving device and the sending device is an empty set, the receiving device selects the target frequency band channel supported by itself and tries to establish a connection with the sending device. When the attempted connection is successful, The two parties perform clone data transmission on the target frequency band channel, which can improve the efficiency of clone data transmission and improve user experience.
结合第一方面,在第一方面的任一实现方式中,所述方法还包括:当在预设时长内未接收到所述第二电子设备经由所述第一信道发送的所述Wi-Fi连接请求消息时,与所述第二电子设备在第二信道上建立Wi-Fi连接,所述第二信道为所述第一电子设备和所述第二电子设备共同支持的某一个第二目标频段信道。With reference to the first aspect, in any implementation manner of the first aspect, the method further includes: when the Wi-Fi connection sent by the second electronic device via the first channel is not received within a preset period of time. When receiving a connection request message, establish a Wi-Fi connection with the second electronic device on a second channel, and the second channel is a second target supported by both the first electronic device and the second electronic device band channel.
在一种实现方式中,第二目标频段信道可以指2.4G信道,本申请实施例中的2.4G信道是指在2.4G频段上的Wi-Fi信道。In an implementation manner, the channel of the second target frequency band may refer to a 2.4G channel, and the 2.4G channel in this embodiment of the present application refers to a Wi-Fi channel on a 2.4G frequency band.
应理解,第一电子设备和第二电子设备具有共同支持的第二目标频段,因此,当第一电子设备和第二电子设备在第一目标频段上建立Wi-Fi连接时,第一电子设备可以切换开启第二目标频段Wi-Fi热点,并与第二电子设备在第一目标频段信道中的第二信道上建立Wi-Fi连接。It should be understood that the first electronic device and the second electronic device have a common supported second target frequency band, therefore, when the first electronic device and the second electronic device establish a Wi-Fi connection on the first target frequency band, the first electronic device The Wi-Fi hotspot of the second target frequency band can be switched on, and a Wi-Fi connection can be established with the second electronic device on the second channel in the first target frequency band.
根据本实现方式提供的数据传输的方法,若在预设时长内未接收到第二电子设备发送的Wi-Fi连接请求消息,则第一电子设备可以切换为第二目标频段Wi-Fi热点,该第二目标频段可以是2.4G频段,之后,第一电子设备和第二电子设备可以在双方支持的第二目标频段上进行数据传输,通过该方法,能够在5G信道尝试Wi-Fi连接失败时,双方在2.4G信道上传输数据,从而保证数据传输的顺利进行。According to the data transmission method provided by this implementation, if the Wi-Fi connection request message sent by the second electronic device is not received within the preset time period, the first electronic device can switch to the second target frequency band Wi-Fi hotspot, The second target frequency band may be the 2.4G frequency band. Afterwards, the first electronic device and the second electronic device may perform data transmission on the second target frequency band supported by both parties. Through this method, it is possible to fail to attempt a Wi-Fi connection on a 5G channel. , the two parties transmit data on the 2.4G channel to ensure the smooth progress of data transmission.
结合第一方面,在第一方面的任一实现方式中,所述当所述第一信道列表和第二信道列表的交集为空时,在第一信道上开启第一目标频段Wi-Fi热点,具体包括:当所述第一信道列表和第二信道列表的交集为空时,向所述第二电子设备发送能力查询信息,所述能力查询信息用于查询所述第二电子设备是否支持所述第一目标频段;接收所述第二电子设备发送的能力响应信息,所述能力响应信息用于指示所述第二电子设备支持所述第一目标频段;在所述第一信道上开启所述第一目标频段Wi-Fi热点。In conjunction with the first aspect, in any implementation of the first aspect, when the intersection of the first channel list and the second channel list is empty, enable the first target frequency band Wi-Fi hotspot on the first channel , specifically includes: when the intersection of the first channel list and the second channel list is empty, sending capability query information to the second electronic device, where the capability query information is used to query whether the second electronic device supports The first target frequency band; receive capability response information sent by the second electronic device, where the capability response information is used to indicate that the second electronic device supports the first target frequency band; enable on the first channel The first target frequency band Wi-Fi hotspot.
根据本实现方式提供的数据传输的方法,当第一电子设备在第一信道上尝试与第二电子设备建立Wi-Fi连接之前,通过向第二电子设备查询其5G能力,在确定第二电子设备支持5G能力后,在第一信道建立Wi-Fi热点,能够进一步提高双方在5G信道成功建立Wi-Fi连接的可能性。According to the data transmission method provided by this implementation, before the first electronic device attempts to establish a Wi-Fi connection with the second electronic device on the first channel, by inquiring about its 5G capability to the second electronic device, it is determined that the second electronic device After the device supports 5G capabilities, establishing a Wi-Fi hotspot on the first channel can further increase the possibility of the two parties successfully establishing a Wi-Fi connection on the 5G channel.
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:接收用户输入的第一操作;响应于所述第一操作,显示第一界面,所述第一界面包括二维码,所述二维码用于提供所述Wi-Fi热点的SSID和对应的密码。With reference to the first aspect, in some implementations of the first aspect, the method further includes: receiving a first operation input by a user; in response to the first operation, displaying a first interface, the first interface including two Two-dimensional code, the two-dimensional code is used to provide the SSID and corresponding password of the Wi-Fi hotspot.
根据本实现方式提供的数据传输的方法,第一电子设备可以通过二维码方式向第二电子设备提供该第一电子设备第一目标频段Wi-Fi热点的连接信息,从而能够便于第二电子设备后续基于该Wi-Fi连接信息与第一电子设备建立Wi-Fi连接。According to the data transmission method provided by this implementation, the first electronic device can provide the second electronic device with the connection information of the Wi-Fi hotspot in the first target frequency band of the first electronic device through a two-dimensional code, so that the second electronic device can The device subsequently establishes a Wi-Fi connection with the first electronic device based on the Wi-Fi connection information.
结合第一方面,在第一方面的某些实现方式中,所述获取第二电子设备的第一信道列表,具体包括:向所述第二电子设备发送第一信道查询信息,所述第一信道查询信息用于查询所述第二电子设备支持的所述第一目标频段信道;接收所述第二电子设备发送的所述第一信道响应信息,所述第一信道响应信息包括所述第二电子设备的第一信道列表。With reference to the first aspect, in some implementation manners of the first aspect, the obtaining the first channel list of the second electronic device specifically includes: sending first channel query information to the second electronic device, and the first The channel query information is used to query the first target frequency band channel supported by the second electronic device; receive the first channel response information sent by the second electronic device, and the first channel response information includes the first channel response information A first channel list of the second electronic device.
可选地,第一电子设备可以与第二电子设备建立蓝牙连接,之后,第一电子设备可以通过蓝牙信道向第二电子设备发送第一目标频段信道,也可以通过蓝牙信道接收第二电子设备发送的第一信道列表。Optionally, the first electronic device can establish a Bluetooth connection with the second electronic device, and then, the first electronic device can send the first target frequency band channel to the second electronic device through the Bluetooth channel, and can also receive the second electronic device through the Bluetooth channel. The list of first channels to send.
结合第一方面,在第一方面的某些实现方式中,所述当所述第一信道列表和第二信道列表的交集为空时,在第一信道上开启第一目标频段无线保真Wi-Fi热点,具体包括:当所述第一信道列表和第二信道列表的交集为空时,从所述第一电子设备支持的所述第一目标信道中随机选择所述第一信道;或者,当所述第一信道列表和第二信道列表的交集为空时,根据信号强度从所述第一电子设备支持的所述第一目标信道中选择所述第一信道。With reference to the first aspect, in some implementation manners of the first aspect, when the intersection of the first channel list and the second channel list is empty, enabling the first target frequency band Wi-Fi Wi-Fi on the first channel -Fi hotspots, specifically comprising: when the intersection of the first channel list and the second channel list is empty, randomly selecting the first channel from the first target channels supported by the first electronic device; or , when the intersection of the first channel list and the second channel list is empty, select the first channel from the first target channels supported by the first electronic device according to signal strength.
结合第一方面,在第一方面的某些实现方式中,所述第一目标频段为5G频段,所述第二目标频段为2.4G频段。With reference to the first aspect, in some implementation manners of the first aspect, the first target frequency band is a 5G frequency band, and the second target frequency band is a 2.4G frequency band.
结合第一方面,在第一方面的某些实现方式中,所述第一电子设备包括第一应用和第一短距Wi-Fi模块,所述第一应用包括第一用户体验UX显示模块、第一蓝牙模块、第一克隆特性模块和第一信道协商模块,所述获取第二电子设备的第一信道列表,具体包括:所述第一信道协商模块向所述第一蓝牙模块发送信道查询信息,所述信道查询信息用于查询所述第二电子设备支持的所述第一目标频段信道;所述第一蓝牙模块接收所述信道查询信息,并向所述第二蓝牙模块发送所述信道查询信息;所述第一蓝牙模块接收所述第二蓝牙模块发送的信道响应信息,所述信道响应信息包括所述第一信道列表;所述第一蓝牙模块向所述第一信道协商模块发送的所述信道响应信息;所述第一信道协商模块根据所述信道响应信息获取所述第二电子设备的第一信道列表。With reference to the first aspect, in some implementation manners of the first aspect, the first electronic device includes a first application and a first short-range Wi-Fi module, and the first application includes a first user experience UX display module, The first Bluetooth module, the first clone characteristic module and the first channel negotiation module, the acquisition of the first channel list of the second electronic device specifically includes: the first channel negotiation module sends a channel query to the first Bluetooth module information, the channel query information is used to query the first target frequency band channel supported by the second electronic device; the first Bluetooth module receives the channel query information, and sends the Channel query information; the first Bluetooth module receives channel response information sent by the second Bluetooth module, the channel response information includes the first channel list; the first Bluetooth module sends the first channel negotiation module The channel response information is sent; the first channel negotiation module obtains the first channel list of the second electronic device according to the channel response information.
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:所述第一UX显示模块接收用户输入的第一操作,所述第一操作用于触发所述第一电子设备开启接收端流程,所述接收端流程包括建立蓝牙连接;响应于所述第一操作,所述第一UX显示模块向所述第一克隆特性模块发送接收端流程触发信息;响应于所述接收端流程触发信息,所述第一克隆特性模块生成二维码信息,并向所述第一UX显示模块发送所述二维码信息,所述二维码信息包括所述第一目标频段Wi-Fi热点的SSID和对应的密码。With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first UX display module receives a first operation input by a user, and the first operation is used to trigger the first electronic The device starts a receiving end process, and the receiving end process includes establishing a Bluetooth connection; in response to the first operation, the first UX display module sends receiving end process trigger information to the first clone characteristic module; in response to the receiving process trigger information, the first cloning characteristic module generates two-dimensional code information, and sends the two-dimensional code information to the first UX display module, the two-dimensional code information includes the first target frequency band Wi -The SSID of the Fi hotspot and the corresponding password.
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:响应于向所述第一UX显示模块发送所述二维码信息,所述第一克隆特性模块向所述第一蓝牙模块发送蓝牙开启信息;所述第一克隆特性模块向所述第一蓝牙模块发送蓝牙开启信息;响应于所述蓝牙开启信息,所述第一蓝牙模块向所述第二电子设备的第二蓝牙模块建立蓝牙连接。With reference to the first aspect, in some implementation manners of the first aspect, the method further includes: in response to sending the two-dimensional code information to the first UX display module, the first clone characteristic module sends the The first bluetooth module sends bluetooth opening information; the first clone feature module sends bluetooth opening information to the first bluetooth module; in response to the bluetooth opening information, the first bluetooth module sends information to the second electronic device The second Bluetooth module establishes a Bluetooth connection.
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:所述第一蓝牙模块向所述第一信道协商模块发送蓝牙连接信息,所述蓝牙连接建立信息用于指示蓝牙连接建立完成;响应于所述蓝牙连接建立信息,所述第一信道协商模块向所述第一蓝牙模块发送信道查询信息。With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first Bluetooth module sends Bluetooth connection information to the first channel negotiation module, and the Bluetooth connection establishment information is used to indicate The Bluetooth connection is established; in response to the Bluetooth connection establishment information, the first channel negotiation module sends channel query information to the first Bluetooth module.
结合第一方面,在第一方面的某些实现方式中,所述方法具体包括:所述第一信道协商模块向所述第一短距Wi-Fi模块发送第二信道查询信息,所述第二信道查询信息用于查询所述第一电子设备支持的所述第一目标频段信道;所述第一短距Wi-Fi模块向所述第一信道协商模块发送第二信道响应信息,所述第二信道响应信息包括所述第二信道列表。With reference to the first aspect, in some implementation manners of the first aspect, the method specifically includes: the first channel negotiation module sends second channel query information to the first short-range Wi-Fi module, and the first The second channel query information is used to query the first target frequency band channel supported by the first electronic device; the first short-distance Wi-Fi module sends second channel response information to the first channel negotiation module, and the The second channel response information includes the second channel list.
结合第一方面,在第一方面的某些实现方式中,所述当所述第一信道列表和第二信道列表的交集为空时,在第一信道上开启第一目标频段无线保真Wi-Fi热点,具体包括:当根据所述第一信道列表和第二信道列表获取所述第一电子设备和所述第二电子设备共同支持的所述第一目标频段信道的交集为空时,所述第一信道协商模块向所述第一短距Wi-Fi模块发送第一目标频段Wi-Fi热点开启信息;响应于所述第一目标频段Wi-Fi热点开启信息,所述第一短距Wi-Fi模块开启所述第一目标频段Wi-Fi热点。With reference to the first aspect, in some implementation manners of the first aspect, when the intersection of the first channel list and the second channel list is empty, enabling the first target frequency band Wi-Fi Wi-Fi on the first channel -Fi hotspots, specifically comprising: when the intersection of the first target frequency band channels jointly supported by the first electronic device and the second electronic device obtained according to the first channel list and the second channel list is empty, The first channel negotiation module sends the first target frequency band Wi-Fi hotspot activation information to the first short-distance Wi-Fi module; in response to the first target frequency band Wi-Fi hotspot activation information, the first short-range Turn on the Wi-Fi hotspot in the first target frequency band from the Wi-Fi module.
结合第一方面,在第一方面的某些实现方式中,所述当所述第一信道列表和第二信道列表的交集为空时,向所述第二电子设备发送能力查询信息,具体包括:所述第一信道协商模块向所述第一蓝牙模块发送所述能力查询信息。With reference to the first aspect, in some implementation manners of the first aspect, when the intersection of the first channel list and the second channel list is empty, sending capability query information to the second electronic device specifically includes : the first channel negotiation module sends the capability query information to the first Bluetooth module.
结合第一方面,在第一方面的某些实现方式中,所述接收所述第二电子设备发送的能力响应信息,具体包括:所述第一蓝牙模块接收所述第二蓝牙模块发送的所述能力响应信息,所述能力响应信息用于指示所述第二电子设备支持所述第一目标频段;所述第一蓝牙模块向所述第一信道协商模块发送所述能力响应信息。With reference to the first aspect, in some implementation manners of the first aspect, the receiving the capability response information sent by the second electronic device specifically includes: the first Bluetooth module receiving the capability response information sent by the second Bluetooth module. The capability response information is used to indicate that the second electronic device supports the first target frequency band; the first Bluetooth module sends the capability response information to the first channel negotiation module.
结合第一方面,在第一方面的某些实现方式中,所述当在预设时长内未接收到所述第二电子设备经由所述第一信道发送的所述Wi-Fi连接请求消息时,与所述第二电子设备在第二信道上建立Wi-Fi连接,具体包括:当在所述预设时长内未接收到所述第二电子设备经由所述第一信道发送的所述Wi-Fi连接请求消息时,所述第一信道协商模块向所述第一短距Wi-Fi模块第一目标频段Wi-Fi热点关闭信息;响应于所述第一目标频段Wi-Fi热点关闭信息,所述第一短距Wi-Fi模块关闭所述第一目标频段Wi-Fi热点;所述第一信道协商模块向所述第一短距Wi-Fi模块第二目标频段Wi-Fi热点开启信息;响应于所述第二目标频段Wi-Fi热点开启信息,所述第一短距Wi-Fi模块开启所述第二目标频段Wi-Fi热点,并且所述第一短距Wi-Fi模块与所述第二电子设备的第二短距Wi-Fi模块在所述第二信道上建立Wi-Fi连接。With reference to the first aspect, in some implementations of the first aspect, when the Wi-Fi connection request message sent by the second electronic device via the first channel is not received within a preset time period, , establishing a Wi-Fi connection with the second electronic device on the second channel, specifically including: when the Wi-Fi connection sent by the second electronic device via the first channel is not received within the preset time period, - When a Fi connection request message is issued, the first channel negotiation module sends the first target frequency band Wi-Fi hotspot closing information to the first short-distance Wi-Fi module; in response to the first target frequency band Wi-Fi hotspot closing information , the first short-range Wi-Fi module turns off the first target frequency band Wi-Fi hotspot; the first channel negotiation module turns on the second target frequency band Wi-Fi hotspot of the first short-range Wi-Fi module Information; in response to the second target frequency band Wi-Fi hotspot opening information, the first short-range Wi-Fi module turns on the second target frequency band Wi-Fi hotspot, and the first short-range Wi-Fi module Establishing a Wi-Fi connection with the second short-range Wi-Fi module of the second electronic device on the second channel.
结合第一方面,在第一方面的某些实现方式中,所述第一电子设备还包括第一显示屏,所述响应于所述第一操作,显示第一界面,所述第一界面包括二维码,具体包括:所述第一UX显示模块接收到所述二维码信息后,指示所述第一显示屏显示第一界面,所述第一界面包括所述二维码。With reference to the first aspect, in some implementation manners of the first aspect, the first electronic device further includes a first display screen, and in response to the first operation, a first interface is displayed, and the first interface includes The two-dimensional code specifically includes: after receiving the two-dimensional code information, the first UX display module instructs the first display screen to display a first interface, and the first interface includes the two-dimensional code.
第二方面,提供了一种数据传输的方法,应用于第二电子设备,所述第二电子设备支持第一目标频段能力,所述方法包括:向第一电子设备发送第一信道列表,所述第一信道列表用于指示所述第二电子设备支持的第一目标频段信道;当所述第一电子设备在第一信道上开启第一目标频段Wi-Fi热点时,与所述第一电子设备在所述第一信道上建立Wi-Fi连接,所述第一信道为当所述第一信道列表和第二信道列表的交集为空时,所述第一电子设备从所述第一电子设备支持的所述第一目标频段信道中选择的某一个信道,且所述第一信道也为所述第二电子设备支持的所述第一目标频段信道中的一个信道;经由所述第一信道向所述第一电子设备发送数据。In a second aspect, a data transmission method is provided, which is applied to a second electronic device, and the second electronic device supports the capability of the first target frequency band, and the method includes: sending a first channel list to the first electronic device, the The first channel list is used to indicate the first target frequency band channel supported by the second electronic device; when the first electronic device opens the first target frequency band Wi-Fi hotspot on the first channel, the The electronic device establishes a Wi-Fi connection on the first channel, and the first channel is when the intersection of the first channel list and the second channel list is empty, the first electronic device starts from the first channel list. A channel selected from the first target frequency band channels supported by the electronic device, and the first channel is also a channel in the first target frequency band channels supported by the second electronic device; A channel sends data to the first electronic device.
结合第二方面,在第二方面的某些实现方式中,所述方法还包括:若在预设时长内未成功与所述第一电子设备在所述第一信道上建立所述Wi-Fi连接,则与所述第一电子设备在第二信道上建立Wi-Fi连接,所述第二信道为所述第一电子设备和所述第二电子设备共同支持的某一个第二目标频段信道。With reference to the second aspect, in some implementation manners of the second aspect, the method further includes: if the Wi-Fi connection with the first electronic device is not successfully established on the first channel within a preset time period, connection, establish a Wi-Fi connection with the first electronic device on a second channel, and the second channel is a certain second target frequency band channel jointly supported by the first electronic device and the second electronic device .
结合第二方面,在第二方面的某些实现方式中,所述方法还包括:接收所述第一电子设备发送的能力查询信息,所述能力查询信息用于查询所述第二电子设备是否支持所述第一目标频段;向所述第一电子设备发送能力响应信息,所述能力响应信息用于指示所述第二电子设备支持所述第一目标频段。With reference to the second aspect, in some implementations of the second aspect, the method further includes: receiving capability query information sent by the first electronic device, where the capability query information is used to query whether the second electronic device supporting the first target frequency band; sending capability response information to the first electronic device, where the capability response information is used to indicate that the second electronic device supports the first target frequency band.
结合第二方面,在第二方面的某些实现方式中,所述方法还包括:接收所述第一电子设备发送的第一信道查询信息,所述第一信道查询信息用于查询所述第二电子设备支持的所述第一目标频段信道;响应于所述第一信道查询信息,查询所述第二电子设备支持的所述第一目标频段信道;当查询失败时,向所述第一电子设备发送第一信道列表,所述第一信道列表包括的所述第一目标频段信道为空。With reference to the second aspect, in some implementations of the second aspect, the method further includes: receiving first channel query information sent by the first electronic device, where the first channel query information is used to query the first channel query information. The first target frequency band channel supported by the second electronic device; in response to the first channel query information, query the first target frequency band channel supported by the second electronic device; when the query fails, send to the first The electronic device sends a first channel list, and the first target frequency band channel included in the first channel list is empty.
结合第二方面,在第二方面的某些实现方式中,所述方法还包括:接收用户输入的第二操作;响应于所述第二操作,显示第二界面,所述第二界面包括二维码扫描区域;通过所述第二界面对所述第一电子设备显示的二维码进行扫描,提取所述二维码提供的所述Wi-Fi热点的SSID和对应的密码。With reference to the second aspect, in some implementations of the second aspect, the method further includes: receiving a second operation input by the user; in response to the second operation, displaying a second interface, the second interface including two Two-dimensional code scanning area: scan the two-dimensional code displayed by the first electronic device through the second interface, and extract the SSID and corresponding password of the Wi-Fi hotspot provided by the two-dimensional code.
结合第二方面,在第二方面的某些实现方式中,所述方法还包括:发送Wi-Fi连接请求消息,所述Wi-Fi连接请求消息包括所述Wi-Fi热点的SSID和对应的密码,并且所述Wi-Fi连接请求消息为所述第二电子设备在自己支持的第一目标频段上的发送的轮询消息。With reference to the second aspect, in some implementations of the second aspect, the method further includes: sending a Wi-Fi connection request message, where the Wi-Fi connection request message includes the SSID of the Wi-Fi hotspot and the corresponding password, and the Wi-Fi connection request message is a polling message sent by the second electronic device on the first target frequency band supported by itself.
结合第二方面,在第二方面的某些实现方式中,所述第一目标频段为5G频段,所述第二目标频段为2.4G频段。With reference to the second aspect, in some implementation manners of the second aspect, the first target frequency band is a 5G frequency band, and the second target frequency band is a 2.4G frequency band.
结合第二方面,在第二方面的某些实现方式中,所述第二电子设备包括第二应用和第二短距Wi-Fi模块,所述第二应用包括第二UX显示模块、第二克隆特性模块、第二蓝牙模块和第二信道协商模块,所述向第一电子设备发送第一信道列表,具体包括:所述第二蓝牙模块接收所述第一电子设备的第一蓝牙模块发送的第一信道查询信息,所述第一信道查询信息用于查询所述第二电子设备支持的所述第一目标频段信道;所述第二蓝牙模块向所述第二信道协商模块发送所述第一信道查询信息;响应于所述第一信道查询信息,所述第二信道协商模块向所述第二短距Wi-Fi模块查询所述第二电子设备支持的所述第一目标频段;当查询失败时,所述第二信道协商模块生成第一信道响应信息,所述第一信道响应信息包括第一信道列表,所述第一信道列表为空;所述第二信道协商模块向所述第二蓝牙模块发送所述第一信道响应信息;所述第二蓝牙模块接收所述第二信道协商模块发送的所述第一信道响应信息,并向所述第一蓝牙模块发送所述第一信道响应信息。With reference to the second aspect, in some implementations of the second aspect, the second electronic device includes a second application and a second short-range Wi-Fi module, and the second application includes a second UX display module, a second Cloning the characteristic module, the second Bluetooth module and the second channel negotiation module, the sending the first channel list to the first electronic device specifically includes: the second Bluetooth module receives the first Bluetooth module of the first electronic device The first channel query information, the first channel query information is used to query the first target frequency band channel supported by the second electronic device; the second bluetooth module sends the second channel negotiation module the First channel query information; in response to the first channel query information, the second channel negotiation module queries the second short-range Wi-Fi module for the first target frequency band supported by the second electronic device; When the query fails, the second channel negotiation module generates first channel response information, the first channel response information includes a first channel list, and the first channel list is empty; The second Bluetooth module sends the first channel response information; the second Bluetooth module receives the first channel response information sent by the second channel negotiation module, and sends the first channel response information to the first Bluetooth module A channel response message.
结合第二方面,在第二方面的某些实现方式中,所述第二电子设备还包括第二显示屏和摄像头,所述方法还包括:所述第二UX显示模块接收用户输入的第二操作;响应于所述第二操作,所述第二UX显示界面向所述第二克隆特性模块发送发送端流程开启信息;响应于所述发送端流程开启信息,所述第二克隆特性模块指示所述摄像头开启,并向所述第二UX显示模块发送二维码扫描界面开启信息;响应于所述二维码扫描界面开启信息,所述第二UX显示模块指示第二显示屏显示第二界面,所述第二界面包括所述二维码扫描区域。With reference to the second aspect, in some implementation manners of the second aspect, the second electronic device further includes a second display screen and a camera, and the method further includes: the second UX display module receives a second Operation; in response to the second operation, the second UX display interface sends sending end process opening information to the second clone characteristic module; in response to the sending end process opening information, the second clone characteristic module indicates The camera is turned on, and sends a two-dimensional code scanning interface opening information to the second UX display module; in response to the two-dimensional code scanning interface opening information, the second UX display module instructs the second display screen to display the second interface, the second interface includes the two-dimensional code scanning area.
结合第二方面,在第二方面的某些实现方式中,所述发送Wi-Fi连接请求消息,具体包括:当所述第二电子设备扫描所述第一电子设备显示的二维码后,所述第二UX显示模块获取所述Wi-Fi热点的SSID和对应的密码,并且所述第二UX显示模块向第二克隆特性模块发送所述Wi-Fi热点的SSID和对应的密码;所述第二克隆特性模块向所述第二信道协商模块发送所述Wi-Fi热点的SSID和对应的密码;响应于所述Wi-Fi热点的SSID和对应的密码,所述第二信道协商模块指示所述第二短距Wi-Fi模块尝试连接所述Wi-Fi热点;所述第二短距Wi-Fi模块发送所述Wi-Fi连接请求消息。With reference to the second aspect, in some implementation manners of the second aspect, the sending the Wi-Fi connection request message specifically includes: after the second electronic device scans the QR code displayed by the first electronic device, The second UX display module obtains the SSID and the corresponding password of the Wi-Fi hotspot, and the second UX display module sends the SSID and the corresponding password of the Wi-Fi hotspot to the second clone feature module; The second cloning feature module sends the SSID of the Wi-Fi hotspot and the corresponding password to the second channel negotiation module; in response to the SSID of the Wi-Fi hotspot and the corresponding password, the second channel negotiation module Instructing the second short-range Wi-Fi module to try to connect to the Wi-Fi hotspot; the second short-range Wi-Fi module sends the Wi-Fi connection request message.
结合第二方面,在第二方面的某些实现方式中,所述接收所述第一电子设备发送的能力查询信息,具体包括:所述第二蓝牙模块接收所述第一电子设备的第一蓝牙模块发送的所述能力查询信息。With reference to the second aspect, in some implementation manners of the second aspect, the receiving the capability query information sent by the first electronic device specifically includes: the second Bluetooth module receiving the first electronic device's first The capability query information sent by the Bluetooth module.
结合第二方面,在第二方面的某些实现方式中,所述向所述第一电子设备发送能力响应信息,具体包括:所述第二蓝牙模块向所述第二信道协商模块发送所述能力查询信息;响应于所述能力查询信息,所述第二信道协商模块向所述第二短距Wi-Fi模块查询所述第二电子设备的所述第一目标频段能力;所述第二短距Wi-Fi模块获取所述第二电子设备的所述第一目标频段能力,并向所述第二信道协商模块发送查询结果,所述查询结果为所述第二电子设备支持所述第一目标频段能力;所述第二信道协商模块根据所述第一目标频段能力的查询结果生成所述能力响应信息,并向所述第二蓝牙模块发送所述能力响应信息;所述第二蓝牙模块向所述第一电子设备的第一蓝牙模块发送所述能力响应信息。With reference to the second aspect, in some implementation manners of the second aspect, the sending capability response information to the first electronic device specifically includes: the second Bluetooth module sending the second channel negotiation module the Capability query information; in response to the capability query information, the second channel negotiation module queries the second short-range Wi-Fi module for the first target frequency band capability of the second electronic device; the second The short-distance Wi-Fi module obtains the first target frequency band capability of the second electronic device, and sends a query result to the second channel negotiation module, and the query result is that the second electronic device supports the first frequency band capability. A target frequency band capability; the second channel negotiation module generates the capability response information according to the query result of the first target frequency band capability, and sends the capability response information to the second Bluetooth module; the second Bluetooth The module sends the capability response information to the first Bluetooth module of the first electronic device.
第三方面,提供了一种电子设备,包括:一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行如上述第一方面或第二方面中任一实现方式所述的方法。In a third aspect, an electronic device is provided, including: one or more processors; one or more memories; one or more computer programs are stored in the one or more memories, and the one or more computer programs Instructions are included, and when the instructions are executed by the one or more processors, the electronic device is made to perform the method described in any implementation manner of the first aspect or the second aspect above.
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行程序,所述计算机可执行程序在被计算机调用时,使所述计算机执行如上述第一方面或第二方面中任一实现方式所述的方法。In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores a computer-executable program, and when the computer-executable program is called by a computer, the computer executes the above-mentioned first aspect. Or the method described in any implementation manner of the second aspect.
第五方面,提供了一种包含指令的计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如上述第一方面或第二方面中任一实现方式所述的方法。In the fifth aspect, there is provided a computer program product containing instructions, and when the computer program product is run on a computer, the computer is made to execute the method described in any implementation manner of the first aspect or the second aspect above .
附图说明Description of drawings
图1为一种新旧设备间数据克隆的示意性流程图。FIG. 1 is a schematic flowchart of data cloning between old and new devices.
图2为本申请实施例提供的一种数据传输的方法适用的系统架构示意图。FIG. 2 is a schematic diagram of a system architecture applicable to a data transmission method provided by an embodiment of the present application.
图3为本申请实施例提供的一种第一电子设备100的结构示意图。FIG. 3 is a schematic structural diagram of a first electronic device 100 provided in an embodiment of the present application.
图4为本申请实施例提供的另一种第一电子设备100的结构示意图。FIG. 4 is a schematic structural diagram of another first electronic device 100 provided in an embodiment of the present application.
图5A至图5C为本申请实施例提供的数据传输方法中可能涉及的GUI示意图。5A to 5C are schematic diagrams of GUIs that may be involved in the data transmission method provided by the embodiment of the present application.
图6为本申请实施例提供的一种二维码扫描界面的示意图。FIG. 6 is a schematic diagram of a two-dimensional code scanning interface provided by an embodiment of the present application.
图7为本申请实施例提供的一种数据传输方法实现过程中设备的各个模块间数据流交互的示意图。FIG. 7 is a schematic diagram of data flow interaction among various modules of a device during implementation of a data transmission method provided by an embodiment of the present application.
图8为本申请实施例提供的一种数据传输的方法的时序图。FIG. 8 is a sequence diagram of a data transmission method provided by an embodiment of the present application.
图9为本申请实施例提供的一种数据传输的方法的示意性流程图。FIG. 9 is a schematic flowchart of a data transmission method provided by an embodiment of the present application.
图10为本申请实施例提供的另一种数据传输的方法的示意性流程图。FIG. 10 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
图11为本申请实施例提供的又一种数据传输的方法的示意性流程图。FIG. 11 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
图12是本申请实施例提供的又一种数据传输的方法的示意性流程图。FIG. 12 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
图13为本申请实施例提供的又一种数据传输的方法的示意性流程图。FIG. 13 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
图14为本申请实施例提供的又一种数据传输的方法的示意性流程图。FIG. 14 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
图15为本申请实施例提供的又一种数据传输的方法的示意性流程图。FIG. 15 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
图16A至图16D为本申请实施例提供的一些数据传输过程可能涉及的GUI示意图。16A to 16D are schematic diagrams of GUIs that may be involved in some data transmission processes provided by the embodiments of the present application.
图17是本申请实施例提供的又一种数据传输的方法的示意性流程图。FIG. 17 is a schematic flowchart of another data transmission method provided by an embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联障碍物的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,除非另有说明,“多个”是指两个或多于两个,“至少一个”、“一个或多个”是指一个、两个或两个以上。It should be noted that the terms used in the implementation manners of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of this application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this article is just a way to describe associated obstacles An association relationship means that there may be three kinds of relationships. For example, A and/or B may mean that A exists alone, A and B exist simultaneously, and B exists independently. In addition, in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more than two, "at least one", "one or more" means one, two or two above.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”特征可以明示或者隐含地包括一个或者更多个该特征。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the definition of "first" and "second" features may expressly or implicitly include one or more of these features.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其它一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其它方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其它方式另外特别强调。Reference to "one embodiment" or "some embodiments" or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "including", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically stated otherwise.
5吉赫兹(Gigahertz,GHz)无线保真(wireless-fidelity,Wi-Fi)是指运行在5GHz(5150MHz-5825MHz)无线电波频段,且采用电气和电子工程师学会(institute forelectrical and electronic engineers,IEEE)标准的Wi-Fi。随着Wi-Fi网络使用的2.4G频段越来越拥挤,不能满足发展需求,各国陆续开放了5G频段,相比于2.4GWi-Fi,5GWi-Fi具有更高的无线传输速度。示例性的,IEEE规定的不同Wi-Fi标准所涉及的2.4G信道和5G信道信息可以如表1所示:5 GHz (Gigahertz, GHz) wireless fidelity (wireless-fidelity, Wi-Fi) refers to operating in the 5GHz (5150MHz-5825MHz) radio wave frequency band, and uses the Institute of Electrical and Electronics Engineers (institute for electrical and electronic engineers, IEEE) Standard Wi-Fi. As the 2.4G frequency band used by the Wi-Fi network becomes more and more crowded and cannot meet the development needs, countries have successively opened up the 5G frequency band. Compared with 2.4G Wi-Fi, 5G Wi-Fi has a higher wireless transmission speed. Exemplarily, the 2.4G channel and 5G channel information involved in different Wi-Fi standards stipulated by IEEE may be shown in Table 1:
表1Table 1
目前5G Wi-Fi信道多属于军民混用,开发情况复杂,比如,不同地区开放的5G Wi-Fi信道不同;不同国家的5G Wi-Fi信道法规也会随着时间变化;又比如,5G频段中的信道分为室内信道和室外信道,其中,部分国家规定室内信道不能供工作在室外的设备使用等等。不同的规定使得不同国家的不同时间、不同场景下5G Wi-Fi信道的可用情况不同。At present, 5G Wi-Fi channels are mostly used by the military and civilians, and the development situation is complicated. For example, the 5G Wi-Fi channels opened in different regions are different; the 5G Wi-Fi channel regulations of different countries will also change with time; The channels are divided into indoor channels and outdoor channels. Some countries stipulate that indoor channels cannot be used by equipment working outdoors, etc. Different regulations make the availability of 5G Wi-Fi channels different in different countries at different times and in different scenarios.
新旧设备之间进行换机克隆时,若需要备份的数据量较大,则利用5G频段进行数据传输,将会大大提高数据传输效率。考虑到5G频段可用情况较为复杂,在5G频段进行数据克隆时,需要新旧设备协商确定一致的5G信道进行交互。在一种可能的实现方式中,新旧设备可以从双方共同支持的5G信道交集中选择某一信道进行交互,实现在5G频段上的数据克隆。该过程可具体参见图1所示的流程图。When replacing and cloning between old and new devices, if the amount of data to be backed up is large, using the 5G frequency band for data transmission will greatly improve the efficiency of data transmission. Considering the complexity of the availability of the 5G frequency band, when performing data cloning in the 5G frequency band, it is necessary for the old and new devices to negotiate and determine a consistent 5G channel for interaction. In a possible implementation, the old and new devices can select a channel from the intersection of 5G channels jointly supported by both parties to interact, so as to realize data cloning on the 5G frequency band. This process can be specifically referred to the flowchart shown in FIG. 1 .
示例性的,如图1所示,为一种新旧设备间进行数据传输的示意性流程图。该流程包括以下步骤:Exemplarily, as shown in FIG. 1 , it is a schematic flowchart of data transmission between old and new devices. The process includes the following steps:
S101(a),新设备查询支持的5G信道列表;S101(a), the new device queries the list of supported 5G channels;
S101(b),旧设备查询支持的5G信道列表;S101(b), the old device queries the list of supported 5G channels;
S102,旧设备向新设备发送该旧设备支持的5G信道列表;S102, the old device sends a list of 5G channels supported by the old device to the new device;
S103,新设备比对新设备和旧设备分别支持的5G信道列表是否有交集;S103, the new device compares whether the 5G channel lists supported by the new device and the old device overlap;
该步骤中的比对结果有两种情形:情形1,双方信道有交集;情形2,双方信道无交集。其中:The comparison result in this step has two cases:
若比对结果是情形1,则执行步骤S104,也即新设备和旧设备在双方均支持的5G信道上进行数据传输;If the comparison result is
若比对结果是情形2,则执行步骤S105,也即新设备和旧设备在2.4G信道上进行数据传输。If the comparison result is situation 2, then step S105 is performed, that is, the new device and the old device perform data transmission on the 2.4G channel.
上述图1所示的数据传输过程可以通过新设备和旧设备上安装的应用程序(application,App)(如克隆应用)实现,并且该流程需要在克隆应用能够获取旧设备支持的5G信道列表(或集合)的基础上实现。然而,在实际应用中,有些系统没有提供芯片5G信道的标准接口,此时若旧设备上安装的克隆应用是第三方App,则会导致克隆应用无法查询到旧设备支持的5G信道列表,新设备和旧设备之间也就无法通过比对信道列表来确认双方共同支持的5G信道。The data transmission process shown in Figure 1 above can be implemented through the application (application, App) installed on the new device and the old device (such as a cloned application), and this process needs to be able to obtain the list of 5G channels supported by the old device before the cloned application ( or collections) based on implementation. However, in practical applications, some systems do not provide a standard interface for the 5G channel of the chip. At this time, if the cloned application installed on the old device is a third-party app, the cloned application cannot query the list of 5G channels supported by the old device. It is also impossible to confirm the 5G channels supported by both parties by comparing the channel list between the device and the old device.
针对上述问题,本申请实施例提供了一种数据传输的方法,该方法通过在无法获知旧设备支持的5G信道列表的情况下,新设备按照预设规则尝试在自己支持的5G信道与对端建立Wi-Fi连接,从而提高新旧设备在5G信道上进行克隆数据传输的可能性,提升用户体验。In view of the above problems, the embodiment of the present application provides a method of data transmission. In this method, when the list of 5G channels supported by the old device cannot be known, the new device tries to connect the 5G channels supported by itself with the peer end according to the preset rules. Establish a Wi-Fi connection, thereby improving the possibility of clone data transmission between old and new devices on the 5G channel, and improving user experience.
示例性的,如图2所示,为本申请实施例提供的一种数据传输的方法适用的系统架构示意图。该系统架构包括第一电子设备100和第二电子设备200。Exemplarily, as shown in FIG. 2 , it is a schematic diagram of a system architecture applicable to a data transmission method provided by the embodiment of the present application. The system architecture includes a first electronic device 100 and a second electronic device 200 .
在一些实施例中,第一电子设备100例如可以是克隆数据的接收设备,用于接收数据,下文也可以将第一电子设备100描述为接收设备(或者接收端)。示例性的,第一电子设备100可以安装有克隆应用(如换机克隆App),该克隆应用可以用于与用户进行交互,如接收用户输入的换机克隆请求、向用户展示待传输数据所在的旧设备类型、提示数据传输的进度等等。在本申请实施例中,该克隆应用可以调用第一电子设备的5G信道列表查询接口,查询该第一电子设备100支持的5G信道。此外,第一电子设备100还可以具有蓝牙(bluetooth)通信功能力,第一电子设备100可以通过该蓝牙通信能力与第二电子设备200建立蓝牙连接;第一电子设备100支持Wi-Fi通信能力,该Wi-F通信能力可以包括在2.4G频段上的Wi-Fi通信能力,也可以是在5G频段上的Wi-Fi通信能力。In some embodiments, the first electronic device 100 may be, for example, a receiving device for cloning data, for receiving data, and the first electronic device 100 may also be described as a receiving device (or a receiving end) below. Exemplarily, the first electronic device 100 may be installed with a cloning application (such as a phone replacement cloning App), and the cloning application may be used to interact with the user, such as receiving a phone replacement cloning request input by the user, and showing the user where the data to be transferred is located. The old device type, prompting the progress of data transfer, etc. In the embodiment of the present application, the cloning application may call the 5G channel list query interface of the first electronic device to query the 5G channels supported by the first electronic device 100 . In addition, the first electronic device 100 can also have Bluetooth (bluetooth) communication capabilities, and the first electronic device 100 can establish a Bluetooth connection with the second electronic device 200 through the Bluetooth communication capabilities; the first electronic device 100 supports Wi-Fi communication capabilities , the Wi-F communication capability may include the Wi-Fi communication capability on the 2.4G frequency band, or the Wi-Fi communication capability on the 5G frequency band.
在一些实施例中,第二电子设备200可以是克隆数据的发送设备,用于向第一电子设备100发送备份数据,下文也可以将第二电子设备200描述为发送设备(或发送端)。示例性的,第二电子设备200可以安装有克隆应用,当第二电子设备200的类型与第一电子设备100的类型不相同时,该克隆应用可以是第二电子设备200的第三方应用。在本申请实施例中,第二电子设备200可以不具有查询5G信道的通用接口,也即克隆应用无法主动查询该第二电子设备200支持的5G信道。此外,该第二电子设备200可以支持蓝牙通信能力,能够通过蓝牙通信能力与第一电子设备100建立蓝牙连接;第二电子设备还可以支持Wi-Fi通信能力,该Wi-Fi通信能力可以是2.4G频段上的Wi-Fi通信能力,也可以是在5G频段上的Wi-Fi通信能力。In some embodiments, the second electronic device 200 may be a clone data sending device for sending the backup data to the first electronic device 100, and the second electronic device 200 may also be described as the sending device (or sending end) below. Exemplarily, the second electronic device 200 may be installed with a clone application, and when the type of the second electronic device 200 is different from that of the first electronic device 100 , the clone application may be a third-party application of the second electronic device 200 . In this embodiment of the present application, the second electronic device 200 may not have a general interface for querying 5G channels, that is, the clone application cannot actively query the 5G channels supported by the second electronic device 200 . In addition, the second electronic device 200 can support Bluetooth communication capability, and can establish a Bluetooth connection with the first electronic device 100 through Bluetooth communication capability; the second electronic device can also support Wi-Fi communication capability, and the Wi-Fi communication capability can be The Wi-Fi communication capability on the 2.4G frequency band may also be the Wi-Fi communication capability on the 5G frequency band.
在一些实施例中,第二电子设备200例如可以是用户以往使用的旧设备,第一电子设备100例如可以是用户新获取的用于替换该第二电子设备200的新设备。示例性的,第一电子设备100和第二电子设备200例如可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备,本申请实施例对第一电子设备100和第二电子设备200的具体类型不作任何限制。In some embodiments, the second electronic device 200 may be, for example, an old device previously used by the user, and the first electronic device 100 may be, for example, a new device newly acquired by the user to replace the second electronic device 200 . Exemplarily, the first electronic device 100 and the second electronic device 200 may be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) devices, notebooks, etc. Electronic devices such as computers, ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (personal digital assistants, PDAs). There are no restrictions on the type.
示例性的,如图3所示,为本申请实施例提供的一种第一电子设备100的结构示意图。Exemplarily, as shown in FIG. 3 , it is a schematic structural diagram of a first electronic device 100 provided in the embodiment of the present application.
第一电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The first electronic device 100 may include a
可以理解的是,本申请实施例示意的结构并不构成对第一电子设备100的具体限定。在本申请另一些实施例中,第一电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100 . In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown in the illustration, or combine some components, or separate some components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The
其中,控制器可以是第一电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, the controller may be the nerve center and command center of the first electronic device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments,
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现第一电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments,
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments,
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现第一电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现第一电子设备100的显示功能。The MIPI interface can be used to connect the
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为第一电子设备100充电,也可以用于第一电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其它终端,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the first electronic device 100 , and can also be used to transmit data between the first electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other terminals, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对第一电子设备100的结构限定。在本申请另一些实施例中,第一电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship among the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the first electronic device 100 . In other embodiments of the present application, the first electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过第一电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端供电。The
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其它一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the
第一电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the first electronic device 100 can be realized by the
移动通信模块150可以提供应用在第一电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其它功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A,
无线通信模块160可以提供应用在第一电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the first electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the
第一电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。显示屏194用于显示图像,视频等。The first electronic device 100 implements a display function through a GPU, a display screen 194 , and an application processor. The display screen 194 is used to display images, videos and the like.
第一电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The first electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其它数字信号。例如,当第一电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。视频编解码器用于对数字视频压缩或解压缩。NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。Digital signal processors are used to process digital signals, not only digital image signals, but also other digital signals. For example, when the first electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point. Video codecs are used to compress or decompress digital video. The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展第一电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。The
第一电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The first electronic device 100 can implement audio functions through the
示例性的,第一电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明第一电子设备100的软件结构。图4是本申请实施例的第一电子设备100的软件结构框图。Exemplarily, the software system of the first electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the software structure of the first electronic device 100 is exemplarily described by taking the Android system with a layered architecture as an example. FIG. 4 is a block diagram of the software structure of the first electronic device 100 according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
应用程序层可以包括一系列应用程序包。如图4所示,应用程序包可以包括相机,日历,WLAN,地图,蓝牙,音乐,图库,通话和克隆应用等。其中,克隆应用可以包括UX显示模块、克隆特性模块、蓝牙模块和信道协商模块等。The application layer can consist of a series of application packages. As shown in Figure 4, the application package can include camera, calendar, WLAN, map, bluetooth, music, gallery, call and clone applications, etc. Wherein, the clone application may include a UX display module, a clone feature module, a bluetooth module, a channel negotiation module, and the like.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 4, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供第一电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the first electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, emitting a prompt sound, terminal vibration, and indicator light flashing, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行障碍物生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as obstacle life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)、短距Wi-Fi模块等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), short-distance Wi-Fi module, etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
短距Wi-Fi模块用于在Wi-Fi信道上建立热点,如在2.4G信道或者5G信道上建立Wi-Fi热点。The short-distance Wi-Fi module is used to establish a hotspot on a Wi-Fi channel, such as establishing a Wi-Fi hotspot on a 2.4G channel or a 5G channel.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
本申请实施例提供的数据传输的方法适用于新旧设备之间进行换机克隆的应用场景下,也即在用户需要将旧设备上的数据迁移至新设备上时,通过本申请实施例提供的数据传输的方法,可以提高双方在5G信道上传输数据的可能性,从而实现提高数据传输效率。示例性的,如图5A至图5C所示,为本申请实施例提供的数据传输的过程中可能涉及的一些图形用户界面(graphical user interface,GUI)示意图。为便于理解,这里以图5A至图5C所示的GUI为第一电子设备100中的界面,且以第一电子设备100是新手机为例进行说明。The data transmission method provided by the embodiment of the present application is suitable for the application scenario of switching and cloning between old and new devices, that is, when the user needs to migrate the data on the old device to the new device, the method provided by the embodiment of the present application The method of data transmission can improve the possibility of both parties transmitting data on the 5G channel, thereby improving the efficiency of data transmission. Exemplarily, as shown in FIG. 5A to FIG. 5C , they are schematic diagrams of some graphical user interfaces (graphical user interface, GUI) that may be involved in the process of data transmission provided by the embodiment of the present application. For ease of understanding, the GUI shown in FIG. 5A to FIG. 5C is used as the interface in the first electronic device 100, and the first electronic device 100 is a new mobile phone as an example for illustration.
在一些实施例中,新手机安装有换机克隆App,该换机克隆App可以是新手机出厂自带的应用程序。当用户在新手机的主界面上开启换机克隆App后,如图5A所示,新手机可以显示开启换机克隆App后的主界面。In some embodiments, the new mobile phone is installed with a replacement clone App, and the replacement clone App may be an application program that comes with the new mobile phone when it leaves the factory. After the user starts the replacement clone App on the main interface of the new mobile phone, as shown in FIG. 5A , the new mobile phone can display the main interface after the replacement clone App is activated.
示例性的,该换机克隆App主界面的上方可以显示有状态栏,该状态栏可以包括:移动通信信号(或称蜂窝信号)的一个或多个信号强度指示符、Wi-Fi信号的一个或多个信号强度指示符,手机的电量指示符,时间指示符等。在状态栏下方,该换机克隆APP主界面还可以包括换机克隆功能的相关说明,如图5A所示的“火速把联系人、图片、日程等数据迁移到新设备”;在功能说明的下方还包括设备类型选择区域,其中,设备类型包括新设备(如图5A所示的“这是新设备(接收数据)”)和旧设备(如图5A所示的“这是旧设备(发送数据)”)。在一些实施例中,若用户当前操作的是新手机,则可以点击选择“这是新设备”对应的图标;若用户当前操作的是旧手机,则可以点击选择“这是旧设备”对应的图标。比如,当前操作的手机是新设备,则用户可以针对“这是新设备”对应的图标输入操作501,该操作501例如可以是点击、长按等新设备类型选择操作;新手机接收到用户输入的新设备选择操作501时,可以响应于该操作501,显示如图5B所示的旧设备类型选择页面。Exemplarily, a status bar may be displayed on the main interface of the replacement clone App, and the status bar may include: one or more signal strength indicators of mobile communication signals (or cellular signals), one or more indicators of Wi-Fi signals; or multiple signal strength indicators, cell phone battery indicators, time indicators, etc. Below the status bar, the main interface of the phone replacement cloning APP can also include related instructions on the phone replacement cloning function, as shown in Figure 5A, "quickly migrate contacts, pictures, schedules, etc. to the new device"; in the function description The device type selection area is also included below, wherein the device type includes a new device ("this is a new device (receiving data)" as shown in Figure 5A) and an old device ("this is an old device (sending data)" as shown in Figure 5A) data)"). In some embodiments, if the user is currently operating a new mobile phone, he can click to select the icon corresponding to "This is a new device"; if the user is currently operating an old mobile phone, he can click to select the icon corresponding to "This is an old device". icon. For example, if the currently operated mobile phone is a new device, the user can input an
示例性的,如图5B所示,旧设备类型选择界面可以包括多种供用户选择的旧设备类型,比如,与新手机相同的旧设备类型(如新手机是荣耀,则该界面显示的一个旧设备类型可以也是荣耀)、旧设备类型(比如旧手机如果是荣耀之外的其它手机时,则可以对应该类型)、旧设备类型(比如旧手机如果是iPhone、iPad等使用系统的设备,则可以对应该类型)。Exemplarily, as shown in Figure 5B, the old device type selection interface may include a variety of old device types for the user to choose from, for example, the same old device type as the new mobile phone (if the new mobile phone is Honor, then a Old device type can also be glory), Old device type (for example, if the old mobile phone is other than Honor mobile phone, it can correspond to this type), Old device type (for example, if an old mobile phone is an iPhone, iPad, etc. system equipment, it can correspond to this type).
在一些实施例中,假设旧手机是与新手机不同类型的其它设备,则用户可以针对其它安卓设备对应的图标输入操作502,该操作502例如可以是点击、长按等旧设备类型选择操作;当新手机接收到用户输入的旧设备类型选择操作502时,响应于该操作,可以显示如图5C所示的旧设备选择界面。In some embodiments, it is assumed that the old phone is a different type of phone than the new phone device, the user can input an
示例性的,如图5C所示,该旧设备选择界面可以包括指引用户在旧手机执行连接操作的说明,如“在旧设备打开‘换机克隆’,选择‘这是旧设备’,扫描下方二维码建立连接”;在该说明内容下方可以显示新手机与旧手机建立连接所需的二维码,其中,该二维码可以用于指示新手机Wi-Fi热点的服务集标识(service set identifer,SSID)和密码,以便后续新旧手机协商Wi-Fi信道。根据该说明信息,用户可以通过旧手机安装的换机克隆APP扫描新手机上的二维码,其中,旧手机的二维码扫描界面示意图可以如图6所示。Exemplarily, as shown in FIG. 5C , the old device selection interface may include instructions to guide the user to perform a connection operation on the old mobile phone, such as "Open 'Replace Clone' on the old device, select 'This is an old device', and scan the QR code to establish a connection"; the QR code required to establish a connection between the new mobile phone and the old mobile phone can be displayed below the content of the description, where the QR code can be used to indicate the service set identifier (service set ID) of the Wi-Fi hotspot of the new mobile phone set identifer, SSID) and password, so that the new and old mobile phones can negotiate Wi-Fi channels later. According to the explanatory information, the user can scan the QR code on the new mobile phone through the replacement clone APP installed on the old mobile phone, wherein the schematic diagram of the QR code scanning interface of the old mobile phone can be shown in FIG. 6 .
在响应于旧手机扫描新手机二维码的操作,新手机可以与旧手机建立蓝牙连接,该蓝牙连接建立过程可以包括:当新手机与旧手机未配对,且旧手机扫描新手机显示的二维码后,触发新手机打开蓝牙功能;之后,新手机可以向周围发送蓝牙广播;当旧手机处于查询蓝牙扫描(inquiry scan)状态时,旧手机可以扫描到新手机发送的蓝牙广播;响应于扫描到的蓝牙广播,旧手机可以向新手机发送蓝牙响应,使得新手机获取旧手机作为可配对的设备选项;之后,新手机可以向旧手机发送寻呼请求(page request)。旧手机可以以固定的间隔在一个固定的时间窗口内以某个调频频率监听新手机的寻呼请求,当监听到新手机的寻呼请求后,旧手机可以在下一个时间槽向新手机发送从设备寻呼响应(salve pageresponse);新手机在接收到旧手机的从设备寻呼响应后,可以在下一个时间槽向旧手机发送主设备寻呼响应(master page response);之后,旧手机和新手机完成配对认证,即可以建立起用于传输数据的蓝牙连接。In response to the operation of scanning the QR code of the new mobile phone with the old mobile phone, the new mobile phone can establish a Bluetooth connection with the old mobile phone. The process of establishing the Bluetooth connection may include: After the QR code, trigger the new mobile phone to turn on the Bluetooth function; after that, the new mobile phone can send Bluetooth broadcasts around; when the old mobile phone is in the bluetooth scanning (inquiry scan) state, the old mobile phone can scan the Bluetooth broadcast sent by the new mobile phone; in response to Scanned Bluetooth broadcast, the old mobile phone can send a Bluetooth response to the new mobile phone, so that the new mobile phone obtains the old mobile phone as a pairable device option; after that, the new mobile phone can send a paging request (page request) to the old mobile phone. The old mobile phone can monitor the paging request of the new mobile phone with a certain FM frequency in a fixed time window at a fixed interval. Device paging response (salve page response); after the new mobile phone receives the slave device paging response of the old mobile phone, it can send the master device paging response (master page response) to the old mobile phone in the next time slot; after that, the old mobile phone and the new After the mobile phone completes the pairing authentication, a Bluetooth connection for data transmission can be established.
需要说明的是,在蓝牙连接过程中,新手机和旧手机可以通过隐式方式建立蓝牙连接,也即在被触发建立蓝牙连接时,新旧手机不会向用户提示打开蓝牙等信息,而是可以自动开启蓝牙功能,在用户无感知的情况下完成蓝牙连接的建立过程。It should be noted that during the Bluetooth connection process, the new mobile phone and the old mobile phone can establish a Bluetooth connection implicitly, that is, when the Bluetooth connection is triggered, the old and new mobile phones will not prompt the user to turn on Bluetooth and other information, but can Automatically turn on the Bluetooth function, and complete the establishment process of the Bluetooth connection without the user's perception.
在一些实施例中,为了避免通过二维码无法成功建立蓝牙连接的问题,该旧设备选择界面还可以包括手动建立新旧手机之间蓝牙连接的提示区域。该提示区域可以具体包括手动建立蓝牙连接的相关说明,如“如扫描二维码无法连接,请在旧设备扫描界面下方点击手动连接,连接以下WLAN”,该说明内容下方可以显示有局域网WLAN连接信息和密码。此外,针对旧手机未安装“换机克隆”的情形,该旧设备选择界面还可以包括“换机克隆”的安装链接。例如当用户在图5C中输入针对“换机克隆”安装链接(即“请点击此处安装”)的选择操作时,新手机可以通过蓝牙通信将“换机克隆”应用程序的安装信息发送给旧手机,使旧手机基于这些安装信息安装“换机克隆”APP。In some embodiments, in order to avoid the problem that the bluetooth connection cannot be successfully established through the two-dimensional code, the old device selection interface may further include a prompt area for manually establishing the bluetooth connection between the old and new mobile phones. The prompt area can specifically include instructions for manually establishing a Bluetooth connection, such as "If you cannot connect by scanning the QR code, please click Manual Connection at the bottom of the scanning interface of the old device to connect to the following WLAN". information and passwords. In addition, for the situation that the "replacement clone" is not installed on the old mobile phone, the old device selection interface may also include an installation link of the "replacement clone". For example, when the user enters the selection operation for the installation link of "Phone Replacement Clone" (ie "Please click here to install") in Figure 5C, the new mobile phone can send the installation information of the "Phone Replacement Clone" application program to The old mobile phone, so that the old mobile phone installs the "replacement clone" APP based on these installation information.
需要说明的是,图5A至图5C所示的GUI示意图仅为示例,在实际应用中,界面上还可以包括其它更多的图标或者说明信息,本申请实施例对此不作限定。It should be noted that the GUI schematic diagrams shown in FIG. 5A to FIG. 5C are only examples, and in practical applications, the interface may also include other more icons or explanatory information, which is not limited in this embodiment of the present application.
还需要说明的是,本申请实施例提供的数据传输的方法,可以通过第一电子设备和第二电子设备中的多个模块执行。为了更清楚地理解本申请实施例提供的数据传输的方法,下面结合附图,对实现该方法时设备上模块之间交互的数据流和操作进行介绍。It should also be noted that the data transmission method provided in the embodiment of the present application may be executed by multiple modules in the first electronic device and the second electronic device. In order to understand the data transmission method provided by the embodiment of the present application more clearly, the data flow and operation of the interaction between modules on the device when implementing the method will be introduced below with reference to the accompanying drawings.
示例性的,如图7所示,为本申请实施例提供的一种在执行数据传输方法时,各个模块间数据流交互的示意图。Exemplarily, as shown in FIG. 7 , it is a schematic diagram of data flow interaction between modules when the data transmission method is executed according to the embodiment of the present application.
如图所示,第一电子设备安装有克隆应用,该克隆应用可以包括第一用户体验(user experience,UX)显示模块、第一克隆特性模块、第一发现连接组件和第一传输模块,其中,第一发现连接模块可以包括第一蓝牙模块、第一信道协商模块和第一连接模块。该克隆应用可以位于第一电子设备Android系统分层架构的应用层(如图4所示)。此外,第一电子设备还可以包括短距Wi-Fi模块,该短距Wi-Fi模块可以位于第一电子设备Android系统分层架构的系统层(如图4所示)。As shown in the figure, the clone application is installed on the first electronic device, and the clone application may include a first user experience (user experience, UX) display module, a first clone characteristic module, a first discovery connection component and a first transmission module, wherein , the first discovery connection module may include a first Bluetooth module, a first channel negotiation module and a first connection module. The cloning application may be located in the application layer of the layered architecture of the Android system of the first electronic device (as shown in FIG. 4 ). In addition, the first electronic device may further include a short-range Wi-Fi module, and the short-range Wi-Fi module may be located at the system layer of the Android system layered architecture of the first electronic device (as shown in FIG. 4 ).
类似地,第二电子设备也安装有克隆应用,该克隆应用可以包括第二UX显示模块、第二克隆特性模块、第二发现连接组件和第二传输模块,其中,第二发现连接组件可以包括第二蓝牙模块、第二信道协商模块和第二连接模块。该克隆应用可以位于第二电子设备Android系统分层架构的应用层。此外,第二电子设备还可以包括短距Wi-Fi模块,该短距Wi-Fi模块可以位于第二电子设备Android系统分层架构的系统层。Similarly, the clone application is also installed on the second electronic device, and the clone application may include a second UX display module, a second clone feature module, a second discovery connection component, and a second transmission module, wherein the second discovery connection component may include The second bluetooth module, the second channel negotiation module and the second connection module. The clone application may be located in the application layer of the layered architecture of the Android system of the second electronic device. In addition, the second electronic device may further include a short-range Wi-Fi module, and the short-range Wi-Fi module may be located at the system layer of the layered architecture of the Android system of the second electronic device.
在一些实施例中,在执行本申请实施例提供的数据传输的方法时,第一电子设备的克隆特性模块可以接收用户经由UX显示模块输入的第一操作,该第一操作可以用于触发第一电子设备开启接收端流程,接收端流程例如可以包括显示二维码、与对端第二电子设备建立蓝牙连接等。示例性的,该第一操作用可以是用户开启接收端克隆App操作,也可以是旧设备类型选择操作(可对应于图5B所示的操作502)等。响应于第一操作,第一克隆特性模块生成二维码,并将该二维码发送至第一UX显示模块,其中,二维码包括该第一电子设备W-iFi热点的SSID和密码信息。In some embodiments, when executing the data transmission method provided by the embodiment of the present application, the cloning characteristic module of the first electronic device may receive a first operation input by the user via the UX display module, and the first operation may be used to trigger the second operation. An electronic device starts a receiving end process, and the receiving end process may include, for example, displaying a QR code, establishing a Bluetooth connection with a second electronic device at the opposite end, and the like. Exemplarily, the first operation may be the operation of the user opening the receiving end to clone the App, or an operation of selecting an old device type (may correspond to
在一些实施例中,第二电子设备的第二克隆特性模块可以接收用户通过第二UX显示模块输入的第二操作,该第二操作用于触发第二电子设备开启发送端流程,发送端流程例如可以包括显示二维码扫描界面等。示例性的,该第二操作例如可以是二维码扫描界面的开启操作;响应于第二操作,第二电子设备的第二克隆特性模块可以向第二UX显示模块发送二维码扫描界面开启信息;响应于该二维码扫描界面开启信息,第二UX显示模块可以显示二维码扫描界面(如图6所示),并且在用户的操作下扫描第一电子设备显示的二维码,获取第一电子设备二维码数据(也即Wi-Fi热点连接信息,如Wi-Fi热点的SSID和密码信息)。In some embodiments, the second cloning characteristic module of the second electronic device may receive a second operation input by the user through the second UX display module, and the second operation is used to trigger the second electronic device to start the sending process, the sending process For example, it may include displaying a two-dimensional code scanning interface and the like. Exemplarily, the second operation may be, for example, the opening operation of the two-dimensional code scanning interface; in response to the second operation, the second cloning characteristic module of the second electronic device may send the two-dimensional code scanning interface opening operation to the second UX display module information; in response to the opening information of the two-dimensional code scanning interface, the second UX display module can display the two-dimensional code scanning interface (as shown in Figure 6), and scan the two-dimensional code displayed by the first electronic device under the operation of the user, Obtain the QR code data of the first electronic device (that is, the Wi-Fi hotspot connection information, such as the SSID and password information of the Wi-Fi hotspot).
在一些实施例中,第二电子设备的第二UX显示模块可以将获取的二维码数据(也即Wi-Fi热点连接信息,包括Wi-Fi热点的SSID和密码信息)发送至该第二克隆特性模块。该第二克隆特性模块接收到Wi-Fi连接信息之后,可以将该Wi-Fi连接信息发送至第二连接模块,指示第二连接模块基于Wi-Fi连接信息包括的Wi-Fi热点的SSID和密码信息尝试建立Wi-Fi连接;第二连接模块接收到该Wi-Fi连接信息后可以将该连接信息发送至第二短距Wi-Fi模块,并指示该第二短距Wi-Fi模块尝试连接第一电子设备的Wi-Fi热点。In some embodiments, the second UX display module of the second electronic device can send the obtained QR code data (that is, Wi-Fi hotspot connection information, including Wi-Fi hotspot SSID and password information) to the second Clone feature modules. After the second cloning characteristic module receives the Wi-Fi connection information, it can send the Wi-Fi connection information to the second connection module, indicating that the second connection module is based on the SSID and SSID of the Wi-Fi hotspot included in the Wi-Fi connection information. The password information attempts to establish a Wi-Fi connection; after receiving the Wi-Fi connection information, the second connection module can send the connection information to the second short-distance Wi-Fi module, and instruct the second short-distance Wi-Fi module to try Connect to the Wi-Fi hotspot of the first electronic device.
在一些实施例中,在第一电子设备侧,响应于向第一UX显示模块发送二维码信息,第一电子设备的第一克隆特性模块可以向该第一发现连接组件中的第一蓝牙模块发送蓝牙开启信息;响应于该蓝牙开启信息,该第一蓝牙模块开启,蓝牙模块可以广播蓝牙消息。可选地,第一克隆特性模块还可以响应于二维码被扫描,向第一蓝牙模块发送蓝牙开启信息,比如,当第一UX显示模块显示的二维码被扫描后,第一UX显示模块可以将二维码被扫描的通知信息发送至第一克隆特性模块,响应于该二维码被扫描的通知信息,第一克隆特性模块向第一蓝牙模块发送蓝牙开启信息,指示蓝牙模块建立蓝牙连接。In some embodiments, on the side of the first electronic device, in response to sending the two-dimensional code information to the first UX display module, the first clone feature module of the first electronic device may send the first bluetooth The module sends a bluetooth start message; in response to the bluetooth start message, the first bluetooth module is turned on, and the bluetooth module can broadcast a bluetooth message. Optionally, the first cloning feature module can also send Bluetooth activation information to the first Bluetooth module in response to the two-dimensional code being scanned, for example, when the two-dimensional code displayed by the first UX display module is scanned, the first UX display The module can send the notification information that the two-dimensional code is scanned to the first clone characteristic module, and in response to the notification information that the two-dimensional code is scanned, the first clone characteristic module sends Bluetooth opening information to the first Bluetooth module, instructing the Bluetooth module to establish Bluetooth connection.
在第二电子设备侧,响应于二维码扫描操作,第二电子设备的第二克隆特性模块向第二连接组件中的第二蓝牙模块发送蓝牙开启信息;响应于该蓝牙开启信息信息,该第二蓝牙模块开启,蓝牙模块扫描蓝牙消息。On the side of the second electronic device, in response to the two-dimensional code scanning operation, the second clone feature module of the second electronic device sends Bluetooth opening information to the second Bluetooth module in the second connection component; in response to the Bluetooth opening information, the The second bluetooth module is turned on, and the bluetooth module scans bluetooth messages.
之后,第一蓝牙模块与第二蓝牙模块建立蓝牙连接。其中,该蓝牙连接建立的具体过程可以依据现有的蓝牙连接标准实现,具体可以参见上文相关介绍,此处不再赘述。Afterwards, the first Bluetooth module establishes a Bluetooth connection with the second Bluetooth module. Wherein, the specific process of establishing the Bluetooth connection can be implemented according to the existing Bluetooth connection standard, and details can be found in the relevant introduction above, which will not be repeated here.
在一些实施例中,在第一电子设备侧,当第一蓝牙模块和第二蓝牙模块建立蓝牙连接后,第一蓝牙模块可以向第一信道协商模块发送蓝牙连接建立信息,指示蓝牙连接已完成。第一信道协商模块基于该蓝牙连接建立信息确定蓝牙连接建立完成后,可以执行以下操作:(1)查询自身支持的5G信道列表;(2)查询对端第二电子设备支持的5G信道列表。In some embodiments, on the side of the first electronic device, after the first Bluetooth module and the second Bluetooth module establish a Bluetooth connection, the first Bluetooth module may send Bluetooth connection establishment information to the first channel negotiation module, indicating that the Bluetooth connection has been completed . After the first channel negotiation module determines that the Bluetooth connection is established based on the Bluetooth connection establishment information, it can perform the following operations: (1) query the list of 5G channels supported by itself; (2) query the list of 5G channels supported by the second electronic device at the opposite end.
其中,第一信道协商模块执行查询自身支持的5G信道列表的过程可以包括:第一信道协商模块向第一短距Wi-Fi模块发送第一电子设备5G信道查询信息,以查询自身支持的5G信道;第一短距Wi-Fi模块接收到5G信道查询信息后,可以向第一信道协商模块反馈该第一电子设备支持的5G信道列表,该5G信道列表包括第一电子设备支持的至少一个5G信道。Wherein, the process of querying the 5G channel list supported by the first channel negotiation module may include: the first channel negotiation module sends the first
第一信道协商模块执行查询第二电子设备支持的5G信道列表的过程可以包括:第一信道协商模块向第一蓝牙模块发送第二电子设备5G信道查询信息;第一蓝牙模块接收到第二电子设备的5G信道查询信息后,可以经由蓝牙信道向第二蓝牙模块发送该5G信道查询信息。The process of querying the 5G channel list supported by the second electronic device by the first channel negotiation module may include: the first channel negotiation module sends the second
在一些实施例中,在第二电子设备侧,第二蓝牙模块接收到第二电子设备的5G信道查询信息后,可以向第二信道协商模块发送该5G信道查询信息;之后,第二信道协商模块可以向第二短距Wi-Fi模块发送该5G信道查询信息,以查询第二短距Wi-Fi模块中存储的第二电子设备支持的5G信道。在一种可能的实现方式下,当第二短距Wi-Fi模块不具有通信接口时,第二短距Wi-Fi模块无法成功获取第二信道协商模块发送的5G信道查询信息,继而第二信道协商模块也就无法成功获取第二短距Wi-Fi模块反馈的5G信道列表。在这种情况下,第二信道协商模块生成的5G信道列表,且该5G信道列表包括的5G信道为空。In some embodiments, on the side of the second electronic device, after the second Bluetooth module receives the 5G channel query information of the second electronic device, it can send the 5G channel query information to the second channel negotiation module; after that, the second channel negotiation The module may send the 5G channel query information to the second short-range Wi-Fi module, so as to query the 5G channels supported by the second electronic device stored in the second short-range Wi-Fi module. In a possible implementation, when the second short-distance Wi-Fi module does not have a communication interface, the second short-distance Wi-Fi module cannot successfully obtain the 5G channel query information sent by the second channel negotiation module, and then the second The channel negotiation module cannot successfully obtain the 5G channel list fed back by the second short-range Wi-Fi module. In this case, the 5G channel list generated by the second channel negotiation module, and the 5G channel included in the 5G channel list is empty.
在一些实施例中,第二信道协商模块可以将第二电子设备支持的5G信道列表发送至第二蓝牙模块;该第二蓝牙模块可以通过蓝牙信道将该5G信道列表发送至第一蓝牙模块。在一些实施例中,在第一电子设备侧,第一蓝牙模块接收到第二电子设备支持的5G信道列表后,可以将其发送至第一信道协商模块。第一信道协商模块可以根据该第一电子设备支持的5G信道列表和接收到的第二电子设备支持的5G信道列表,判断双方支持的5G信道集合是否存在交集,也即判断第一电子设备和第二电子设备是否存在共同支持的5G信道。In some embodiments, the second channel negotiation module can send the 5G channel list supported by the second electronic device to the second Bluetooth module; the second Bluetooth module can send the 5G channel list to the first Bluetooth module through the Bluetooth channel. In some embodiments, on the side of the first electronic device, after receiving the 5G channel list supported by the second electronic device, the first Bluetooth module may send it to the first channel negotiation module. The first channel negotiation module can determine whether there is an intersection between the 5G channel sets supported by the two parties according to the 5G channel list supported by the first electronic device and the received 5G channel list supported by the second electronic device, that is, to determine whether the first electronic device and the Whether there is a commonly supported 5G channel on the second electronic device.
在一种实现方式中,若双方支持的5G信道存在交集,则第一信道协商模块可以通过第一蓝牙模块,经由蓝牙信道与第二信道协商模块协商在交集中的某一5G信道上建立5GWi-Fi连接,然后在该5G信道上进行数据的传输过程。在一种实现方式中,第一克隆特性模块还可以向第一连接模块发送5G热点开启信息;该第一连接模块接收到5G热点开启信息后可以向第一短距Wi-Fi模块发送该5G热点开启信息,指示第一短距Wi-Fi模块在某一个双方均支持的5G信道上开启5G热点。之后,第一电子设备和第二电子设备分别通过第一短距Wi-Fi模块和第二短距Wi-Fi模块建立5GWi-Fi连接,最终使得第一电子设备和第二电子设备可以分别通过第一传输模块和第二传输模块在建立连接的5G信道上进行数据传输。In one implementation, if there is an intersection between the 5G channels supported by both parties, the first channel negotiation module can negotiate with the second channel negotiation module through the first Bluetooth module to establish a 5GWi on a certain 5G channel in the intersection. -Fi connection, and then carry out the data transmission process on the 5G channel. In one implementation, the first cloning feature module can also send 5G hotspot activation information to the first connection module; after receiving the 5G hotspot activation information, the first connection module can send the 5G hotspot activation information to the first short-distance Wi-Fi module. The hotspot activation information instructs the first short-distance Wi-Fi module to activate a 5G hotspot on a certain 5G channel supported by both parties. Afterwards, the first electronic device and the second electronic device respectively establish a 5G Wi-Fi connection through the first short-range Wi-Fi module and the second short-range Wi-Fi module, so that the first electronic device and the second electronic device can respectively pass through The first transmission module and the second transmission module perform data transmission on the 5G channel where the connection is established.
在另一种实现方式中,若双方支持的5G信道不存在交集(本申请实施例提供的数据传输的方法主要针对该情形),则第一信道协商模块可以生成5G能力查询信息,该5G能力查询信息用于查询第二电子设备是否支持5G Wi-Fi通信能力。第一信道协商模块将该5G能力查询信息发送至第一蓝牙模块;该第一蓝牙模块在接收到该5G能力查询信息后,可以通过蓝牙信道将该5G能力查询信息发送至第二蓝牙模块。In another implementation, if there is no intersection between the 5G channels supported by both parties (the data transmission method provided in the embodiment of this application is mainly for this situation), the first channel negotiation module can generate 5G capability query information, and the 5G capability The query information is used to query whether the second electronic device supports 5G Wi-Fi communication capability. The first channel negotiation module sends the 5G capability query information to the first Bluetooth module; after receiving the 5G capability query information, the first Bluetooth module can send the 5G capability query information to the second Bluetooth module through the Bluetooth channel.
在第二电子设备侧,第二蓝牙模块在接收到该5G能力查询信息后,将其发送至第二信道协商模块。该第二信道协商模块接收到该5G能力查询信息后,可以通过通用接口向第二Wi-Fi短距通信模块发送该5G能力查询信息,示例性的,5G能力查询的通用接口例如可以是:Wi-FiManager:is5GHzBandSupported()。第二短距Wi-Fi模块接收到该5G能力查询信息后,可以向第二信道协商模块反馈第二电子设备是否支持5GWi-Fi通信能力的结果。之后,第二信道协商模块可以将5G能力查询结果发送至第二蓝牙模块。第二蓝牙模块接收到该5G能力查询结果后,可以经由蓝牙信道将该结果发送给第一蓝牙模块。On the side of the second electronic device, after receiving the 5G capability query information, the second Bluetooth module sends it to the second channel negotiation module. After the second channel negotiation module receives the 5G capability query information, it can send the 5G capability query information to the second Wi-Fi short-distance communication module through a general interface. Exemplarily, the general interface for 5G capability query can be, for example: Wi-FiManager: is5GHzBandSupported(). After receiving the 5G capability query information, the second short-distance Wi-Fi module can feed back the result of whether the second electronic device supports 5G Wi-Fi communication capability to the second channel negotiation module. Afterwards, the second channel negotiation module may send the 5G capability query result to the second Bluetooth module. After receiving the 5G capability query result, the second bluetooth module can send the result to the first bluetooth module via the bluetooth channel.
在第一电子设备侧,第一蓝牙模块接收到5G能力查询结果后,可以将其发送至第一信道协商模块。On the side of the first electronic device, after receiving the 5G capability query result, the first Bluetooth module may send it to the first channel negotiation module.
在一些实施例中,若上述5G能力查询结果指示第二电子设备支持5G Wi-Fi通信能力,则第一信道协商模块可以在第一电子设备自身支持的5G信道中随机选择一个尝试与第二电子设备进行5G Wi-Fi连接。若连接成功,则后续第一电子设备和第二电子设备可以在该5G信道上进行数据传输;若未连接成功,则第一电子设备可以关闭5G热点,开启2.4G热点,在2.4G信道上与第二电子设备建立Wi-Fi连接。In some embodiments, if the above-mentioned 5G capability query result indicates that the second electronic device supports 5G Wi-Fi communication capability, the first channel negotiation module may randomly select one of the 5G channels supported by the first electronic device to try to communicate with the second Electronic devices make 5G Wi-Fi connections. If the connection is successful, the subsequent first electronic device and the second electronic device can perform data transmission on the 5G channel; if the connection is not successful, the first electronic device can turn off the 5G hotspot, turn on the 2.4G hotspot, Establish a Wi-Fi connection with the second electronic device.
或者,可选地,若未连接成功,则第一电子设备可以在自身支持的5G信道中随机选择其它信道,不断进行与第二电子设备建立5G Wi-Fi连接尝试,直至获取双方能够成功建立连接的5G信道。若经过尝试后,所有的该第一电子设备支持的5G信道均无法使双方成功建立连接,那么第一电子设备可以关闭5G热点,开启2.4G热点,在2.4G信道上与第二电子设备建立Wi-Fi连接。Or, optionally, if the connection is not successful, the first electronic device can randomly select other channels among the 5G channels supported by itself, and continue to try to establish a 5G Wi-Fi connection with the second electronic device until the two parties can successfully establish a Wi-Fi connection. Connected 5G channel. If after trying, all the 5G channels supported by the first electronic device fail to enable the two parties to successfully establish a connection, then the first electronic device can turn off the 5G hotspot, turn on the 2.4G hotspot, and establish a connection with the second electronic device on the 2.4G channel. Wi-Fi connection.
根据本申请实施例提供的数据传输的方法,通过在发送设备无法提供自身支持的5G信道的情况下,接收设备选择自身支持的5G信道尝试与发送设备建立连接,尝试连接成功时,双方则在5G信道上进行克隆数据传输,该方法能够提高克隆数据传输的效率,提升用户的使用体验。According to the data transmission method provided by the embodiment of the present application, when the sending device cannot provide the 5G channel supported by itself, the receiving device selects the 5G channel supported by itself to try to establish a connection with the sending device. Clone data transmission is performed on the 5G channel, which can improve the efficiency of clone data transmission and improve user experience.
示例性的,如图8所示,为本申请实施例提供的一种数据传输的方法的时序图。该方法包括以下步骤:Exemplarily, as shown in FIG. 8 , it is a sequence diagram of a data transmission method provided by the embodiment of the present application. The method includes the following steps:
S801,第一UX显示模块接收用户输入的第一操作。S801. The first UX display module receives a first operation input by a user.
其中,第一UX显示模块是第一电子设备安装的克隆应用中的模块。第一电子设备例如可以是换机克隆时,数据的接收设备(或称接收端),用于接收用户需要备份的数据,该第一电子设备例如可以是用户的新设备。Wherein, the first UX display module is a module in the clone application installed on the first electronic device. For example, the first electronic device may be a data receiving device (or called a receiving end) when the phone is replaced and cloned, and is used to receive the data that the user needs to back up. The first electronic device may be, for example, the user's new device.
第一操作例如可以是换机克隆场景下,用户通过第一电子设备安装的克隆应用输入的接收端流程触发操作,该第一操作例如可以是克隆应用的开启操作,或者也可以是克隆应用中旧设备类型选择操作(可对应于图5B所示的操作502)。The first operation can be, for example, a receiving-end process trigger operation input by the user through the clone application installed on the first electronic device in the scenario of changing the phone for cloning. The first operation can be, for example, the opening operation of the clone application, or it can also be the Old device type selection operation (may correspond to
首先,在接收端,第一电子设备可以执行以下步骤:First, at the receiving end, the first electronic device may perform the following steps:
S802,第一UX显示模块向该第一克隆特性模块发送接收端流程触发信息。S802. The first UX display module sends receiving end process trigger information to the first clone characteristic module.
其中,接收端流程触发信息用于指示第一克隆特性模块启动接收端的换机克隆流程。示例性的,该接收端的换机克隆流程可以包括:显示包括Wi-Fi热点连接信息的二维码、与第二电子设备建立蓝牙连接等。Wherein, the process trigger information of the receiving end is used to instruct the first cloning characteristic module to start the switching and cloning process of the receiving end. Exemplarily, the replacement and cloning process of the receiving end may include: displaying a two-dimensional code including Wi-Fi hotspot connection information, establishing a Bluetooth connection with the second electronic device, and the like.
S803,响应于接收端流程触发信息,第一克隆特性模块生成二维码信息。S803. In response to the process trigger information at the receiving end, the first clone characteristic module generates two-dimensional code information.
其中,该二维码信息包括第一电子设备Wi-Fi连接信息,比如Wi-Fi热点的SSID和密码等。具体地,该Wi-Fi连接信息可以是5G Wi-Fi热点的连接信息,可以包括5GWi-Fi热点的SSID和对应的密码。Wherein, the two-dimensional code information includes the Wi-Fi connection information of the first electronic device, such as the SSID and password of the Wi-Fi hotspot. Specifically, the Wi-Fi connection information may be connection information of a 5G Wi-Fi hotspot, and may include an SSID and a corresponding password of a 5G Wi-Fi hotspot.
S804,第一克隆特性模块向该第一UX显示模块发送二维码信息。S804. The first clone characteristic module sends the two-dimensional code information to the first UX display module.
S805,第一UX显示模块指示显示屏显示二维码。S805, the first UX display module instructs the display screen to display a two-dimensional code.
在一些实施例中,第一UX显示模块接收到二维码信息后,可以指示显示屏显示对应的二维码,该二维码用于指示Wi-Fi连接信息(如Wi-Fi热点的SSID和对应的密码)。示例性的,第一电子设备显示二维码的界面例如可以如图5C所示。In some embodiments, after the first UX display module receives the two-dimensional code information, it can instruct the display screen to display the corresponding two-dimensional code, which is used to indicate Wi-Fi connection information (such as the SSID of the Wi-Fi hotspot) and the corresponding password). Exemplarily, the interface where the first electronic device displays the two-dimensional code may be as shown in FIG. 5C , for example.
之后,在发送端,第二电子设备可以执行以下步骤:Afterwards, at the sending end, the second electronic device may perform the following steps:
S806,第二UX显示模块接收用户输入的第二操作。S806. The second UX display module receives a second operation input by the user.
其中,第二UX显示模块为第二电子设备安装的克隆应用中的模块。第二电子设备可以是换机克隆时,数据的发送设备(或称发送端),用于发送用户需要备份的数据,该第二电子设备例如可以是用户的旧设备。Wherein, the second UX display module is a module in the clone application installed on the second electronic device. The second electronic device may be a data sending device (or called the sending end) when the phone is replaced and cloned, and is used to send the data that the user needs to back up. The second electronic device may be, for example, the user's old device.
第二操作例如可以是换机克隆场景下,用户通过第二电子设备安装的克隆应用输入的发送端流程触发操作。示例性的,该第二操作可以是用户通过第二电子设备安装的克隆应用输入的二维码扫描界面开启操作,二维码扫描界面例如可以如图6所示。The second operation may be, for example, a sender process trigger operation input by the user through a cloning application installed on the second electronic device in the scenario of changing the phone for cloning. Exemplarily, the second operation may be an operation of starting the two-dimensional code scanning interface input by the user through the cloning application installed on the second electronic device, and the two-dimensional code scanning interface may be as shown in FIG. 6 , for example.
S807,第二UX显示模块向第二克隆特性模块发送发送端流程触发信息。S807. The second UX display module sends process trigger information at the sending end to the second clone feature module.
S808,第二克隆特性模块响应于发送端流程触发信息指示摄像头开启。S808, the second clone characteristic module instructs the camera to be turned on in response to the process trigger information at the sending end.
示例性的,第二克隆特性模块可以响应于发送端流程触发信息指示第二电子设备的摄像头(如后置摄像头)开启,以用于接下来进行二维码扫描。Exemplarily, the second cloning characteristic module may respond to the process trigger information at the sending end to instruct the camera (such as the rear camera) of the second electronic device to be turned on for scanning the QR code next.
S809,第二克隆特性模块向第二UX显示模块发送二维码扫描界面开启信息。S809. The second cloning feature module sends information about opening the two-dimensional code scanning interface to the second UX display module.
S810,第二UX显示模块指示显示屏显示二维码扫描界面。S810, the second UX display module instructs the display screen to display a two-dimensional code scanning interface.
在一些实施例中,第二UX显示模块接收到二维码扫描界面开启信息后,可以基于该信息指示显示屏显示二维码扫描界面。示例性的,第二电子设备显示的二维码扫描界面例如可以如图6所示。In some embodiments, the second UX display module may instruct the display screen to display the two-dimensional code scanning interface based on the information after receiving the two-dimensional code scanning interface opening information. Exemplarily, the two-dimensional code scanning interface displayed by the second electronic device may be as shown in FIG. 6 , for example.
S811,第二电子设备扫描第一电子设备的二维码,并获取二维码指示的Wi-Fi连接信息。S811. The second electronic device scans the two-dimensional code of the first electronic device, and acquires Wi-Fi connection information indicated by the two-dimensional code.
第二电子设备可以通过二维码扫描界面扫描第一电子设备显示的二维码。之后,第二UX显示模块可以获取二维码指示的Wi-Fi热点连接信息,该Wi-Fi热点连接信息可以包括第一电子设备5G Wi-Fi热点的SSID和对应的密码。The second electronic device may scan the two-dimensional code displayed by the first electronic device through the two-dimensional code scanning interface. Afterwards, the second UX display module can obtain the Wi-Fi hotspot connection information indicated by the two-dimensional code, and the Wi-Fi hotspot connection information can include the SSID and corresponding password of the 5G Wi-Fi hotspot of the first electronic device.
S812,第二UX显示模块向第二克隆特性模块发送Wi-Fi连接信息。S812. The second UX display module sends Wi-Fi connection information to the second clone feature module.
S813,第二克隆特性模块向第二短距Wi-Fi模块发送Wi-Fi连接信息。S813. The second clone feature module sends Wi-Fi connection information to the second short-range Wi-Fi module.
S814,第二短距Wi-Fi模块根据Wi-Fi连接信息尝试连接该Wi-Fi连接信息指示的Wi-Fi。S814. The second short-range Wi-Fi module attempts to connect to the Wi-Fi indicated by the Wi-Fi connection information according to the Wi-Fi connection information.
在一些实施例中,如果第二电子设备支持5G Wi-Fi通信能力,则第二短距Wi-Fi模块接收到Wi-Fi连接信息后,可以周期性地遍历自身支持的5G信道,尝试与第一短距Wi-Fi模块建立Wi-Fi连接。示例性的,第二电子设备可以在自身支持的某一5G信道上,发送Wi-Fi连接请求消息,该Wi-Fi连接请求消息可以包括该第一电子设备Wi-Fi热点的SSID和对应的密码;当在该5G信道上未成功建立Wi-Fi连接,第二电子设备可以切换至自身支持的其它5G信道重新发送Wi-Fi连接请求消息。当遍历该第二电子设备支持的所有5G信道后,仍未成功地与第一电子设备建立5G Wi-Fi连接时,该第二电子设备可以间隔一定时间间隔,再次进行上述Wi-Fi连接请求过程。In some embodiments, if the second electronic device supports 5G Wi-Fi communication capability, after receiving the Wi-Fi connection information, the second short-distance Wi-Fi module can periodically traverse the 5G channels supported by itself, and try to communicate with The first short-range Wi-Fi module establishes a Wi-Fi connection. Exemplarily, the second electronic device may send a Wi-Fi connection request message on a certain 5G channel supported by itself, and the Wi-Fi connection request message may include the SSID of the Wi-Fi hotspot of the first electronic device and the corresponding Password; when the Wi-Fi connection is not successfully established on the 5G channel, the second electronic device can switch to other 5G channels supported by itself and resend the Wi-Fi connection request message. When traversing all the 5G channels supported by the second electronic device, but still fails to establish a 5G Wi-Fi connection with the first electronic device, the second electronic device can make the above-mentioned Wi-Fi connection request again at a certain time interval process.
需要说明的是,在第一电子设备侧,第一克隆特性模块向第一UX显示模块发送二维码信息的操作,可以触发该第一克隆特性模块向第一蓝牙模块发送蓝牙开启信息。在第二电子设备侧,第二克隆特定模块获取到Wi-Fi连接信息,可以触发该第二克隆特性模块向第二蓝牙模块发送蓝牙开启信息。之后,第一电子设备和第二电子设备可以执行蓝牙连接建立过程。It should be noted that, on the side of the first electronic device, the operation of the first cloning feature module sending the two-dimensional code information to the first UX display module may trigger the first cloning feature module to send Bluetooth activation information to the first Bluetooth module. On the side of the second electronic device, the second cloning specific module acquires the Wi-Fi connection information, which can trigger the second cloning characteristic module to send Bluetooth enabling information to the second Bluetooth module. Afterwards, the first electronic device and the second electronic device may perform a Bluetooth connection establishment process.
S815,第一电子设备和第二电子设备执行蓝牙连接建立过程。S815, the first electronic device and the second electronic device perform a Bluetooth connection establishment process.
示例性的,该蓝牙连接建立过程可以参见图9所示的示意性流程图,具体过程将在下文进行介绍,此处暂不详述。For example, the bluetooth connection establishment process can refer to the schematic flowchart shown in FIG. 9 , and the specific process will be introduced below, and will not be described in detail here.
在一些实施例中,第一电子设备和第二电子设备建立蓝牙连接后,第一电子设备可以执行以下步骤:In some embodiments, after the first electronic device and the second electronic device establish a Bluetooth connection, the first electronic device may perform the following steps:
S816,第一电子设备执行5G信道列表比对过程。S816. The first electronic device performs a 5G channel list comparison process.
示例性的,该5G信道列表比对过程可以参见图10所示的示意性流程图,具体过程将在下文进行介绍,此处暂不详述。Exemplarily, the 5G channel list comparison process can refer to the schematic flowchart shown in FIG. 10 , and the specific process will be introduced below, and will not be described in detail here.
需要说明的是,第一电子设备比对双方支持的5G信道列表后,获取的比对结果可能会存在两种情形:情形1A,双方5G信道列表有交集;情形1B,双方5G信道列表无交集。It should be noted that after the first electronic device compares the 5G channel lists supported by both parties, there may be two situations in the obtained comparison results: in case 1A, the 5G channel lists of both parties have intersection; in case 1B, the 5G channel lists of both parties have no intersection .
以具体信道列表示例介绍情形1A和情形1B。在情形1A时,假设第一电子设备支持的5G信道列表为:[36 38 40 44 46 132 153 157 161 165],第二电子设备支持的5G信道列表为:[36 40 44 48 149 463 159 161 165],则第一电子设备和第二电子设备支持的5G信道交集为:[36 40 44 48 153 161 165]。在情形1B时,假设第一电子设备支持的5G信道列表为:[40 44 48 128 132 157 165],第二电子设备设备支持的5G信道列表为:[36 4246 149 153 155 161],此时,第一电子设备和第二电子设备支持的5G信道交集为[],也即双方共同支持的5G信道集合为空。其中,上述信道列表中的元素为信道编号(channelnumber)。Scenario 1A and Scenario 1B are introduced with specific channel list examples. In case 1A, suppose the 5G channel list supported by the first electronic device is: [36 38 40 44 46 132 153 157 161 165], and the 5G channel list supported by the second electronic device is: [36 40 44 48 149 463 159 161 165], the intersection of the 5G channels supported by the first electronic device and the second electronic device is: [36 40 44 48 153 161 165]. In case 1B, suppose the 5G channel list supported by the first electronic device is: [40 44 48 128 132 157 165], the 5G channel list supported by the second electronic device is: [36 4246 149 153 155 161], at this time , the intersection of 5G channels supported by the first electronic device and the second electronic device is [], that is, the set of 5G channels supported by both parties is empty. Wherein, the elements in the above channel list are channel numbers (channelnumber).
可选地,当第二电子设备反馈的5G信道列表为空时,也可以采用其它方式表示,比如在第二电子设备向第一电子设备发送的信道响应信息中携带特定信息(如null)指示信道列表为空,本申请实施例对此不作限定。Optionally, when the 5G channel list fed back by the second electronic device is empty, it can also be expressed in other ways, such as carrying specific information (such as null) indication in the channel response information sent by the second electronic device to the first electronic device The channel list is empty, which is not limited in this embodiment of the present application.
针对情形1A,也即当第一电子设备和第二电子设备支持5G信道列表存在交集时,该第一电子设备可以执行以下步骤:For scenario 1A, that is, when the first electronic device and the second
S817,第一信道协商模块向第一短距Wi-Fi模块发送5G热点开启信息。S817. The first channel negotiation module sends 5G hotspot activation information to the first short-distance Wi-Fi module.
其中,5G热点开启信息用于指示第一短距Wi-Fi模块开启5G热点。Wherein, the 5G hotspot activation information is used to instruct the first short-distance Wi-Fi module to enable the 5G hotspot.
示例性的,第一信道协商模块向第一短距Wi-Fi模块发送5G热点开启信息的具体过程可以包括:第一信道协商模块首先向第一连接模块发送该5G热点开启信息,之后,第一连接模块向第一Wi-Fi模块发送该5G热线开启信息(图8未示出第一连接模块)。Exemplarily, the specific process for the first channel negotiation module to send the 5G hotspot activation information to the first short-distance Wi-Fi module may include: the first channel negotiation module first sends the 5G hotspot activation information to the first connection module, and then, the second A connection module sends the 5G hotline activation information to the first Wi-Fi module (the first connection module is not shown in FIG. 8 ).
S818,第一短距Wi-Fi模块进行5G信道筛选,开启5G热点。S818, the first short-distance Wi-Fi module performs 5G channel screening and enables 5G hotspots.
在一些实施例中,第一短距Wi-Fi模块在接收到5G热点开启信息后,可以在第一电子设备和第二电子设备支持的5G信道交集中进行5G信道筛选,并在筛选出的5G信道上开启5G热点。示例性的,当第一电子设备和第二电子设备的5G信道列表交集包括的5G信道有多个时,第一电子设备可以选择在其中信号强度最优的5G信道上开启5G热点。In some embodiments, after the first short-distance Wi-Fi module receives the 5G hotspot activation information, it can perform 5G channel screening in the intersection of 5G channels supported by the first electronic device and the second electronic device, and
针对情形1B,也即当第一电子设备和第二电子设备支持5G信道不存在交集(比如第二电子设备反馈的5G信道列表为空)时,该第一电子设备可以执行以下步骤:For situation 1B, that is, when the first electronic device and the second
S819,第一电子设备查询第二电子设备是否支持5G能力。S819. The first electronic device queries whether the second electronic device supports 5G capabilities.
示例性的,该第二电子设备5G能力查询过程可以参见图11所示的示意性流程图,具体过程将在下文进行介绍,此处暂不详述。Exemplarily, the 5G capability inquiry process of the second electronic device may refer to the schematic flowchart shown in FIG. 11 , and the specific process will be introduced below, and will not be described in detail here.
其中,第二电子设备的5G能力查询结果可以包括以下情形:情形2A,第二电子设备不支持5G能力;情形2B,第二电子设备支持5G能力。Wherein, the 5G capability query result of the second electronic device may include the following situations: situation 2A, the second electronic device does not support 5G capability; situation 2B, the second electronic device supports 5G capability.
针对情形2A,也即第二电子设备不支持5G能力时,第一电子设备可以执行以下步骤:For situation 2A, that is, when the second electronic device does not support 5G capability, the first electronic device may perform the following steps:
S820,第一电子设备开启2.4G热点。S820, the first electronic device turns on the 2.4G hotspot.
针对情形2B,也即第二电子设备支持5G能力时,第一电子设备可以执行以下步骤:For scenario 2B, that is, when the second electronic device supports 5G capability, the first electronic device may perform the following steps:
S821,第一电子设备开启5G热点,尝试建立5G Wi-Fi连接。S821, the first electronic device turns on the 5G hotspot, and tries to establish a 5G Wi-Fi connection.
S822,第一电子设备和第二电子设备创建数据传输通道。S822. The first electronic device and the second electronic device create a data transmission channel.
示例性的,上述情形2A中的步骤S820和情形2B中的步骤S821,以及步骤S822的实现过程可以参见下文图12至图14所示的示意性流程图,具体过程将在下文进行介绍,此处暂不详述。Exemplarily, the implementation process of step S820 in the above situation 2A, step S821 in the situation 2B, and step S822 can refer to the schematic flowcharts shown in Figure 12 to Figure 14 below, the specific process will be introduced below, here Not detailed yet.
需要说明的是,在情形2A下,也即第二电子设备不支持5G能力时,步骤S822第一电子设备和第二电子设备创建的数据传输通道为2.4G信道,该2.4G信道为第一电子设备和第二电子设备共同支持的2.4G信道。其中,第一电子设备和第二电子设备建立2.4G信道的过程可以参见现有流程,此处不再赘述。在情形2B下,也即第二电子设备支持5G能力时,步骤S822中第一电子设备和第二电子设备穿件的数据传输通道可能为5G信道,该5G信道为第一电子设备和第二电子设备共同支持的某一5G信道。It should be noted that in case 2A, that is, when the second electronic device does not support 5G capabilities, the data transmission channel created by the first electronic device and the second electronic device in step S822 is a 2.4G channel, and the 2.4G channel is the first A 2.4G channel jointly supported by the electronic device and the second electronic device. Wherein, the process of establishing a 2.4G channel between the first electronic device and the second electronic device can refer to the existing process, and will not be repeated here. In case 2B, that is, when the second electronic device supports 5G capabilities, the data transmission channel between the first electronic device and the second electronic device in step S822 may be a 5G channel, and the 5G channel is the channel between the first electronic device and the second electronic device. A certain 5G channel commonly supported by electronic devices.
在一些实施例中,当第一电子设备和第二电子设备建立数据传输通道之后,第二克隆特性模块可以支持第二UX显示模块显示传输数据选择界面。示例性的,该传输数据显示界面可以如图16A所示,包括可供用户选择的多个应用程序图标以及选择框,如联系人图标、信息图标、通话记录图标、相册图标、邮件图标、微信图标及其分别对应的选择框。此外,每一个应用程序下方还可以分别显示该应用程序包括的信息数量以及大小,应用程序显示区域下方还可以显示全选框和取消框,以及开始传输控件和取消传输控件。In some embodiments, after the data transmission channel is established between the first electronic device and the second electronic device, the second cloning characteristic module may support the second UX display module to display the transmission data selection interface. Exemplarily, the transmission data display interface may be as shown in Figure 16A, including a plurality of application program icons and selection boxes for the user to choose, such as a contact icon, an information icon, a call record icon, an album icon, a mail icon, WeChat Icons and their corresponding selection boxes. In addition, the amount and size of the information contained in the application can be displayed under each application, and a check box and a cancel box can also be displayed under the display area of the application, as well as a control for starting transmission and a control for canceling transmission.
需要说明的是,图16A所示的传输数据选择界面所包括的应用程序图标类型以及各个应用程序对应的信息数量和大小仅为示例,并不作为限定。It should be noted that the types of application program icons included in the transmission data selection interface shown in FIG. 16A and the information quantity and size corresponding to each application program are only examples, and are not intended to be limiting.
S823,第二电子设备接收用户输入的第三操作。S823. The second electronic device receives a third operation input by the user.
其中,第三操作为用户输入的传输数据选择操作,该第三操作例如可以是用户针对图16A所示界面中的应用程序对应的选择框的点击操作。以用户需要传输联系人、信息、通话记录、相册和邮件中的数据为例,该第三操作可以是用户点击联系人图标、信息图标、通话记录图标、相册图标和邮件图标前方选择框的操作。Wherein, the third operation is a transmission data selection operation input by the user, and the third operation may be, for example, the user's click operation on the selection box corresponding to the application program in the interface shown in FIG. 16A . Taking the user's need to transfer data in contacts, messages, call records, photo albums, and emails as an example, the third operation can be the operation of the user clicking the selection box in front of the contact icon, message icon, call record icon, album icon, and mail icon .
在一些实施例中,用户选择传输数据后,第一电子设备和第二电子设备可以执行以下步骤:In some embodiments, after the user chooses to transfer data, the first electronic device and the second electronic device may perform the following steps:
S824,第一电子设备和第二电子设备进行数据传输。S824, the first electronic device and the second electronic device perform data transmission.
示例性的,步骤S824的实现过程可以参见下文图15所示的示意性流程图,具体过程将在下文进行介绍,此处暂不详述。Exemplarily, the implementation process of step S824 can refer to the schematic flowchart shown in FIG. 15 below, and the specific process will be introduced below, and will not be described in detail here.
根据本申请实施例提供的数据传输的方法,通过在发送设备无法提供自身支持的5G信道的情况下,接收设备选择自身支持的5G信道尝试与发送设备建立连接,尝试连接成功时,双方则在5G信道上进行克隆数据传输,能够提高克隆数据传输的效率,提升用户的使用体验。According to the data transmission method provided by the embodiment of the present application, when the sending device cannot provide the 5G channel supported by itself, the receiving device selects the 5G channel supported by itself to try to establish a connection with the sending device. Clone data transmission on the 5G channel can improve the efficiency of clone data transmission and improve user experience.
以下结合附图,对上述步骤S815中的蓝牙连接建立过程进行介绍。示例性的,如图9所示,为第一电子设备和第二电子设备建立蓝牙连接过程的示意性流程图。该过程包括以下步骤:The Bluetooth connection establishment process in the above step S815 will be introduced below with reference to the accompanying drawings. Exemplarily, as shown in FIG. 9 , it is a schematic flowchart of a process of establishing a Bluetooth connection between the first electronic device and the second electronic device. The process includes the following steps:
首先,在接收端,第一电子设备可以执行以下步骤:First, at the receiving end, the first electronic device may perform the following steps:
S8151,第一克隆特性模块向该第一蓝牙模块发送蓝牙开启信息。S8151. The first clone feature module sends Bluetooth enabling information to the first Bluetooth module.
在一些实施例中,第一克隆特性模块向第一UX显示模块发送二维码的操作(对应于上述步骤S804),可以触发该第一克隆特性模块向第一蓝牙模块发送蓝牙开启信息,该蓝牙开启信息用于指示第一蓝牙模块开启蓝牙功能。更加具体地,该蓝牙开启信息可以用于指示第一蓝牙模块执行主设备的蓝牙连接功能。In some embodiments, the operation of the first cloning feature module sending a two-dimensional code to the first UX display module (corresponding to the above step S804) may trigger the first cloning feature module to send Bluetooth activation information to the first Bluetooth module, which The bluetooth enabling information is used to instruct the first bluetooth module to enable the bluetooth function. More specifically, the Bluetooth enabling information may be used to instruct the first Bluetooth module to perform the Bluetooth connection function of the master device.
S8152,响应于蓝牙开启信息,第一蓝牙模块发送蓝牙广播。S8152. In response to the Bluetooth enabling information, the first Bluetooth module sends a Bluetooth broadcast.
相应地,在发送端,第二电子设备可以执行以下步骤:Correspondingly, at the sending end, the second electronic device may perform the following steps:
S8153,第二克隆特性模块向第二蓝牙模块发送蓝牙开启信息。S8153. The second clone feature module sends Bluetooth enabling information to the second Bluetooth module.
在一些实施例中,第二克隆特性模块获取Wi-Fi连接信息的操作(对应于上述步骤S812),可以触发该第二克隆特性模块向该第二电子设备的第二蓝牙模块发送蓝牙开启信息,该蓝牙开启信息用于指示蓝牙模块开启蓝牙功能。更加具体地,该蓝牙开启信息可以用于指示第二蓝牙模块执行从设备的蓝牙连接功能。In some embodiments, the operation of the second cloning characteristic module to obtain Wi-Fi connection information (corresponding to the above step S812) may trigger the second cloning characteristic module to send Bluetooth activation information to the second Bluetooth module of the second electronic device , the bluetooth enabling information is used to instruct the bluetooth module to enable the bluetooth function. More specifically, the Bluetooth enabling information may be used to instruct the second Bluetooth module to perform the Bluetooth connection function of the slave device.
S8154,响应于蓝牙开启信息,第二蓝牙模块进行蓝牙扫描。S8154. In response to the Bluetooth enabling information, the second Bluetooth module performs Bluetooth scanning.
S8155,第二蓝牙模块和第一蓝牙模块建立蓝牙连接。S8155. Establish a Bluetooth connection between the second Bluetooth module and the first Bluetooth module.
其中,蓝牙连接建立的具体过程可以参见上文相关介绍,此处不再赘述。Wherein, the specific process of establishing the Bluetooth connection can refer to the relevant introduction above, and will not be repeated here.
需要说明的是,本申请实施例以第一电子设备作为主设备,第二电子设备作为从设备为例对蓝牙连接建立的过程进行介绍。但在另一些实施例中,在该蓝牙连接建立过程中,也可以是第一电子设备作为从设备,第二电子设备作为主设备,本申请实施例对此不作限定。It should be noted that, in this embodiment of the present application, the process of establishing a Bluetooth connection is introduced by taking the first electronic device as a master device and the second electronic device as a slave device as an example. However, in some other embodiments, during the establishment of the Bluetooth connection, the first electronic device may also be used as a slave device, and the second electronic device may be used as a master device, which is not limited in this embodiment of the present application.
还需要说明的是,第一电子设备和第二电子设备建立的蓝牙连接主要用于双方协商进行Wi-Fi信道协商,如第一电子设备可以通过该蓝牙信道查询对端支持的5G信道、是否支持5G能力等等。本申请实施例仅以蓝牙连接为例,但在实际应用中,该通信连接也可以是能够使第一电子设备和第二电子设备交互信道协商相关信息的其它类型的通信连接。It should also be noted that the Bluetooth connection established by the first electronic device and the second electronic device is mainly used for negotiation between the two parties for Wi-Fi channel negotiation. For example, the first electronic device can query the 5G channel supported by the peer through the Bluetooth channel,
S8156,第一蓝牙模块向第一信道协商模块发送蓝牙连接建立信息,该蓝牙连接建立信息用于指示蓝牙连接建立完成。S8156. The first Bluetooth module sends Bluetooth connection establishment information to the first channel negotiation module, where the Bluetooth connection establishment information is used to indicate that the Bluetooth connection establishment is completed.
当第一信道协商模块接收到蓝牙连接信息后,可以响应于该蓝牙连接信息执行5G信道比对过程(也即上述步骤S816)。以下结合图10,对上述步骤S816中的5G信道列表比对过程进行介绍。示例性的,该过程包括以下步骤:After the first channel negotiating module receives the Bluetooth connection information, it may execute a 5G channel comparison process in response to the Bluetooth connection information (that is, the above step S816). The following describes the comparison process of the 5G channel list in step S816 with reference to FIG. 10 . Exemplarily, the process includes the following steps:
在接收端,第一电子设备可以执行以下步骤:At the receiving end, the first electronic device may perform the following steps:
S8161,第一信道协商模块向第一蓝牙模块发送第一5G信道查询信息,该第一5G信道查询信息用于查询第二电子设备支持的5G信道。S8161. The first channel negotiation module sends first 5G channel query information to the first Bluetooth module, where the first 5G channel query information is used to query 5G channels supported by the second electronic device.
在一些实施例中,第一信道协商模块可以响应于在步骤S8156中接收到的蓝牙连接建立信息,向第一蓝牙模块发送第一5G信道查询信息,该第一5G信道查询信息用于查询第二电子设备支持的5G信道列表(或称5G信道集合)。In some embodiments, the first channel negotiation module may send the first 5G channel query information to the first Bluetooth module in response to the Bluetooth connection establishment information received in step S8156, and the first 5G channel query information is used to query the first 5G channel query information. 2. A list of 5G channels supported by the electronic device (or a set of 5G channels).
S8162,第一蓝牙模块通过蓝牙信道向第二蓝牙模块发送第一5G信道查询信息。S8162. The first Bluetooth module sends first 5G channel query information to the second Bluetooth module through the Bluetooth channel.
在发送端,第二电子设备可以执行以下步骤:At the sending end, the second electronic device may perform the following steps:
S8163,第二蓝牙模块向该第二信道协商模块发送第一5G信道查询信息。S8163. The second Bluetooth module sends first 5G channel query information to the second channel negotiation module.
S8164,第二信道协商模块向第二短距Wi-Fi模块发送该第一5G信道查询信息。S8164. The second channel negotiation module sends the first 5G channel query information to the second short-range Wi-Fi module.
在一些实施例中,第二信道协商模块响应于第一5G信道查询信息,向第二短距Wi-Fi模块查询第二电子设备支持的5G信道。In some embodiments, the second channel negotiation module queries the second short-range Wi-Fi module for 5G channels supported by the second electronic device in response to the first 5G channel query information.
在一些实施例中,当第二电子设备不具有查询5G信道的通用接口时,第二信道协商模块无法获取成功向第二短距Wi-Fi模块发送该5G信道查询信息,也无法成功获取第二短距Wi-Fi模块反馈的第二电子设备支持的5G信道。此时,该第二信道协商模块可以生成5G信道响应信息,该5G信道响应信息包括的5G信道列表为空,也即5G信道列表不包括第二电子设备支持的5G信道。In some embodiments, when the second electronic device does not have a general interface for querying 5G channels, the second channel negotiation module cannot successfully send the 5G channel query information to the second short-distance Wi-Fi module, nor can it successfully obtain the 5G channel query information. The 5G channel supported by the second electronic device fed back by the two short-distance Wi-Fi modules. At this time, the second channel negotiation module may generate 5G channel response information, and the 5G channel list included in the 5G channel response information is empty, that is, the 5G channel list does not include the 5G channels supported by the second electronic device.
需要说明的是,在实际应用中,当克隆应用是第二电子设备安装的第三方应用,并且第二电子设备不具有用于查询5G信道的通用接口时,那么在换机克隆过程中,即使第二电子设备安装了克隆应用,该克隆应用也无法查询到第二电子设备支持的5G信道列表,进而也就无法使第一电子设备基于双方支持的5G信道交集选取用于数据传输的5G信道。本申请实施例提供的数据传输的方法可以解决该场景下无法协商5G信道的问题。因而,本实施例主要针对第一电子设备无法查询到第二电子设备支持的5G信道的情形(如第二电子设备反馈的5G信道列表为空的情形)进行介绍。It should be noted that, in practical applications, when the cloning application is a third-party application installed on the second electronic device, and the second electronic device does not have a general interface for querying 5G channels, then during the cloning process of switching phones, even The second electronic device has a cloning application installed, and the cloning application cannot query the list of 5G channels supported by the second electronic device, and thus cannot enable the first electronic device to select a 5G channel for data transmission based on the intersection of 5G channels supported by both parties . The data transmission method provided by the embodiment of the present application can solve the problem that the 5G channel cannot be negotiated in this scenario. Therefore, this embodiment mainly introduces the situation where the first electronic device cannot query the 5G channels supported by the second electronic device (such as the situation where the 5G channel list fed back by the second electronic device is empty).
S8165,第二信道协商模块未查询到第二电子设备支持的5G信道时,生成第一5G信道响应信息,该第一5G信道响应信息包括第二电子设备支持的5G信道列表且该5G信道列表为空。S8165. When the second channel negotiation module does not find a 5G channel supported by the second electronic device, generate first 5G channel response information, the first 5G channel response information includes a list of 5G channels supported by the second electronic device and the 5G channel list Is empty.
S8166,第二信道协商模块向第二蓝牙模块发送第一5G信道响应信息。S8166. The second channel negotiation module sends the first 5G channel response information to the second Bluetooth module.
S8167,第二蓝牙模块通过蓝牙信道向第一蓝牙模块发送第一5G信道响应信息。S8167. The second Bluetooth module sends the first 5G channel response information to the first Bluetooth module through the Bluetooth channel.
在接收端,第一电子设备可以执行以下步骤:At the receiving end, the first electronic device may perform the following steps:
S8168,第一蓝牙模块向第一信道协商模块发送第一5G信道响应信息。S8168. The first Bluetooth module sends first 5G channel response information to the first channel negotiation module.
在一些实施例中,第一信道协商模块可以根据该5G信道响应信息获取第二电子设备支持的5G信道列表。In some embodiments, the first channel negotiation module may obtain a list of 5G channels supported by the second electronic device according to the 5G channel response information.
S8169,第一信道协商模块向第一短距Wi-Fi模块发送第二5G信道查询信息,该第二5G信道查询信息用于查询第一电子设备支持的5G信道。S8169. The first channel negotiation module sends second 5G channel query information to the first short-distance Wi-Fi module, where the second 5G channel query information is used to query 5G channels supported by the first electronic device.
S81610,第一短距Wi-Fi模块向第一信道发送第二5G信道响应信息,该第二5G信道响应信息包括第一电子设备支持的5G信道列表。S81610. The first short-distance Wi-Fi module sends second 5G channel response information to the first channel, where the second 5G channel response information includes a list of 5G channels supported by the first electronic device.
需要说明的是,第一电子设备获取自身自持的5G信道列表的步骤(即步骤S8169和步骤S81610)并不仅限于在获取第二电子设备的5G信道列表(对应于步骤S8161至步骤S8168)之后执行。在另一些实施例中,第一电子设备查询自身5G信道列表的操作可以与查询第二电子设备5G信道列表的操作同时进行,或者在查询第二电子设备5G信道列表之前进行,本申请实施例对此不作限定。It should be noted that the step of the first electronic device obtaining its own 5G channel list (that is, step S8169 and step S81610) is not limited to performing after obtaining the 5G channel list of the second electronic device (corresponding to step S8161 to step S8168) . In other embodiments, the operation of the first electronic device to query its own 5G channel list can be performed simultaneously with the operation of querying the 5G channel list of the second electronic device, or before querying the 5G channel list of the second electronic device. There is no limit to this.
S81611,第一信道协商模块比较第一电子设备支持的5G信道列表和第二电子设备支持的5G信道列表,确定双方共同支持的5G信道集合为空。S81611. The first channel negotiation module compares the list of 5G channels supported by the first electronic device with the list of 5G channels supported by the second electronic device, and determines that the set of 5G channels supported by both parties is empty.
举例来说,假设第一电子设备支持的5G信道列表是:[36 38 40 44 46 132 153157 161 165],第二电子设备支持的5G信道列表为空,也即[],那么第一信道协商模块可以根据第一电子设备支持的5G信道列表和第二电子设备支持的5G信道列表确定双方共同支持的5G信道集合为空[]。或者,当第一信道响应信息携带特定信息(如null)指示第二电子设备的5G信道列表为空时,那么第一信道协商模块可以根据第一电子设备支持的5G信道列表和第二电子设备支持的5G信道列表确定双方共同支持的5G信道集合为空。For example, suppose the 5G channel list supported by the first electronic device is: [36 38 40 44 46 132 153157 161 165], and the 5G channel list supported by the second electronic device is empty, that is, [], then the first channel negotiation The module may determine that the 5G channel set supported by both parties is empty[] according to the 5G channel list supported by the first electronic device and the 5G channel list supported by the second electronic device. Or, when the first channel response information carries specific information (such as null) indicating that the 5G channel list of the second electronic device is empty, then the first channel negotiation module may use the 5G channel list supported by the first electronic device and the second electronic device The list of supported 5G channels determines that the set of 5G channels jointly supported by both parties is empty.
当第一电子设备和第二电子设备支持5G信道不存在交集(比如第二电子设备反馈的5G信道列表为空)时,第一电子设备可以向第二电子设备查询5G能力(对应于上述步骤S819)。以下结合图11,对上述步骤S819中的第二电子设备的5G能力查询过程进行介绍。示例性的,该过程包括以下步骤:When there is no overlap between the 5G channels supported by the first electronic device and the second electronic device (for example, the 5G channel list fed back by the second electronic device is empty), the first electronic device can query the 5G capability of the second electronic device (corresponding to the above steps S819). The following describes the 5G capability inquiry process of the second electronic device in step S819 with reference to FIG. 11 . Exemplarily, the process includes the following steps:
在接收端,第一电子设备可以执行以下步骤:At the receiving end, the first electronic device may perform the following steps:
S8181,第一信道协商模块向第一蓝牙模块发送5G能力查询信息,该5G能力查询信息用于查询第二电子设备是否支持5G能力。S8181. The first channel negotiation module sends 5G capability query information to the first Bluetooth module, where the 5G capability query information is used to query whether the second electronic device supports 5G capability.
在一些实施例中,第一信道协商模块在步骤S81611中确定双方共同支持的5G信道集合为空时,可以向第一蓝牙模块发送该5G能力查询信息。In some embodiments, when the first channel negotiation module determines in step S81611 that the 5G channel set supported by both parties is empty, it may send the 5G capability query information to the first Bluetooth module.
S8182,第一蓝牙模块经由蓝牙信道向第二蓝牙模块发送5G能力查询信息。S8182. The first Bluetooth module sends 5G capability query information to the second Bluetooth module via the Bluetooth channel.
在发送端,第二电子设备可以执行以下步骤:At the sending end, the second electronic device may perform the following steps:
S8183,第二蓝牙模块向第二信道协商模块发送5G能力查询信息。S8183. The second Bluetooth module sends 5G capability query information to the second channel negotiation module.
S8184,第二信道协商模块第二信道协商模块向第二短距Wi-Fi模块发送该5G能力查询信息。S8184. The second channel negotiation module. The second channel negotiation module sends the 5G capability query information to the second short-range Wi-Fi module.
需要说明的是,第二电子设备可以具有5G能力查询的通用接口,比如Wi-FiManager:is5GHzBandSupported()。当第二信道协商模块接收到5G能力查询信息后,可以经由该通用接口将该5G能力查询信息发送至第二短距Wi-Fi模块,以查询第二电子设备是否支持5G能力。It should be noted that the second electronic device may have a general interface for querying 5G capabilities, such as Wi-FiManager:is5GHzBandSupported(). After the second channel negotiation module receives the 5G capability query information, it can send the 5G capability query information to the second short-range Wi-Fi module via the common interface to query whether the second electronic device supports 5G capability.
S8185,第二短距Wi-Fi模块向第二信道协商模块发送5G能力响应信息。S8185. The second short-distance Wi-Fi module sends 5G capability response information to the second channel negotiation module.
其中,该5G能力响应信息包括第二电子设备是否支持5G能力的查询结果。Wherein, the 5G capability response information includes a query result of whether the second electronic device supports 5G capability.
S8186,第二信道协商模块向第二蓝牙模块发送5G能力响应信息。S8186. The second channel negotiation module sends 5G capability response information to the second Bluetooth module.
S8187,第二蓝牙模块向第一蓝牙模块发送该5G能力响应信息。S8187. The second Bluetooth module sends the 5G capability response information to the first Bluetooth module.
之后,在接收端,第一电子设备可以执行以下步骤:Afterwards, at the receiving end, the first electronic device may perform the following steps:
S8188,第一蓝牙模块向第一信道协商模块发送5G能力响应信息。S8188. The first Bluetooth module sends 5G capability response information to the first channel negotiation module.
在一些实施例中,第一信道协商模块可以根据5G能力响应信息获取第二电子设备是否支持5G能力的查询结果。In some embodiments, the first channel negotiation module may acquire a query result of whether the second electronic device supports 5G capability according to the 5G capability response information.
根据查询结果不同,可以分为两种情形:情形2A,第二电子设备不支持5G能力;情形2B,第二电子设备支持5G能力。According to different query results, it can be divided into two situations: situation 2A, the second electronic device does not support 5G capability; situation 2B, the second electronic device supports 5G capability.
示例性的,如图12所示,为第一电子设备在上述情形2A和情形2B下执行相应操作的示意性流程图。Exemplarily, as shown in FIG. 12 , it is a schematic flowchart of corresponding operations performed by the first electronic device in the foregoing situations 2A and 2B.
针对情形2A,也即第二电子设备不支持5G能力时,第一电子设备可以执行以下步骤:For situation 2A, that is, when the second electronic device does not support 5G capability, the first electronic device may perform the following steps:
S8201,第一信道协商模块向第一短距Wi-Fi模块发送2.4G热点开启信息。S8201. The first channel negotiation module sends 2.4G hotspot activation information to the first short-distance Wi-Fi module.
其中,该2.4G热点开启信息用于指示第一短距Wi-Fi模块开启2.4G热点。Wherein, the 2.4G hotspot enabling information is used to instruct the first short-distance Wi-Fi module to enable the 2.4G hotspot.
在一些实施例中,第一信道协商模块向第一短距Wi-Fi模块发送2.4G热点开启信息的具体过程可以包括:第一信道协商模块向第一电子设备的第一连接模块发送该2.4G热点开启信息;之后,该第一连接模块向第一短距Wi-Fi模块发送该2.4G热点开启信息(该第一连接模块具体可以参见图7所示,图12中未示出该第一连接模块)。In some embodiments, the specific process that the first channel negotiation module sends the 2.4G hotspot activation information to the first short-distance Wi-Fi module may include: the first channel negotiation module sends the 2.4G hotspot information to the first connection module of the first electronic device. G hotspot opening information; Afterwards, the first connection module sends the 2.4G hotspot opening information to the first short-distance Wi-Fi module (the first connection module can be specifically shown in Figure 7, and the first connection module is not shown in Figure 12 a connection module).
S8202,第一短距Wi-Fi模块进行2.4G信道筛选,开启2.4G热点。S8202, the first short-distance Wi-Fi module performs 2.4G channel screening and enables 2.4G hotspots.
第一电子设备的短距Wi-Fi模块可以响应于2.4G热点开启信息,进行2.4G信道筛选,并基于筛选出的2.4G信道开启2.4G热点。The short-distance Wi-Fi module of the first electronic device may respond to the 2.4G hotspot activation information, perform 2.4G channel screening, and activate the 2.4G hotspot based on the screened 2.4G channel.
示例性的,2.4G信道的筛选可以包括:按照信号强度从多个双方支持的2.4G信道中筛选信号强度最优的信道。Exemplarily, the screening of the 2.4G channel may include: selecting a channel with the best signal strength from multiple 2.4G channels supported by both parties according to the signal strength.
针对情形2B,也即第二电子设备支持5G能力时,第一电子设备可以执行以下步骤:For scenario 2B, that is, when the second electronic device supports 5G capability, the first electronic device may perform the following steps:
S8211,第一信道协商模块指示定时器设置预设时长。S8211. The first channel negotiation module instructs the timer to set a preset duration.
示例性的,预设时长例如可以是30s等,本申请实施例对此不作限定。Exemplarily, the preset duration may be, for example, 30s, etc., which is not limited in this embodiment of the present application.
S8212,第一信道协商模块向第一短距Wi-Fi模块发送5G热点开启信息,该5G热点开启信息用于指示第一短距Wi-Fi模块开启5G热点。S8212. The first channel negotiation module sends 5G hotspot activation information to the first short-distance Wi-Fi module, where the 5G hotspot activation information is used to instruct the first short-distance Wi-Fi module to enable the 5G hotspot.
S8213,第一短距Wi-Fi模块进行5G信道筛选,开启5G热点。S8213, the first short-distance Wi-Fi module performs 5G channel screening and enables 5G hotspots.
在一些实施例中,第一电子设备的短距Wi-Fi模块可以在第一电子设备支持的5G信道列表中选择某一信道尝试与第二电子设备建立5G Wi-Fi连接。其中,第一短距Wi-Fi模块进行5G信道筛选的方式可以有多种,比如包括:方式1,根据第一电子设备支持的5G信道的信号强度,选择其中信号强度最优的5G信道;方式2,随机选择5G信道,等等。In some embodiments, the short-distance Wi-Fi module of the first electronic device can select a certain channel in the 5G channel list supported by the first electronic device to try to establish a 5G Wi-Fi connection with the second electronic device. Among them, the first short-distance Wi-Fi module can perform 5G channel screening in a variety of ways, for example including:
需要说明的是,在本申请实施例中,第一电子设备尝试开启5G热点的过程可以包括:在预设时长内,选择在该第一电子设备自身支持的5G信道上与第二电子设备尝试建立5GWi-Fi连接;如果在预设时长内,该5G Wi-Fi连接未成功建立,则表示当前使用的5G信道可能不被第二电子设备支持,则第一电子设备则切换至2.4G热点,双方通过2.4G信道传输数据。It should be noted that, in the embodiment of the present application, the process of the first electronic device trying to open a 5G hotspot may include: within a preset time period, selecting to try with the second electronic device on the 5G channel supported by the first electronic device itself. Establish a 5G Wi-Fi connection; if the 5G Wi-Fi connection is not successfully established within the preset time period, it means that the currently used 5G channel may not be supported by the second electronic device, and the first electronic device will switch to the 2.4G hotspot , the two parties transmit data through the 2.4G channel.
或者,如果在预设时长内,5G Wi-Fi连接未成功建立,第一电子设备可以在新的预设时长内,在其它该第一电子设备支持的5G信道上与第二电子设备尝试建立5G Wi-Fi连接。按照该过程,可以遍历第一电子设备支持的5G信道尝试该5G Wi-Fi连接,若该尝试过程中,双方在某一5G信道上Wi-Fi连接成功,则后续可以使用该5G信道进行数据传输,实现高效地换机克隆;若遍历全部第一电子设备支持的5G信道后,双方无法成功建立5G Wi-Fi连接,则第一电子设备则切换至2.4G热点,双方通过2.4G信道传输数据。Alternatively, if the 5G Wi-Fi connection is not successfully established within the preset time period, the first electronic device may try to establish a Wi-Fi connection with the second electronic device on other 5G channels supported by the first electronic device within the new preset time period. 5G Wi-Fi connection. According to this process, the 5G channel supported by the first electronic device can be traversed to try the 5G Wi-Fi connection. If the two parties successfully connect to the Wi-Fi on a 5G channel during the attempt, the 5G channel can be used for subsequent data transfer. Transmission to achieve efficient replacement and cloning; if both parties fail to establish a 5G Wi-Fi connection after traversing all the 5G channels supported by the first electronic device, the first electronic device will switch to a 2.4G hotspot, and the two parties will transmit through the 2.4G channel data.
在一种可能的实现方式中,第二电子设备例如可以与第一电子设备使用不同国家的5G信道,此时,第一电子设备和第二电子设备实际支持的5G信道可能存在部分交集,则经过该尝试连接过程,可以在双方均支持的5G信道上建立5G Wi-Fi连接。示例性的,不同国家的5G信道开放状况如表2所示:In a possible implementation, for example, the second electronic device and the first electronic device may use 5G channels in different countries. At this time, the 5G channels actually supported by the first electronic device and the second electronic device may partially overlap, then After this trial connection process, a 5G Wi-Fi connection can be established on a 5G channel supported by both parties. Exemplarily, the 5G channel opening status in different countries is shown in Table 2:
表2Table 2
假设第一短距Wi-Fi模块筛选的5G信道恰好也为第二电子设备支持的5G信道,则第一电子设备和第二电子设备就可以在该5G信道上建立5G Wi-Fi连接。假设第一短距Wi-Fi模块筛选的5G信道为第二电子设备不支持的5G信道,则第一电子设备和第二电子设备则无法在该5G信道上成功建立5G Wi-Fi连接。Assuming that the 5G channel selected by the first short-distance Wi-Fi module is also the 5G channel supported by the second electronic device, the first electronic device and the second electronic device can establish a 5G Wi-Fi connection on the 5G channel. Assuming that the 5G channel selected by the first short-range Wi-Fi module is a 5G channel not supported by the second electronic device, the first electronic device and the second electronic device cannot successfully establish a 5G Wi-Fi connection on the 5G channel.
针对这两种不同的情况,第一电子设备可以执行以下步骤:For these two different situations, the first electronic device may perform the following steps:
S8214,若在预设时长内,与第二电子设备成功建立5G Wi-Fi连接,则与第二电子设备通过5G信道进行数据传输;若在预设时长内,未成功与第二电子设备建立5G Wi-Fi连接,则与第二电子设备通过2.4G信道进行数据传输。S8214. If a 5G Wi-Fi connection is successfully established with the second electronic device within the preset time period, perform data transmission with the second electronic device through a 5G channel; if the connection with the second electronic device is not successfully established within the
需要说明的是,结合上文步骤S814,第二电子设备会周期性地在自己支持的5G信道进行轮询,尝试连接Wi-Fi连接信息对应的Wi-Fi热点。如果第一电子设备当前开启的5G热点所在的5G信道(假设该5G信道的信道编码是36)也为第二电子设备实际支持的5G信道,那么当第二电子设备遍历到在该5G信道(信道编码为36)上发送Wi-Fi连接请求时,第一电子设备可以在该5G信道(信道编码为36)上接收到该Wi-Fi连接请求,双方进而可以成功建立5G Wi-Fi连接。如果第一电子设备当前开启的5G热点所在的5G信道(假设该5G信道的信道编码是40)为第二电子设备不支持的5G信道(也即双方实际支持的5G信道集合为空),那么即使第二电子设备遍历所有自己支持的5G信道发送Wi-Fi连接请求,第一电子设备也无法获取该Wi-Fi连接请求,双方无法成功建立5G Wi-Fi连接。It should be noted that, in combination with the above step S814, the second electronic device will periodically poll the 5G channel supported by itself, and try to connect to the Wi-Fi hotspot corresponding to the Wi-Fi connection information. If the 5G channel where the 5G hotspot currently enabled by the first electronic device is located (assuming that the channel code of the 5G channel is 36) is also the 5G channel actually supported by the second electronic device, then when the second electronic device traverses to the 5G channel ( When the Wi-Fi connection request is sent on the channel code 36), the first electronic device can receive the Wi-Fi connection request on the 5G channel (the channel code is 36), and the two parties can then successfully establish a 5G Wi-Fi connection. If the 5G channel where the 5G hotspot currently enabled by the first electronic device is located (assuming that the channel code of the 5G channel is 40) is a 5G channel not supported by the second electronic device (that is, the set of 5G channels actually supported by both parties is empty), then Even if the second electronic device traverses all the 5G channels it supports to send a Wi-Fi connection request, the first electronic device cannot obtain the Wi-Fi connection request, and the two parties cannot successfully establish a 5G Wi-Fi connection.
在一些实施例中,第一电子设备与第二电子设备成功建立5G Wi-Fi连接,第一电子设备和第二电子设备则可以在第一电子设备当前筛选的5G信道上创建数据传输通道,进行数据传输。其中,数据通道的创建过程可以如下文图14所示,具体过程将在下文进行介绍,此处展暂不详述。In some embodiments, the first electronic device and the second electronic device successfully establish a 5G Wi-Fi connection, and the first electronic device and the second electronic device can create a data transmission channel on the 5G channel currently screened by the first electronic device, for data transfer. Among them, the creation process of the data channel can be shown in Figure 14 below, and the specific process will be introduced below, and will not be described in detail here.
在一些实施例中,第一电子设备和第二电子设备若未成功建立5G Wi-Fi连接,第一电子设备会切换至2.4G热点,与第二电子设备建立2.4G连接。示例性的,如图13所示,该具体过程可以包括以下步骤:In some embodiments, if the first electronic device and the second electronic device fail to establish a 5G Wi-Fi connection, the first electronic device will switch to a 2.4G hotspot to establish a 2.4G connection with the second electronic device. Exemplarily, as shown in Figure 13, the specific process may include the following steps:
S82141,第一信道协商模块确定定时器超过预设时长,且第一电子设备和第二电子设备之间未成功建立5G Wi-Fi连接。S82141. The first channel negotiation module determines that the timer exceeds the preset duration, and the 5G Wi-Fi connection is not successfully established between the first electronic device and the second electronic device.
在一些实施例中,第一信道协商模块可以获取定时器发送的达到预设时长的通知信息。此外,第一信道协商模块还可以由第一短距Wi-Fi模块获取是否成功建立5GWi-Fi连接。第一信道协商模块可以根据定时器发送的通知信息和第一短距Wi-Fi模块发送的通知信息,确定定时器超过预设时长,且第一电子设备和第二电子设备之间未成功建立5G Wi-Fi连接。S82142,第一信道协商模块向第一短距Wi-Fi模块发送5G热点关闭信息。In some embodiments, the first channel negotiation module may acquire the notification information sent by the timer that reaches the preset duration. In addition, the first channel negotiation module can also obtain whether the 5G Wi-Fi connection is successfully established from the first short-range Wi-Fi module. The first channel negotiation module may determine that the timer exceeds the preset duration and the connection between the first electronic device and the second electronic device has not been successfully established according to the notification information sent by the timer and the notification information sent by the first short-range Wi-Fi module. 5G Wi-Fi connection. S82142. The first channel negotiation module sends 5G hotspot closing information to the first short-distance Wi-Fi module.
其中,该5G热点关闭信息用于指示第一短距Wi-Fi模块关闭5G热点。Wherein, the 5G hotspot off information is used to instruct the first short-distance Wi-Fi module to turn off the 5G hotspot.
S82143,响应于该5G热点关闭信息,第一短距Wi-Fi模块关闭5G热点。S82143. In response to the 5G hotspot closing information, the first short-distance Wi-Fi module closes the 5G hotspot.
可选地,第一短距Wi-Fi模块关闭5G热点之后,可以向第一信道协商模块发送5G热点关闭的通知信息。Optionally, after the first short-distance Wi-Fi module turns off the 5G hotspot, it may send a notification message that the 5G hotspot is turned off to the first channel negotiation module.
S82144,第一信道协商模块向第一短距Wi-Fi模块发送2.4G热点开启信息,该2.4G热点开启信息用于指示第一短距Wi-Fi模块开启2.4G热点。S82144. The first channel negotiation module sends 2.4G hotspot enabling information to the first short-distance Wi-Fi module, where the 2.4G hotspot enabling information is used to instruct the first short-distance Wi-Fi module to enable the 2.4G hotspot.
S82145,响应于该2.4G热点关闭信息,第一短距Wi-Fi模块开启2.4G热点。S82145. In response to the 2.4G hotspot off information, the first short-distance Wi-Fi module turns on the 2.4G hotspot.
应理解,当第一电子设备经过上述步骤开启Wi-Fi热点(5G Wi-Fi热点或2.4G Wi-Fi热点)之后,第一电子设备可以和第二电子设备建立数据传输通道。示例性的,如图14所示,为第一电子设备可以和第二电子设备建立数据传输通道的示意性流程图,具体可以包括以下步骤:It should be understood that after the first electronic device turns on a Wi-Fi hotspot (5G Wi-Fi hotspot or 2.4G Wi-Fi hotspot) through the above steps, the first electronic device can establish a data transmission channel with the second electronic device. Exemplarily, as shown in FIG. 14 , a schematic flowchart of establishing a data transmission channel between the first electronic device and the second electronic device may specifically include the following steps:
S8221,第一短距Wi-Fi模块与第二短距Wi-Fi模块建立Wi-Fi连接。S8221. Establish a Wi-Fi connection between the first short-distance Wi-Fi module and the second short-distance Wi-Fi module.
示例性的,如果第一电子设备和第一短距Wi-Fi模块确定双方在预设时长内成功建立5GWi-Fi连接(对应于步骤S8214中的成功建立5G Wi-Fi情形),该步骤中建立的Wi-Fi连接可以是在5G信道上建立的5G Wi-Fi连接。Exemplarily, if the first electronic device and the first short-range Wi-Fi module determine that the two parties successfully establish a 5G Wi-Fi connection within a preset period of time (corresponding to the successful establishment of a 5G Wi-Fi situation in step S8214), in this step The established Wi-Fi connection may be a 5G Wi-Fi connection established on a 5G channel.
示例性的,建立Wi-Fi连接的过程可以包括:第二短距Wi-Fi模块周期性地遍历自己支持的5G信道发送Wi-Fi连接请求消息,该Wi-Fi连接请求消息包括第一电子设备Wi-Fi热点的SSID和密码等连接信息,且用于请求与该SSID对应的Wi-Fi热点建立连接;当第一短距Wi-Fi模块开启5G热点之后,可以对Wi-Fi请求消息进行监听,若能够监听到该第二电子设备发送的Wi-Fi连接请求,且根据该Wi-Fi连接请求消息确定第二电子设备请求与第一电子设备建立5G Wi-Fi连接,则双方可以在第二电子设备当前使用的5G信道上建立5GWi-Fi连接。Exemplarily, the process of establishing a Wi-Fi connection may include: the second short-distance Wi-Fi module periodically traverses the 5G channel supported by itself and sends a Wi-Fi connection request message, the Wi-Fi connection request message includes the first electronic Connection information such as SSID and password of the Wi-Fi hotspot of the device, and is used to request to establish a connection with the Wi-Fi hotspot corresponding to the SSID; when the first short-distance Wi-Fi module turns on the 5G hotspot, it can request a message Monitor, if the Wi-Fi connection request sent by the second electronic device can be monitored, and it is determined according to the Wi-Fi connection request message that the second electronic device requests to establish a 5G Wi-Fi connection with the first electronic device, then both parties can A 5G Wi-Fi connection is established on the 5G channel currently used by the second electronic device.
S8222,第一短距Wi-Fi模块向第一信道协商模块发送Wi-Fi连接通知信息,该Wi-Fi连接通信信息用于通知Wi-Fi连接成功建立。S8222. The first short-distance Wi-Fi module sends Wi-Fi connection notification information to the first channel negotiation module, where the Wi-Fi connection communication information is used to notify that the Wi-Fi connection is successfully established.
S8223,响应于Wi-Fi连接通知信息,第一信道协商模块向该第一克隆特性模块发送数据传输开启信息。S8223. In response to the Wi-Fi connection notification information, the first channel negotiation module sends data transmission enabling information to the first clone characteristic module.
其中,该数据传输开启信息用于指示开启数据传输流程。Wherein, the data transmission start information is used to indicate to start a data transmission process.
S8224,响应于该数据传输开启信息,第一克隆特性模块向第一UX显示模块发送数据传输提示信息。S8224. In response to the data transmission enabling information, the first clone feature module sends data transmission prompt information to the first UX display module.
其中,该数据传输提示信息可以用于提示用户数据传输流程开启。Wherein, the data transmission prompt information may be used to prompt the user to start the data transmission process.
S8225,响应于该数据传输提示信息,第一UX显示模块指示显示屏显示数据传输提示信息。S8225. In response to the data transmission prompt information, the first UX display module instructs the display screen to display the data transmission prompt information.
示例性的,显示屏显示的数据传输提示信息例如可以如图16B所示。该提示信息例如可以是“旧设备已成功连接至5GWi-Fi热点,可以开始数据传输。请在旧设备上选择需要传输的数据”。Exemplarily, the data transmission prompt information displayed on the display screen may be as shown in FIG. 16B , for example. The prompt information may be, for example, "the old device has been successfully connected to the 5G Wi-Fi hotspot, and data transmission can be started. Please select the data to be transferred on the old device".
相应地,在发送端,第二电子设备可以执行以下步骤:Correspondingly, at the sending end, the second electronic device may perform the following steps:
S8226,第二短距Wi-Fi模块向第二信道协商模块发送Wi-Fi连接通知消息,该Wi-Fi连接通信信息用于通知Wi-Fi连接成功建立。S8226. The second short-distance Wi-Fi module sends a Wi-Fi connection notification message to the second channel negotiation module, where the Wi-Fi connection communication information is used to notify that the Wi-Fi connection is successfully established.
S8227,第二信道协商模块向第二克隆特性模块发送文件传输开启信息。S8227. The second channel negotiation module sends file transfer start information to the second clone characteristic module.
S8228,第二克隆特性模块向第二UX显示模块发送传输界面开启信息。S8228. The second cloning characteristic module sends transmission interface opening information to the second UX display module.
S8229,第二UX显示模块指示显示屏显示待传输的数据。S8229, the second UX display module instructs the display screen to display the data to be transmitted.
示例性的,显示屏显示的待传输的数据例如可以如图16A所示。Exemplarily, the data to be transmitted displayed on the display screen may be as shown in FIG. 16A , for example.
在一些实施例中,用户可以通过在该界面输入带传输数据选择操作(对应于第三操作),选择需要备份至第一电子设备中的数据。In some embodiments, the user may select the data to be backed up to the first electronic device by inputting a data selection operation (corresponding to the third operation) on the interface.
需要说明的是,本申请实施例对第一电子设备执行步骤S8222至步骤S8225和第二电子设备执行步骤S8226至步骤S8229的先后顺序不作限定,换言之,在建立Wi-Fi连接后,第一电子设备和第二电子设备可以互相独立执行各自的操作。It should be noted that the embodiment of the present application does not limit the order in which the first electronic device executes steps S8222 to S8225 and the second electronic device executes steps S8226 to S8229. In other words, after the Wi-Fi connection is established, the first electronic device The device and the second electronic device may perform respective operations independently of each other.
S82210,第二信道协商模块向第二传输模块发送传输通道创建信息。S82210. The second channel negotiation module sends transmission channel creation information to the second transmission module.
S82211,第一信道协商模块向第一传输模块发送传输通道创建信息。S82211. The first channel negotiation module sends transmission channel creation information to the first transmission module.
S82212,第一传输模块和第二传输模块建立数据传输通道。S82212. The first transmission module and the second transmission module establish a data transmission channel.
其中,该传输通道可以是5G频段上的传输通道。Wherein, the transmission channel may be a transmission channel on a 5G frequency band.
需要说明的是,本申请实施例对第一电子设备执行步骤S8211和第一电子设备执行步骤S8223至步骤S8225的先后顺序不作限定,也对第二电子设备执行步骤S8210和第二电子设备执行步骤S8226至步骤S8229的先后顺序不作限定。It should be noted that the embodiment of the present application does not limit the order in which the first electronic device executes step S8211 and the first electronic device executes step S8223 to step S8225, and the second electronic device executes step S8210 and the second electronic device executes step The order of steps S8226 to S8229 is not limited.
当建立数据传输信道之后,第一电子设备和第二电子设备可以进行数据传输过程(对应于步骤S824)。示例性的,第一电子设备和第二电子设备进行数据传输的过程可以参见图15所示。After the data transmission channel is established, the first electronic device and the second electronic device may perform a data transmission process (corresponding to step S824). Exemplarily, the process of data transmission between the first electronic device and the second electronic device can be referred to as shown in FIG. 15 .
S8241,第二UX显示模块向第二克隆特性模块发送数据路径汇总。S8241. The second UX display module sends the data path summary to the second clone feature module.
在一些实施例中,第二电子设备的UX显示模块获取文件路径汇总的过程可以包括:用户在第二电子设备界面(如图16A所示的界面)上显示的待传输数据选项中选择需要传输的数据,响应于用户的选择操作,第二UX显示模块根据需要传输的数据,获取这些数据在第二电子设备的存储路径汇总。其中,数据路径汇总可以包括带传输数据对应的应用程序名称等。In some embodiments, the process for the UX display module of the second electronic device to obtain the file path summary may include: the user selects the data to be transferred among the data options to be transferred displayed on the interface of the second electronic device (such as the interface shown in FIG. 16A ). In response to the user's selection operation, the second UX display module obtains and summarizes these data in the storage path of the second electronic device according to the data to be transmitted. Wherein, the data path summary may include the name of the application corresponding to the transmitted data, and the like.
S8242,第二克隆特性模块向第二传输模块发送数据路径汇总。S8242. The second clone characteristic module sends the data path summary to the second transmission module.
S8243,第二传输模块根据数据路径汇总获取需要传输的数据。S8243. The second transmission module obtains the data to be transmitted according to the summary of the data path.
S8244,第二传输模块向第一传输模块发送传输数据。S8244. The second transmission module sends transmission data to the first transmission module.
S8245,第一传输模块向第一克隆特性模块发送传输数据。S8245. The first transmission module sends transmission data to the first clone characteristic module.
在一些实施例中,第一克隆特性模块可以将接收到的文件数据存储在第一电子设备的内存中各个应用程序分别对应的文件中。In some embodiments, the first cloning characteristic module may store the received file data in files corresponding to respective application programs in the memory of the first electronic device.
S8246,第一克隆特性模块向第一UX显示模块发送数据传输进度,指示第一UX显示模块刷新数据传输进度页面。S8246. The first cloning characteristic module sends the data transmission progress to the first UX display module, and instructs the first UX display module to refresh the data transmission progress page.
示例性的,在数据传输过程中,第一UX显示模块指示显示屏向用户显示数据传输的相关提示信息,比如数据传输进度、当前正在传输的数据所对应的应用名称、数据传输的速率、数据传输完毕所需的时间等等。示例性的,第一电子设备上显示的数据传输界面可以如图16C所示,相应地,第二电子设备上显示的数据传输界面可以如图16D所示。Exemplarily, during the data transmission process, the first UX display module instructs the display screen to display relevant prompt information of data transmission to the user, such as the progress of data transmission, the application name corresponding to the data currently being transmitted, the rate of data transmission, the data The time it takes for the transfer to complete, etc. Exemplarily, the data transmission interface displayed on the first electronic device may be as shown in FIG. 16C , and correspondingly, the data transmission interface displayed on the second electronic device may be as shown in FIG. 16D .
根据本申请实施例提供的数据传输的方法,通过在发送设备无法提供自身支持的5G信道的情况下,接收设备选择自身支持的5G信道尝试与发送设备建立连接,尝试连接成功时,双方则在5G信道上进行克隆数据传输,能够提高克隆数据传输的效率,提升用户的使用体验。According to the data transmission method provided by the embodiment of the present application, when the sending device cannot provide the 5G channel supported by itself, the receiving device selects the 5G channel supported by itself to try to establish a connection with the sending device. Clone data transmission on the 5G channel can improve the efficiency of clone data transmission and improve user experience.
示例性的,如图17所示,为本申请实施例提供的一种数据传输的方法的示意性流程图。包括以下步骤:Exemplarily, as shown in FIG. 17 , it is a schematic flow chart of a data transmission method provided by the embodiment of the present application. Include the following steps:
S1701,第一电子设备获取第二电子设备的第一信道列表,该第一信道列表用于指示第二电子设备支持的第一目标频段信道。S1701. The first electronic device acquires a first channel list of the second electronic device, where the first channel list is used to indicate channels in the first target frequency band supported by the second electronic device.
在一些实施例中,第一电子设备可以是换机克隆场景下的数据接收设备,第二电子设备可以换机克隆场景下的数据发送设备。第一电子设备是支持第一目标频段能力的设备,也即第一电子设备支持在第一目标频段上进行Wi-Fi通信的能力。第一目标频段可以是5G频段,第一目标频段信道可以是5G信道。In some embodiments, the first electronic device may be a data receiving device in the scenario of phone replacement and cloning, and the second electronic device may be a data sending device in the scenario of phone replacement and cloning. The first electronic device is a device supporting the capability of the first target frequency band, that is, the first electronic device supports the capability of performing Wi-Fi communication on the first target frequency band. The first target frequency band may be a 5G frequency band, and the channel of the first target frequency band may be a 5G channel.
在一些实施例中,第一信道列表可以对应于上述实施例中的5G信道响应信息,具体可以用于指示第二电子设备支持的第一目标频段信道。In some embodiments, the first channel list may correspond to the 5G channel response information in the foregoing embodiments, and specifically may be used to indicate the first target frequency band channels supported by the second electronic device.
在一些实施例中,第一电子设备可以接收用户输入的第一操作,该第一操作例如可以是接收端流程开启操作,例如可以是图5A所示的操作501;或者也可以是用户在克隆应用中输入的旧设备类型选择操作,例如可以对应于图5B所示的操作502。In some embodiments, the first electronic device may receive a first operation input by the user, and the first operation may be, for example, an operation of starting a process at the receiving end, such as
在一些实施例中,第一电子设备响应于第一操作,可以显示二维码,该二维码用于提供第一电子设备Wi-Fi热点的连接信息,如Wi-Fi热点的SSID和对应的密码。In some embodiments, the first electronic device may display a two-dimensional code in response to the first operation, and the two-dimensional code is used to provide connection information of the Wi-Fi hotspot of the first electronic device, such as the SSID of the Wi-Fi hotspot and the corresponding password.
在一些实施例中,第二电子设备可以接收用户输入的第二操作,该第二操作例如可以是第二电子设备的二维码扫描界面开启操作,其中,二维码扫描界面例如可以如图6所示;响应于第二操作,第二电子设备显示二维码扫描界面;之后,第二电子设备可以通过所述二维码扫描界面对第一电子设备显示的二维码进行扫描,然后提取二维码提供的所述Wi-Fi热点的SSID和对应的密码(可对应于上述实施例中的二维码数据,或者Wi-Fi热点连接信息)。In some embodiments, the second electronic device may receive a second operation input by the user, and the second operation may be, for example, an operation of opening a two-dimensional code scanning interface of the second electronic device, wherein the two-dimensional code scanning interface may be, for example, as shown in the figure 6; in response to the second operation, the second electronic device displays a two-dimensional code scanning interface; after that, the second electronic device can scan the two-dimensional code displayed by the first electronic device through the two-dimensional code scanning interface, and then Extract the SSID and corresponding password of the Wi-Fi hotspot provided by the two-dimensional code (may correspond to the two-dimensional code data in the above-mentioned embodiment, or the Wi-Fi hotspot connection information).
在一些实施例中,第一电子设备和第二电子设备可以建立蓝牙连接。示例性的,第一电子设备可以响应于二维码显示操作,或者响应于二维码被扫描的操作,发送蓝牙查询请求;第二电子设备可以响应于二维码扫描界面开启操作,或者响应于二维码扫描操作,进行蓝牙扫描;之后,第一电子设备和第二电子设备可以基于蓝牙通信标准建立蓝牙连接,建立蓝牙连接的具体过程可以参见上文的相关介绍,此处不再赘述。In some embodiments, the first electronic device and the second electronic device can establish a Bluetooth connection. Exemplarily, the first electronic device may send a Bluetooth query request in response to the two-dimensional code display operation, or in response to the operation of scanning the two-dimensional code; the second electronic device may respond to the operation of opening the two-dimensional code scanning interface, or respond to Based on the QR code scanning operation, Bluetooth scanning is performed; after that, the first electronic device and the second electronic device can establish a Bluetooth connection based on the Bluetooth communication standard. For the specific process of establishing a Bluetooth connection, please refer to the relevant introduction above, and will not repeat it here .
之后,在一些实施例中,第一电子设备可以经由蓝牙信道向第二电子设备发送第一信道查询信息,该第一信道查询信息用于查询第二电子设备支持的第一目标频段信道;第二电子设备接收第一电子设备经由蓝牙信道发送的第一信道查询信息;响应于该第一信道查询信息,第二电子设备可以查询第二电子设备支持的第一目标频段信道;之后,第二电子设备可以经由蓝牙信道向第一电子设备发送第一信道响应信息,该第一信道响应信息包括第一信道列表。其中,第一信道查询信息可以对应于上述实施例中的5G信道查询信息。Afterwards, in some embodiments, the first electronic device may send the first channel query information to the second electronic device via the Bluetooth channel, and the first channel query information is used to query the first target frequency band channel supported by the second electronic device; The second electronic device receives the first channel query information sent by the first electronic device via the Bluetooth channel; in response to the first channel query information, the second electronic device can query the first target frequency band channel supported by the second electronic device; after that, the second The electronic device may send first channel response information to the first electronic device via a Bluetooth channel, where the first channel response information includes a first channel list. Wherein, the first channel query information may correspond to the 5G channel query information in the foregoing embodiments.
在一些实施例中,当第二电子设备查询第一目标频段信道失败(比如由于第二电子设备不具有信道查询通用接口,导致无法查询第一目标频段信道)时,第一列表包括的第一目标频段信道为空,可以对应于上述介绍的第二电子设备反馈的5G信道列表为空。In some embodiments, when the second electronic device fails to query the channel of the first target frequency band (for example, because the second electronic device does not have a common interface for channel query, it cannot query the channel of the first target frequency band), the first list includes the first The channel of the target frequency band is empty, which may correspond to the fact that the 5G channel list fed back by the second electronic device described above is empty.
S1702,当第一信道列表和第二信道列表的交集为空时,第一电子设备在第一信道上开启第一目标频段无线保真Wi-Fi热点,第二信道列表用于指示第一电子设备支持的第一目标频段信道,第一信道为第一电子设备支持的第一目标频段信道中的一个信道。S1702. When the intersection of the first channel list and the second channel list is empty, the first electronic device starts the first target frequency band wireless fidelity Wi-Fi hotspot on the first channel, and the second channel list is used to indicate that the first electronic device The first target frequency band channels supported by the device, where the first channel is one of the first target frequency band channels supported by the first electronic device.
在一些实施例中,第一电子设备可以获取第二信道列表,该第二信道列表可以用于指示该第一电子设备自身支持的第一目标频段信道。具体地,第一电子设备的第一信道协商模块可以向第一短距Wi-Fi模块发送第二信道查询信息,并接收第一短距Wi-Fi发送的第二信道响应信息,该第二信道响应信息可以包括第二信道列表。In some embodiments, the first electronic device may acquire a second channel list, and the second channel list may be used to indicate the first target frequency band channels supported by the first electronic device itself. Specifically, the first channel negotiation module of the first electronic device may send second channel query information to the first short-distance Wi-Fi module, and receive second channel response information sent by the first short-distance Wi-Fi module. The channel response information may include a second channel list.
在一些实施例中,第一电子设备可以根据第一信道列表和第二信道列表获取第一信道列表和第二信道列表的交集为空。其中,第一信道列表和第二信道列表的交集为空可以指第一电子设备和第二电子设备不存在共同支持的第一目标频段信道,也即第一电子设备和第二电子设备共同支持的第一目标频段信道集合为空。In some embodiments, the first electronic device may obtain, according to the first channel list and the second channel list, that the intersection of the first channel list and the second channel list is empty. Wherein, the intersection of the first channel list and the second channel list being empty may mean that the first electronic device and the second electronic device do not have a first target frequency band channel supported by both, that is, the first electronic device and the second electronic device support both The first target band channel set for is empty.
应理解,本申请实施例中导致第一信道列表和第二信道列表的交集为空的原因例如可以是:第二电子设备未成功查询到自身支持的第一目标频段信道。It should be understood that in this embodiment of the present application, the reason why the intersection of the first channel list and the second channel list is empty may be, for example, that the second electronic device fails to query the channel of the first target frequency band supported by itself.
在一些实施例中,第一电子设备在第一信道上开启第一目标频段Wi-Fi热点的过程可以包括:当第一电子设备获取第一信道列表和第二信道列表的交集为空时,可以在该第一电子设备自身支持的第一目标频段上选择第一信道,然后在该第一信道上开启第一目标频段Wi-Fi热点。In some embodiments, the process for the first electronic device to enable the Wi-Fi hotspot in the first target frequency band on the first channel may include: when the first electronic device acquires that the intersection of the first channel list and the second channel list is empty, A first channel may be selected on the first target frequency band supported by the first electronic device itself, and then a Wi-Fi hotspot in the first target frequency band is enabled on the first channel.
示例性的,第一电子设备从自身支持的第一目标频段上选择第一信道的方式可以包括:当第一信道列表和第二信道列表的交集为空时,第一电子设备从该第一电子设备支持的第一目标信道中随机选择第一信道;或者,当第一信道列表和第二信道列表的交集为空时,第一电子设备根据信号强度从第一电子设备支持的第一目标信道中选择第一信道,此时,该第一信道例如可以是信号强度最优的信道。Exemplarily, the manner in which the first electronic device selects the first channel from the first target frequency band supported by itself may include: when the intersection of the first channel list and the second channel list is empty, the first electronic device selects the first channel from the first channel list. Randomly select the first channel from the first target channels supported by the electronic device; or, when the intersection of the first channel list and the second channel list is empty, the first electronic device selects the first target channel supported by the first electronic device according to the signal strength The first channel is selected among the channels, and at this time, the first channel may be, for example, a channel with the best signal strength.
在一些实施例中,第一电子设备在第一信道上开启第一目标频段Wi-Fi热点的过程还可以包括:第一电子设备获取第一信道列表和第二信道列表的交集为空时,第一电子设备可以向第二电子设备发送能力查询信息(可对应于上述实施例中的5G能力查询信息),该能力查询信息用于查询第二电子设备是否支持第一目标频段能力;第二电子设备响应于该能力查询信息,可以获取第一目标频段能力的查询结果,该查询结果可以为第二电子设备支持第一目标频段能力,之后,第二电子设备向第一电子设备发送能力响应信息(可对应于上述实施例中的5G能力响应信息),该能力响应信息用于指示第二电子设备支持第一目标频段能力;之后,第一电子设备接收第二电子设备发送的能力响应信息,根据该能力响应信息获取第二电子设备支持第一目标频段;之后,第一电子设备在第一信道上开启第一目标频点Wi-Fi热点。In some embodiments, the process of the first electronic device enabling the Wi-Fi hotspot in the first target frequency band on the first channel may further include: when the first electronic device acquires that the intersection of the first channel list and the second channel list is empty, The first electronic device may send capability query information (which may correspond to the 5G capability query information in the above-mentioned embodiment) to the second electronic device, and the capability query information is used to query whether the second electronic device supports the capability of the first target frequency band; the second In response to the capability query information, the electronic device may obtain a query result of the capability of the first target frequency band, and the query result may indicate that the second electronic device supports the capability of the first target frequency band, and then the second electronic device sends a capability response to the first electronic device Information (may correspond to the 5G capability response information in the above embodiment), the capability response information is used to indicate that the second electronic device supports the capability of the first target frequency band; after that, the first electronic device receives the capability response information sent by the second electronic device According to the capability response information, it is acquired that the second electronic device supports the first target frequency band; after that, the first electronic device enables the Wi-Fi hotspot of the first target frequency on the first channel.
需要说明的是,在本申请实施例中第二电子设备具有查询第一目标频段(如5G)能力的通用接口,因此,第一电子设备可以获取该第二电子设备的第一目标频段能力。It should be noted that in the embodiment of the present application, the second electronic device has a general interface for querying the capability of the first target frequency band (such as 5G), therefore, the first electronic device can obtain the capability of the first target frequency band of the second electronic device.
还需要说明的是,当第一电子设备在第一信道上尝试与第二电子设备建立Wi-Fi连接之前,通过向第二电子设备查询其第一目标频段能力,在确定第二电子设备支持第一目标频段能力后,再在第一信道建立Wi-Fi热点,能够进一步提高双方在第一目标频段信道成功建立Wi-Fi连接的可能性。It should also be noted that, before the first electronic device attempts to establish a Wi-Fi connection with the second electronic device on the first channel, by inquiring the second electronic device about its first target frequency band capability, after determining that the second electronic device supports After the capability of the first target frequency band, establishing a Wi-Fi hotspot on the first channel can further improve the possibility of successful establishment of a Wi-Fi connection between the two parties on the first target frequency band channel.
S1703,当在预设时长内获取第二电子设备经由第一信道发送的Wi-Fi连接请求消息时,第一电子设备与第二电子设备在第一信道上建立Wi-Fi连接,该Wi-Fi连接请求消息包括Wi-Fi热点的SSID和对应的密码,并且Wi-Fi连接请求消息为第二电子设备在自身支持的第一目标频段信道上发送的轮询消息。S1703. When obtaining the Wi-Fi connection request message sent by the second electronic device via the first channel within the preset time period, the first electronic device establishes a Wi-Fi connection with the second electronic device on the first channel, and the Wi-Fi The Fi connection request message includes the SSID of the Wi-Fi hotspot and the corresponding password, and the Wi-Fi connection request message is a polling message sent by the second electronic device on the first target frequency band channel supported by itself.
其中,Wi-Fi连接请求消息包括的SSID和对应的密码可以对应于第一电子设备的第一目标频段Wi-Fi热点。换言之,第二电子设备发送的Wi-Fi连接请求消息用于请求与第一电子设备的第一目标频段Wi-Fi热点进行连接。Wherein, the SSID and the corresponding password included in the Wi-Fi connection request message may correspond to the Wi-Fi hotspot of the first target frequency band of the first electronic device. In other words, the Wi-Fi connection request message sent by the second electronic device is used to request to be connected to the Wi-Fi hotspot of the first target frequency band of the first electronic device.
在一些实施例中,第二电子设备在获取第一电子设备Wi-Fi热点的SSID和对应的密码后,可以在该第二电子设备自身支持的第一目标频段上发送建立Wi-Fi连接请求的轮询消息。具体地,第二电子设备可以周期性地遍历自身支持的第一目标信道,尝试与第一电子设备建立(第一目标频段的)Wi-Fi连接。示例性的,第二电子设备可以在自身支持的某一个第一目标频段信道上,广播Wi-Fi连接请求消息,该Wi-Fi连接请求的广播消息可以包括该第一电子设备(第一目标频段的)Wi-Fi热点的SSID和密码;若在该第一目标频段信道上未成功建立Wi-Fi连接,则可以切换至其它第一目标频段信道重新广播Wi-Fi连接请求消息。当遍历该第二电子设备支持的所有第一目标频段信道后,仍未成功地与第一电子设备建立Wi-Fi连接时,则可以间隔一定时间间隔,再次进行上述Wi-Fi连接请求过程。In some embodiments, after the second electronic device obtains the SSID and corresponding password of the Wi-Fi hotspot of the first electronic device, it can send a Wi-Fi connection establishment request on the first target frequency band supported by the second electronic device itself polling message. Specifically, the second electronic device may periodically traverse the first target channel supported by itself, and try to establish a Wi-Fi connection (of the first target frequency band) with the first electronic device. Exemplarily, the second electronic device may broadcast a Wi-Fi connection request message on a certain first target frequency band channel supported by itself, and the broadcast message of the Wi-Fi connection request may include the first electronic device (first target frequency band) SSID and password of the Wi-Fi hotspot; if the Wi-Fi connection is not successfully established on the first target frequency band channel, it can be switched to other first target frequency band channels to rebroadcast the Wi-Fi connection request message. When the Wi-Fi connection with the first electronic device is still unsuccessfully established after traversing all the first target frequency band channels supported by the second electronic device, the above Wi-Fi connection request process may be performed again at a certain time interval.
在一些实施例中,若第一电子设备在预设时长内未接收到第二电子设备经由第一信道发送的Wi-Fi连接请求消息,则与第二电子设备在第二信道上建立(第二目标频段的)Wi-Fi连接,该第二信道为第一电子设备和第二电子设备共同支持的某一个第二目标频段信道。In some embodiments, if the first electronic device does not receive the Wi-Fi connection request message sent by the second electronic device via the first channel within a preset period of time, it establishes a connection with the second electronic device on the second channel (second Two target frequency bands) Wi-Fi connection, the second channel is a certain second target frequency band channel supported by both the first electronic device and the second electronic device.
其中,第二目标频段可以是2.4G频段。Wherein, the second target frequency band may be a 2.4G frequency band.
S1704,第一电子设备接收第二电子设备经由第一信道发送的数据。S1704. The first electronic device receives data sent by the second electronic device through the first channel.
其中,本申请实施例中传输的数据可以用户选择的需要备份到第一电子设备上的数据。该数据传输过程可以参见上述实施例中的具体介绍。Wherein, the data transmitted in the embodiment of the present application may be selected by the user and needs to be backed up to the first electronic device. For the data transmission process, refer to the specific introduction in the foregoing embodiments.
根据本申请实施例提供的数据传输的方法,通过在发送设备无法提供自身支持的5G信道的情况下,接收设备选择自身支持的5G信道尝试与发送设备建立连接,尝试连接成功时,双方则在5G信道上进行克隆数据传输,能够提高克隆数据传输的效率,提升用户的使用体验。According to the data transmission method provided by the embodiment of the present application, when the sending device cannot provide the 5G channel supported by itself, the receiving device selects the 5G channel supported by itself to try to establish a connection with the sending device. Clone data transmission on the 5G channel can improve the efficiency of clone data transmission and improve user experience.
基于同样的技术构思,本申请实施例还提供了一种电子设备,包括:显示器;一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行上述任一个方法中的一个或多个步骤。Based on the same technical idea, an embodiment of the present application also provides an electronic device, including: a display; one or more processors; one or more memories; one or more computer programs are stored in the one or more memories , the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform one or more steps in any one of the above methods.
基于同样的技术构思,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。Based on the same technical idea, the embodiment of the present application also provides a computer-readable storage medium, which stores instructions in the computer-readable storage medium, and when it is run on a computer or processor, the computer or processor executes the above-mentioned One or more steps in any method.
基于同样的技术构思,本申请实施例还提供了一种包含指令的计算机程序产品。当该计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。Based on the same technical idea, the embodiment of the present application also provides a computer program product including instructions. When the computer program product is run on the computer or the processor, the computer or the processor is made to perform one or more steps in any one of the above methods.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其它可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted via a computer-readable storage medium. The computer instructions may be transmitted from one web site, computer, server, or data center to another web site, computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware. The programs can be stored in computer-readable storage media. When the programs are executed , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of the embodiment of the application, but the protection scope of the embodiment of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the application shall be covered by this application. Within the protection scope of the application embodiment. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.
Claims (31)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111308878.8A CN115022872B (en) | 2021-11-05 | 2021-11-05 | Data transmission method, electronic equipment and readable storage medium |
CN202310319694.4A CN116489645B (en) | 2021-11-05 | 2021-11-05 | Data transmission method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111308878.8A CN115022872B (en) | 2021-11-05 | 2021-11-05 | Data transmission method, electronic equipment and readable storage medium |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310319694.4A Division CN116489645B (en) | 2021-11-05 | 2021-11-05 | Data transmission method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115022872A CN115022872A (en) | 2022-09-06 |
CN115022872B true CN115022872B (en) | 2023-04-07 |
Family
ID=83064609
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111308878.8A Active CN115022872B (en) | 2021-11-05 | 2021-11-05 | Data transmission method, electronic equipment and readable storage medium |
CN202310319694.4A Active CN116489645B (en) | 2021-11-05 | 2021-11-05 | Data transmission method and electronic equipment |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310319694.4A Active CN116489645B (en) | 2021-11-05 | 2021-11-05 | Data transmission method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN115022872B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118283713A (en) * | 2022-12-30 | 2024-07-02 | 华为技术有限公司 | Channel determining method and related device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112785069A (en) * | 2021-01-29 | 2021-05-11 | 北京明略昭辉科技有限公司 | Prediction method and device for terminal equipment changing machine, storage medium and electronic equipment |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015161434A1 (en) * | 2014-04-22 | 2015-10-29 | 华为技术有限公司 | Method, device and communication system for performing data communication using unlicensed spectrum |
CN105912421A (en) * | 2016-04-06 | 2016-08-31 | 广东欧珀移动通信有限公司 | Backup method and device for data stored in mobile terminal, mobile terminal and terminal |
CN106775445B (en) * | 2016-09-14 | 2019-12-06 | Oppo广东移动通信有限公司 | Data migration method and device |
CN106162829A (en) * | 2016-09-19 | 2016-11-23 | 青岛海信电器股份有限公司 | WIFI method of attachment and device |
US20190073273A1 (en) * | 2017-09-06 | 2019-03-07 | Phillippe Lorson | Data Backup Software Application |
CN107911818B (en) * | 2017-12-27 | 2021-07-30 | 北京安云世纪科技有限公司 | Method and device for data transmission between mobile terminals and mobile terminal |
CN108377483A (en) * | 2018-01-25 | 2018-08-07 | 维沃移动通信有限公司 | A kind of processing method and mobile terminal of bluetooth channel |
CN110730448A (en) * | 2019-09-18 | 2020-01-24 | 华为技术有限公司 | Method and electronic device for establishing connection between devices |
-
2021
- 2021-11-05 CN CN202111308878.8A patent/CN115022872B/en active Active
- 2021-11-05 CN CN202310319694.4A patent/CN116489645B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112785069A (en) * | 2021-01-29 | 2021-05-11 | 北京明略昭辉科技有限公司 | Prediction method and device for terminal equipment changing machine, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN115022872A (en) | 2022-09-06 |
CN116489645B (en) | 2024-06-14 |
CN116489645A (en) | 2023-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114390501B (en) | Method and electronic device for data transmission | |
US11683850B2 (en) | Bluetooth reconnection method and related apparatus | |
US12219470B2 (en) | Method for accessing wireless local area network and terminal | |
WO2019192586A1 (en) | Data transmission method and apparatus, storage medium, and electronic device | |
WO2022135341A1 (en) | Communication method and system, and electronic device | |
CN114615660B (en) | Access method, system and electronic equipment | |
CN115348630B (en) | Multi-device cooperation method and related device | |
EP4243556B1 (en) | Method for monitoring link and terminal device | |
CN116114239B (en) | Volume management methods and electronic equipment | |
CN115022872B (en) | Data transmission method, electronic equipment and readable storage medium | |
CN114916054A (en) | A communication method, device and terminal equipment | |
CN116709584B (en) | Method for connecting vehicle computer and terminal device | |
CN115022853B (en) | Device discovery method and electronic device | |
CN117135729B (en) | Multi-device cooperation method, system and terminal device | |
CN118139210B (en) | Method, device and system for connecting router | |
CN118264709A (en) | Service discovery method and electronic equipment | |
WO2025026310A1 (en) | Communication control method and system, and related apparatus | |
CN118695402A (en) | Network connection method, electronic device and readable storage medium | |
CN119031449A (en) | Communication network connection method, device and storage medium | |
CN119767441A (en) | P2P communication method, P2P communication discovery method, terminal equipment and storage medium | |
CN115884140A (en) | Cross-device connection method, electronic device, and storage medium | |
CN118353900A (en) | Network access method and electronic device | |
CN119136330A (en) | Device connection method and electronic device | |
CN117119097A (en) | Method, equipment and storage medium for incoming call resonance | |
CN119497058A (en) | Data processing method, data transmission method, readable storage medium and electronic device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |