CN113068168B - Communication method, device, electronic device and storage medium - Google Patents
Communication method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN113068168B CN113068168B CN202110287740.8A CN202110287740A CN113068168B CN 113068168 B CN113068168 B CN 113068168B CN 202110287740 A CN202110287740 A CN 202110287740A CN 113068168 B CN113068168 B CN 113068168B
- Authority
- CN
- China
- Prior art keywords
- signal
- wifi router
- terminal device
- wifi
- sending
- 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
Images
Classifications
-
- 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
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/22—Communication route or path selection, e.g. power-based or shortest path routing using selective relaying for reaching a BTS [Base Transceiver Station] or an access point
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/15—Setup of multiple wireless link connections
-
- 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)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请公开了一种通信方法、装置、电子设备和存储介质,属于通信领域。该方法包括:通过蓝牙连接向第二终端设备发送第一信号,并通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号,所述第二信号由所述第二终端设备在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下进行解调;其中,所述第一信号和所述第二信号携带相同的数据包。本申请在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且不需要额外的专业设备。
The application discloses a communication method, device, electronic equipment and storage medium, belonging to the field of communication. The method includes: sending a first signal to a second terminal device through a Bluetooth connection, amplifying the first signal through a Wifi router through a Wifi connection, and sending a second signal to the second terminal device, and the second signal is generated by The second terminal device performs demodulation when it is determined that the signal strength of the second signal is greater than the signal strength of the first signal; wherein the first signal and the second signal carry the same data packet . This application expands the coverage of Bluetooth without changing the power consumption of Bluetooth, and does not require additional professional equipment.
Description
技术领域technical field
本申请属于通信领域,具体涉及一种通信方法、装置、电子设备和存储介质。The present application belongs to the communication field, and specifically relates to a communication method, device, electronic equipment and storage medium.
背景技术Background technique
随着蓝牙耳机、手环等蓝牙设备和蓝牙通信在生活中的普及,蓝牙低功耗的应用越来越多。With the popularization of Bluetooth devices such as Bluetooth headsets and bracelets and Bluetooth communication in daily life, there are more and more applications of Bluetooth low power consumption.
蓝牙低功耗限制了蓝牙的功率,导致蓝牙的覆盖范围很小,限用于通信距离小且无障碍物的场景。两台低功耗蓝牙设备在空旷环境下距离超过10m,连接就会不太稳定,在室内隔一个房间通信就会连接不稳定,极大影响蓝牙设备的使用体验。Bluetooth low energy consumption limits the power of Bluetooth, resulting in a small coverage area of Bluetooth, which is limited to scenarios with small communication distances and no obstacles. If the distance between two low-power Bluetooth devices exceeds 10m in an open environment, the connection will be unstable, and if they communicate in a room separated by a room, the connection will be unstable, which will greatly affect the experience of using Bluetooth devices.
在实现本申请过程中,发明人发现现有技术中至少存在如下问题:During the process of implementing this application, the inventors found that at least the following problems existed in the prior art:
如果通过加大蓝牙的功率来提高蓝牙的覆盖范围,会导致功耗提升,不利于蓝牙设备的续航。If the coverage of Bluetooth is increased by increasing the power of Bluetooth, the power consumption will be increased, which is not conducive to the battery life of Bluetooth devices.
发明内容Contents of the invention
本申请实施例的目的是提供一种通信方法、装置、电子设备和存储介质,能够解决蓝牙覆盖范围的提高需要提升蓝牙功耗或使用专业设备的问题。The purpose of the embodiments of the present application is to provide a communication method, device, electronic device and storage medium, which can solve the problem that the improvement of Bluetooth coverage needs to increase Bluetooth power consumption or use professional equipment.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above-mentioned technical problems, the application is implemented as follows:
第一方面,本申请实施例提供了一种通信方法,应用于第一终端设备,该方法包括:In the first aspect, the embodiment of the present application provides a communication method, which is applied to a first terminal device, and the method includes:
通过蓝牙连接向第二终端设备发送第一信号;sending the first signal to the second terminal device through the Bluetooth connection;
通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号,所述第二信号由所述第二终端设备在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下进行解调;Sending a second signal to the second terminal device after amplifying the first signal via a Wifi router through the Wifi connection, the second signal is determined by the second terminal device after the signal strength of the second signal is greater than the specified signal. performing demodulation under the condition of the signal strength of the first signal;
其中,所述第一信号和所述第二信号携带相同的数据包。Wherein, the first signal and the second signal carry the same data packet.
第二方面,本申请实施例提供了一种通信方法,应用于第二终端设备,该方法包括:In the second aspect, the embodiment of the present application provides a communication method, which is applied to a second terminal device, and the method includes:
接收第一终端设备通过蓝牙连接发送的第一信号,并接收所述第一终端设备通过Wifi连接经由Wifi路由器发送的第二信号;receiving a first signal sent by the first terminal device through a Bluetooth connection, and receiving a second signal sent by the first terminal device through a Wifi connection via a Wifi router;
在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下,对所述第二信号进行解调;demodulating the second signal if it is determined that the signal strength of the second signal is greater than the signal strength of the first signal;
其中,所述第一信号和所述第二信号携带相同的数据包。Wherein, the first signal and the second signal carry the same data packet.
第三方面,本申请实施例提供了一种通信装置,该装置包括:In a third aspect, the embodiment of the present application provides a communication device, which includes:
第一发送模块,用于通过蓝牙连接向第二终端设备发送第一信号,并通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号,所述第二信号由所述第二终端设备在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下进行解调;The first sending module is configured to send a first signal to a second terminal device through a Bluetooth connection, and send a second signal to the second terminal device after amplifying the first signal through a Wifi router through a Wifi connection, and the first signal is sent to the second terminal device. The second signal is demodulated by the second terminal device upon determining that the signal strength of the second signal is greater than the signal strength of the first signal;
其中,所述第一信号和所述第二信号携带相同的数据包。Wherein, the first signal and the second signal carry the same data packet.
第四方面,本申请实施例提供了一种通信装置,该装置包括:In a fourth aspect, the embodiment of the present application provides a communication device, which includes:
第一接收模块,用于接收第一发送模块通过蓝牙连接发送的第一信号,并接收所述第一发送模块通过Wifi连接经由Wifi路由器对所述第一信号放大后发送的第二信号;The first receiving module is used to receive the first signal sent by the first sending module through the Bluetooth connection, and receive the second signal sent by the first sending module after amplifying the first signal through the Wifi router through the Wifi connection;
解调模块,用于在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下,对所述第二信号进行解调;A demodulation module, configured to demodulate the second signal when it is determined that the signal strength of the second signal is greater than the signal strength of the first signal;
其中,所述第一信号和所述第二信号携带相同的数据包。Wherein, the first signal and the second signal carry the same data packet.
第五方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面或第二方面所述的方法的步骤。In the fifth aspect, the embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and the program or instruction is executed by The processor implements the steps of the method described in the first aspect or the second aspect when executed.
第六方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面或第二方面所述的方法的步骤。In the sixth aspect, the embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the implementation as described in the first aspect or the second aspect is realized. steps of the method.
第七方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面或第二方面所述的方法。In the seventh aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect Or the method described in the second aspect.
在本申请实施例中,通过将wifi路由器作为蓝牙中继,利用wifi路由器的信号放大功能对第一终端设备发送的信号进行放大,在放大信号比原始信号的信号强度大的情况下,对放大信号进行解调,在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且不需要额外的专业设备。In this embodiment of the application, by using the wifi router as a Bluetooth relay, the signal amplifying function of the wifi router is used to amplify the signal sent by the first terminal device. When the signal strength of the amplified signal is greater than that of the original signal, the amplified The signal is demodulated, and the coverage of Bluetooth is expanded without changing the power consumption of Bluetooth, and no additional professional equipment is required.
附图说明Description of drawings
图1是本申请提供的通信方法流程图之一;Fig. 1 is one of the flow charts of the communication method provided by the present application;
图2是本申请提供的通信方法中信号发送路径示意图;Fig. 2 is a schematic diagram of a signal transmission path in the communication method provided by the present application;
图3是现有技术中Wifi路由器的硬件框图;Fig. 3 is the hardware block diagram of Wifi router in the prior art;
图4是本申请提供的通信方法中Wifi路由器与第一终端设备、第二终端设备的相对位置示意图之一;Fig. 4 is one of the schematic diagrams of the relative positions of the Wifi router, the first terminal device, and the second terminal device in the communication method provided by the present application;
图5是本申请提供的通信方法中Wifi路由器与第一终端设备、第二终端设备的相对位置示意图之二;Fig. 5 is the second schematic diagram of the relative positions of the Wifi router, the first terminal device, and the second terminal device in the communication method provided by the present application;
图6是本申请提供的通信方法中Wifi路由器连接的提示信息界面示意图之一;Fig. 6 is one of the prompt information interface schematic diagrams of Wifi router connection in the communication method provided by the present application;
图7是本申请提供的通信方法中Wifi路由器连接的提示信息界面示意图之二;Fig. 7 is the second schematic diagram of the prompt information interface connected to the Wifi router in the communication method provided by the present application;
图8是现有技术中第一终端设备和第二终端设备均不经过Wifi路由器的时隙示意图;Fig. 8 is a schematic diagram of time slots in which neither the first terminal device nor the second terminal device passes through the Wifi router in the prior art;
图9是本申请提供的通信方法中第一终端设备和第二终端设备均经过Wifi路由器的时隙示意图;9 is a schematic diagram of time slots in which both the first terminal device and the second terminal device pass through the Wifi router in the communication method provided by the present application;
图10是本申请提供的通信方法流程图之二;FIG. 10 is the second flow chart of the communication method provided by this application;
图11是本申请提供的通信方法流程图之三;Fig. 11 is the third flow chart of the communication method provided by this application;
图12是本申请提供的通信装置结构图之一;FIG. 12 is one of the structural diagrams of the communication device provided by the present application;
图13是本申请提供的通信装置结构图之二;Figure 13 is the second structural diagram of the communication device provided by this application;
图14是本申请提供的电子设备的硬件结构示意图。FIG. 14 is a schematic diagram of the hardware structure of the electronic device provided by the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It is to be understood that the data so used can be interchanged under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的通信方法、装置、电子设备和存储介质进行详细地说明。The communication method, device, electronic device, and storage medium provided by the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
如图1所示,本申请实施例提供一种通信方法,应用于第一终端设备,该方法包括:As shown in Figure 1, this embodiment of the present application provides a communication method, which is applied to a first terminal device, and the method includes:
步骤101,第一终端设备通过蓝牙连接向第二终端设备发送第一信号;
本申请实施例提供的方法应用于第一终端设备,该第一终端设备为蓝牙设备,如蓝牙耳机、手环等,或具有蓝牙功能的移动终端,如智能手机、个人电脑、平板电脑或可穿戴智能设备等。The method provided in the embodiment of this application is applied to a first terminal device, which is a Bluetooth device, such as a Bluetooth headset, a wristband, etc., or a mobile terminal with a Bluetooth function, such as a smart phone, a personal computer, a tablet computer or a Wear smart devices, etc.
第二终端设备为蓝牙设备或具有蓝牙功能的移动终端。The second terminal device is a bluetooth device or a mobile terminal with a bluetooth function.
第一终端设备和第二终端设备开启蓝牙,两者之间直接进行蓝牙通信。即第一信号为蓝牙信号。The first terminal device and the second terminal device turn on Bluetooth, and directly perform Bluetooth communication between the two. That is, the first signal is a Bluetooth signal.
步骤102,通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号,所述第二信号由所述第二终端设备在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下进行解调;其中,所述第一信号和所述第二信号携带相同的数据包。
由于蓝牙的功率低,导致蓝牙的覆盖范围很小,在第一终端设备和第二终端设备之间的通信距离较大,或有障碍物的场景下,蓝牙通信不稳定。因此,将Wifi路由器作为第一终端设备和第二终端设备之间的蓝牙中继。Due to the low power of the Bluetooth, the coverage of the Bluetooth is very small, and the Bluetooth communication is unstable when the communication distance between the first terminal device and the second terminal device is relatively large or there are obstacles. Therefore, the Wifi router is used as a Bluetooth relay between the first terminal device and the second terminal device.
由于Wifi网络覆盖越来越普及,很多公共场所,如地铁、公交、广场和商场都有Wifi网络的覆盖。因此将Wifi路由器作为蓝牙中继具有较大的实用价值。Due to the increasing popularity of Wifi network coverage, many public places, such as subways, buses, squares and shopping malls, have Wifi network coverage. Therefore, using a Wifi router as a Bluetooth relay has great practical value.
第一终端设备和第二终端设备与Wifi路由器同频,例如三者都使用2.4G网络,使得第一终端设备和第二终端设备能够与Wifi路由器进行通信。The first terminal device and the second terminal device have the same frequency as the Wifi router, for example, all three use a 2.4G network, so that the first terminal device and the second terminal device can communicate with the Wifi router.
第一终端设备和第二终端设备与Wifi路由器进行通信的过程如下:The process that the first terminal device and the second terminal device communicate with the Wifi router is as follows:
1、第一终端设备将第一信号P0同时发送给第二终端设备和Wifi路由器;1. The first terminal device simultaneously sends the first signal P0 to the second terminal device and the Wifi router;
2、第一信号P0经Wifi路由器接收后,Wifi路由器对第一信号P0进行放大,将放大后的第一信号P0作为第二信号P1,并第二信号P1发送给第二终端设备;2. After the first signal P0 is received by the Wifi router, the Wifi router amplifies the first signal P0, uses the amplified first signal P0 as the second signal P1, and sends the second signal P1 to the second terminal device;
3、第二终端设备先后接收第一信号P0和第二信号P1,并对P0的信号强度和P1的信号强度进行比较,对信号强度大的信号进行解调。其中,信号强度通过信号的电平进行表征,电平越大,信号强度越大。3. The second terminal device successively receives the first signal P0 and the second signal P1, compares the signal strength of P0 with the signal strength of P1, and demodulates the signal with higher signal strength. Wherein, the signal strength is characterized by the level of the signal, and the greater the level, the greater the signal strength.
第一信号P0的传播由于受到多径效应的影响,从第一终端设备到达第二终端设备的信号实际是多个信号叠加的结果。Since the propagation of the first signal P0 is affected by the multipath effect, the signal reaching the second terminal device from the first terminal device is actually the result of the superposition of multiple signals.
如图2所示,第一信号P0从第一终端设备A通过两条路径到达第二终端设备B,直接由第一终端设备A发送给第二终端设备B,或经Wifi路由器转发给第二终端设备B。As shown in Figure 2, the first signal P0 reaches the second terminal device B through two paths from the first terminal device A, and is directly sent by the first terminal device A to the second terminal device B, or forwarded to the second terminal device B via a Wifi router. terminal device B.
Wifi路由器的中继功能相当于是增加了某条路径下第一信号P0的信号能量,从而使得第二终端设备接收信号的信号功率提高。The relay function of the Wifi router is equivalent to increasing the signal energy of the first signal P0 under a certain path, so that the signal power of the signal received by the second terminal device is increased.
Wifi路由器的硬件框图如图3所示,Wifi路由器包括天线、滤波器、Wifi收发器、WifiAP内部缓存和PA(Power Amplifier,功率放大器)。The hardware block diagram of the Wifi router is shown in Figure 3. The Wifi router includes an antenna, a filter, a Wifi transceiver, a WifiAP internal cache, and a PA (Power Amplifier, power amplifier).
Wifi路由器对第一信号P0的接收过程包括:第一信号P0经Wifi路由器的天线接收,通过滤波器进行滤波后输入Wifi路由器的Wifi收发器。Wifi收发器将射频信号下变频为基带信号后缓存。The process of receiving the first signal P0 by the Wifi router includes: the first signal P0 is received by the antenna of the Wifi router, filtered by a filter, and then input to the Wifi transceiver of the Wifi router. The Wifi transceiver down-converts the RF signal to a baseband signal and buffers it.
Wifi路由器对第一信号P0的发射过程包括:Wifi收发器将缓存中的基带信号上变频为射频信号,经PA放大、滤波器进行滤波后,通过天线发送给第二终端设备。The transmission process of the first signal P0 by the Wifi router includes: the Wifi transceiver up-converts the baseband signal in the cache into a radio frequency signal, amplifies by the PA, filters it with a filter, and sends it to the second terminal device through the antenna.
本申请实施例充分利用Wifi路由器的硬件电路,第一信号P0的放大和上下变频完全复用Wifi路由器的射频前端电路进行处理。不需要专业的蓝牙芯片,不用额外增加硬件电路成本。The embodiment of the present application makes full use of the hardware circuit of the Wifi router, and the amplification and up-down conversion of the first signal P0 is completely multiplexed with the radio frequency front-end circuit of the Wifi router for processing. No professional bluetooth chip is required, no additional hardware circuit cost is required.
第二信号P1虽然为第一信号P0经Wifi路由器放大后的信号,但第二终端设备接收的P1的信号强度不一定比P0的信号强度大。Although the second signal P1 is the amplified signal of the first signal P0 through the Wifi router, the signal strength of P1 received by the second terminal device is not necessarily greater than the signal strength of P0.
例如,如图4所示,在Wifi路由器与第二终端设备B之间的距离远大于第一终端设备A与第二终端设备B之间的距离的情况下,P1的信号强度可能比P0的信号强度小。For example, as shown in Figure 4, when the distance between the Wifi router and the second terminal device B is much greater than the distance between the first terminal device A and the second terminal device B, the signal strength of P1 may be stronger than that of P0 The signal strength is low.
如图5所示,在从Wifi路由器到第二终端设备B的路径中存在障碍物的情况下,P1的信号强度可能比P0的信号强度小。As shown in FIG. 5 , when there is an obstacle in the path from the Wifi router to the second terminal device B, the signal strength of P1 may be smaller than that of P0 .
在P1大于P0的情况下,对P1进行解调;在P1小于P0的情况下,对P0进行解调。When P1 is greater than P0, P1 is demodulated; when P1 is smaller than P0, P0 is demodulated.
本申请实施例通过将wifi路由器作为蓝牙中继,利用wifi路由器的信号放大功能对第一终端设备发送的信号进行放大,在放大信号比原始信号的信号强度大的情况下,对放大信号进行解调,在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且不需要额外的专业设备。In the embodiment of the present application, by using the wifi router as a Bluetooth relay, the signal amplification function of the wifi router is used to amplify the signal sent by the first terminal device, and when the signal strength of the amplified signal is greater than that of the original signal, the amplified signal is decomposed. Adjustment, without changing the Bluetooth power consumption, expand the coverage of Bluetooth, and does not require additional professional equipment.
可选地,所述通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号之前,所述方法还包括:在所述第一终端设备的预设范围内存在与所述第一终端设备同频的Wifi路由器的情况下,显示经由所述Wifi路由器放大并转发信号的提示信息;Optionally, before sending the second signal to the second terminal device after amplifying the first signal via a Wifi router through the Wifi connection, the method further includes: within a preset range of the first terminal device If there is a Wifi router with the same frequency as the first terminal device in the internal memory, display a prompt message for amplifying and forwarding the signal via the Wifi router;
在第一终端设备和第二终端设备建立蓝牙连接的同时,第一终端设备检测预设范围内是否存在Wifi路由器。预设范围根据实际需要进行预先设定。While the first terminal device and the second terminal device establish a Bluetooth connection, the first terminal device detects whether there is a Wifi router within a preset range. The preset range is preset according to actual needs.
而且存在的Wifi路由器与第一终端设备同频,使得Wifi路由器与第一终端设备能够进行通信。Moreover, the existing Wifi router and the first terminal device have the same frequency, so that the Wifi router and the first terminal device can communicate.
在检测到与第一终端设备同频的Wifi路由器的情况下,第一终端设备发送显示提示信息。提示信息用于提示用户可连接Wifi路由器放大第一信号。提示信息的显示界面如图6所示。When a Wifi router with the same frequency as the first terminal device is detected, the first terminal device sends and displays prompt information. The prompt information is used to prompt the user to connect to the Wifi router to amplify the first signal. The display interface of the prompt information is shown in FIG. 6 .
接收第一输入;响应于所述第一输入,向所述Wifi路由器发送建立通信连接的请求,以建立所述Wifi连接。receiving a first input; in response to the first input, sending a request for establishing a communication connection to the Wifi router, so as to establish the Wifi connection.
第一输入的形式可以为鼠标点击操作或键盘输入操作,本申请实施例不限于第一输入的具体形式。The form of the first input may be a mouse click operation or a keyboard input operation, and this embodiment of the present application is not limited to a specific form of the first input.
如图6所示,用户点击提示信息的显示界面上的“是”按钮时,向Wifi路由器发送建立通信连接的请求,以建立Wifi连接。As shown in FIG. 6 , when the user clicks the "Yes" button on the display interface of the prompt information, a request for establishing a communication connection is sent to the Wifi router to establish a Wifi connection.
如图7所示,当在第一终端设备的预设范围内存在与所述第一终端设备同频的多个Wifi路由器的情况下,在提示信息的显示界面上还显示Wifi路由器的相关信息。As shown in Figure 7, when there are multiple Wifi routers with the same frequency as the first terminal equipment within the preset range of the first terminal equipment, the relevant information of the Wifi routers is also displayed on the display interface of the prompt information .
Wifi路由器的相关信息包括Wifi路由器的名称和信号强度,如Wifi路由器的名称为Wifi路由器1和Wifi路由器2。The relevant information of the Wifi router includes the name and signal strength of the Wifi router, for example, the names of the Wifi router are Wifi router 1 and Wifi router 2.
用户点击提示信息的显示界面上的“是”按钮的同时,还需选择Wifi路由器。根据用户的点击和选择操作,向用户选择的Wifi路由器发送建立通信连接的请求,以建立Wifi连接。When the user clicks the "Yes" button on the display interface of the prompt information, the Wifi router also needs to be selected. According to the click and selection operation of the user, a request for establishing a communication connection is sent to the Wifi router selected by the user, so as to establish a Wifi connection.
第一终端设备既支持蓝牙,也支持Wifi。当Wifi路由器作为蓝牙中继时,第一终端设备向Wifi路由器发送控制指令,建立Wifi连接。控制指令为Wifi信号。The first terminal device supports both bluetooth and Wifi. When the Wifi router acts as a Bluetooth relay, the first terminal device sends a control command to the Wifi router to establish a Wifi connection. The control command is Wifi signal.
Wifi路由器侦听第一终端设备发送的信号。通过信号的带宽判断信号是蓝牙信号还是Wifi信号,如蓝牙信号是1M带宽,Wifi是20M带宽,保证只对蓝牙信号进行放大。The Wifi router listens to the signal sent by the first terminal device. Determine whether the signal is a Bluetooth signal or a Wifi signal by the bandwidth of the signal. For example, the Bluetooth signal has a bandwidth of 1M, and the Wifi signal has a bandwidth of 20M, ensuring that only the Bluetooth signal is amplified.
本申请实施例通过在第一终端设备的预设范围内存在与第一终端设备同频的Wifi路由器的情况下,显示提示信息,方便用户根据提示信息进行Wifi连接操作。In the embodiment of the present application, when there is a Wifi router with the same frequency as the first terminal device within the preset range of the first terminal device, prompt information is displayed, so as to facilitate the user to perform Wifi connection operations according to the prompt information.
可选地,所述向所述Wifi路由器发送建立通信连接的请求,包括:Optionally, the sending a request for establishing a communication connection to the Wifi router includes:
在确定通过所述蓝牙连接发送的信号对应的接收功率小于预设阈值的情况下,向所述Wifi路由器发送建立通信连接的请求。When it is determined that the received power corresponding to the signal sent through the Bluetooth connection is less than a preset threshold, a request for establishing a communication connection is sent to the Wifi router.
其中,通过蓝牙连接发送的信号包括第一终端设备A和第二终端设备B通过蓝牙连接发送的信号。Wherein, the signal sent through the Bluetooth connection includes the signal sent by the first terminal device A and the second terminal device B through the Bluetooth connection.
A和B建立蓝牙连接后,A在确定A或B发送的信号的接收功率小于预设阈值Pb时,A向Wifi路由器发送建立通信连接的请求,以建立A和Wifi路由器之间的通信连接,开启信号放大功能,对A发送的第一信号进行放大。After A and B establish the Bluetooth connection, when A determines that the received power of the signal sent by A or B is less than the preset threshold Pb, A sends a request to establish a communication connection to the Wifi router to establish a communication connection between A and the Wifi router, Turn on the signal amplification function to amplify the first signal sent by A.
本申请实施例通过在蓝牙连接发送的信号对应的接收功率较小的情况下,才使用Wifi路由器作为蓝牙中继,实现资源的有效利用。In the embodiment of the present application, the Wifi router is used as the Bluetooth relay only when the receiving power corresponding to the signal sent by the Bluetooth connection is small, so as to realize effective utilization of resources.
可选地,所述方法还包括:向所述第二终端设备发送经由所述Wifi路由器进行数据转发所对应的传输延迟,所述传输延迟用于指示所述第二终端设备经过所述传输延迟后对所述第二信号进行接收。Optionally, the method further includes: sending to the second terminal device a transmission delay corresponding to data forwarding via the Wifi router, where the transmission delay is used to indicate that the second terminal device passes through the transmission delay Then the second signal is received.
由于蓝牙信号是时分信号,第一终端设备和第二终端设备不能在同一时刻发送信号。因此,当使用Wifi路由器作为蓝牙中继后,第一终端设备和第二终端设备需要约定Wifi路由器进行第一信号P0转发所对应的传输延迟t1。第二终端设备经过t1后才进行第二信号的接收。第二信号接收后才接着进行信号发送。Since the Bluetooth signal is a time-division signal, the first terminal device and the second terminal device cannot send signals at the same time. Therefore, when the Wifi router is used as the Bluetooth relay, the first terminal device and the second terminal device need to agree on a transmission delay t1 corresponding to the forwarding of the first signal P0 by the Wifi router. The second terminal device does not receive the second signal until t1 has elapsed. After the second signal is received, the signal is then sent.
如图8所示,在第一终端设备A和第二终端设备B均不经过Wifi路由器的情况下,A向B直接发送信号,B同时接收信号。接着B直接向A发送信号,A同时接收信号。TX表示发送,RX表示接收。As shown in FIG. 8 , when both the first terminal device A and the second terminal device B do not pass through the Wifi router, A directly sends a signal to B, and B receives the signal at the same time. Then B directly sends a signal to A, and A receives the signal at the same time. TX means send and RX means receive.
如图9所示,在第一终端设备A和第二终端设备B均经过Wifi路由器的情况下,A经过Wifi路由器向B发送信号,产生传输延迟t1,导致B接收和发送信号延迟t1,B的发送信号对应的A的接收信号也延迟t1。As shown in Figure 9, when both the first terminal device A and the second terminal device B pass through the Wifi router, A sends a signal to B through the Wifi router, resulting in a transmission delay of t1, resulting in a delay of t1 in receiving and sending signals from B, and B The corresponding received signal of A is also delayed by t1.
接着B经过Wifi路由器向A发送信号,产生传输延迟t2,B的发送信号对应的A的接收信号继续延迟t2,即A的接收信号总共延迟t1+t2。Then B sends a signal to A through the Wifi router, resulting in a transmission delay of t2, and the received signal of A corresponding to B's sent signal continues to be delayed by t2, that is, the total delay of A's received signal is t1+t2.
本申请实施例通过向第二终端设备发送经由Wifi路由器进行数据转发所对应的传输延迟,指示第二终端设备经过传输延迟后进行信号接收,接着才进行信号发送,避免第一终端设备和第二终端设备同时发送信号,提高通信质量。In this embodiment of the present application, by sending the transmission delay corresponding to the data forwarding via the Wifi router to the second terminal device, instructing the second terminal device to receive the signal after the transmission delay, and then to send the signal, avoiding the first terminal device and the second terminal device. Terminal devices send signals at the same time, improving communication quality.
可选地,所述方法还包括:基于所述数据包的大小,确定所述传输延迟。Optionally, the method further includes: determining the transmission delay based on the size of the data packet.
传输延迟根据第一终端设备向第二终端设备发送的数据包的大小确定。数据包越大,经由Wifi路由器进行数据转发的传输延迟越大。The transmission delay is determined according to the size of the data packet sent by the first terminal device to the second terminal device. The larger the data packet, the greater the transmission delay for data forwarding via the Wifi router.
本申请实施例实现准确确定传输延迟,从而指示第二终端设备经过传输延迟后进行信号接收,更好地避免第一终端设备和第二终端设备同时发送信号,提高通信质量。The embodiment of the present application realizes accurate determination of the transmission delay, thereby instructing the second terminal device to receive the signal after the transmission delay, better preventing the first terminal device and the second terminal device from sending signals at the same time, and improving communication quality.
如图10所示,本申请实施例通信方法的完整步骤如下:As shown in Figure 10, the complete steps of the communication method in the embodiment of the present application are as follows:
1、第一终端设备A和第二终端设备B建立蓝牙连接;1. The first terminal device A and the second terminal device B establish a Bluetooth connection;
2、第一终端设备A监测第一终端设备A的预设范围内是否存在与第一终端设备A同频的Wifi路由器;2. The first terminal device A monitors whether there is a Wifi router with the same frequency as the first terminal device A within the preset range of the first terminal device A;
若不存在,则A和B直接进行蓝牙通信,不经过Wifi路由器;If it does not exist, then A and B communicate directly through Bluetooth without going through the Wifi router;
若存在,则提示用户连接Wifi路由器;If it exists, prompt the user to connect to the Wifi router;
3、A连接Wifi路由器后检测A或B发送的信号对应的接收功率是否小于预设阈值Pb;3. After A connects to the Wifi router, it detects whether the receiving power corresponding to the signal sent by A or B is less than the preset threshold Pb;
若否,则A和B直接进行蓝牙通信,不经过Wifi路由器;If not, then A and B directly communicate with Bluetooth without going through the Wifi router;
若是,则A命令Wifi路由器开启蓝牙信号放大功能,且同B约定传输延迟t1;If so, then A orders the Wifi router to enable the Bluetooth signal amplification function, and agrees with B on the transmission delay t1;
4、A发送的P0经过Wifi路由器放大后变成第二信号P1,通过Wifi路由器发送P1到备B;同时A直接将P0发送到B;4. The P0 sent by A becomes the second signal P1 after being amplified by the Wifi router, and sends P1 to the standby B through the Wifi router; at the same time, A directly sends P0 to B;
5、B判断P0是否小于P1,对其中的较大者进行解调。5. B judges whether P0 is smaller than P1, and demodulates the larger one.
如图11所示,本申请实施例提供一种通信方法,应用于第二终端设备,该方法包括:As shown in Figure 11, the embodiment of the present application provides a communication method, which is applied to a second terminal device, and the method includes:
步骤1101,接收第一终端设备通过蓝牙连接发送的第一信号,并接收所述第一终端设备通过Wifi连接经由Wifi路由器对所述第一信号放大后发送的第二信号;
本申请实施例提供的方法应用于第二终端设备,该第二终端设备为蓝牙设备,如蓝牙耳机、手环等,或具有蓝牙功能的移动终端,如智能手机、个人电脑、平板电脑或可穿戴智能设备等。The method provided in the embodiment of the present application is applied to a second terminal device, which is a Bluetooth device, such as a Bluetooth headset, a wristband, etc., or a mobile terminal with a Bluetooth function, such as a smart phone, a personal computer, a tablet computer or a Wear smart devices, etc.
第一终端设备为蓝牙设备或具有蓝牙功能的移动终端。The first terminal device is a bluetooth device or a mobile terminal with a bluetooth function.
第一终端设备和第二终端设备开启蓝牙,两者之间直接进行蓝牙通信。即第一信号为蓝牙信号。The first terminal device and the second terminal device turn on Bluetooth, and directly perform Bluetooth communication between the two. That is, the first signal is a Bluetooth signal.
由于蓝牙的功率低,导致蓝牙的覆盖范围很小,在第一终端设备和第二终端设备之间的通信距离较大,或有障碍物的场景下,蓝牙通信不稳定。因此,将Wifi路由器作为第一终端设备和第二终端设备之间的蓝牙中继。Due to the low power of the Bluetooth, the coverage of the Bluetooth is very small, and the Bluetooth communication is unstable when the communication distance between the first terminal device and the second terminal device is relatively large or there are obstacles. Therefore, the Wifi router is used as a Bluetooth relay between the first terminal device and the second terminal device.
第一终端设备和第二终端设备与Wifi路由器同频,例如三者都使用2.4G网络,使得第一终端设备和第二终端设备能够与Wifi路由器进行通信。The first terminal device and the second terminal device have the same frequency as the Wifi router, for example, all three use a 2.4G network, so that the first terminal device and the second terminal device can communicate with the Wifi router.
第二终端设备通过两条路径接收第一终端设备发送的第一信号P0。一条路径为直接接收第一终端设备发送的第一信号P0;另一条路径为第一终端设备发送的第一信号P0经Wifi路由器放大后变成第二信号P1,接收Wifi路由器发送的第二信号P1。The second terminal device receives the first signal P0 sent by the first terminal device through two paths. One path is to directly receive the first signal P0 sent by the first terminal device; the other path is to amplify the first signal P0 sent by the first terminal device into the second signal P1 after being amplified by the Wifi router, and receive the second signal sent by the Wifi router P1.
步骤1102,在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下,对所述第二信号进行解调;其中,所述第一信号和所述第二信号携带相同的数据包。
第二信号P1虽然为第一信号P0经Wifi路由器放大后的信号,但第二终端设备接收的P1的信号强度不一定比P0的信号强度大。Although the second signal P1 is the amplified signal of the first signal P0 through the Wifi router, the signal strength of P1 received by the second terminal device is not necessarily greater than the signal strength of P0.
如在Wifi路由器与第二终端设备之间的距离远大于第一终端设备与第二终端设备之间的距离,或者Wifi路由器与第二终端设备之间存在障碍物的的情况下,P1的信号强度可能比P0的信号强度小。For example, when the distance between the Wifi router and the second terminal device is much greater than the distance between the first terminal device and the second terminal device, or there is an obstacle between the Wifi router and the second terminal device, the signal of P1 The intensity may be less than the signal intensity of P0.
第二终端设备对P0和P1进行比较。在P1大于P0的情况下,对P1进行解调;在P1小于P0的情况下,对P0进行解调。The second terminal compares P0 and P1. When P1 is greater than P0, P1 is demodulated; when P1 is smaller than P0, P0 is demodulated.
本申请实施例通过将wifi路由器作为蓝牙中继,利用wifi路由器的信号放大功能对第一终端设备发送的信号进行放大,第二终端设备在放大信号比原始信号的信号强度大的情况下,对放大信号进行解调,在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且也不需要额外的专业设备。In this embodiment of the present application, the wifi router is used as a Bluetooth relay, and the signal amplification function of the wifi router is used to amplify the signal sent by the first terminal device. When the signal strength of the amplified signal is greater than that of the original signal, the second terminal device amplifies Amplify the signal for demodulation, expand the coverage of Bluetooth without changing the power consumption of Bluetooth, and do not require additional professional equipment.
可选地,所述方法还包括:接收所述第一终端设备发送的、经由所述Wifi路由器进行数据转发所对应的传输延迟,并在经过所述传输延迟后进行信号接收。Optionally, the method further includes: receiving a transmission delay corresponding to data forwarding via the Wifi router sent by the first terminal device, and performing signal reception after the transmission delay passes.
由于蓝牙信号是时分信号,第一终端设备和第二终端设备不能在同一时刻发送信号。因此,当使用Wifi路由器作为蓝牙中继后,第一终端设备和第二终端设备需要约定Wifi路由器进行第一信号P0转发所对应的传输延迟t1。Since the Bluetooth signal is a time-division signal, the first terminal device and the second terminal device cannot send signals at the same time. Therefore, when the Wifi router is used as the Bluetooth relay, the first terminal device and the second terminal device need to agree on a transmission delay t1 corresponding to the forwarding of the first signal P0 by the Wifi router.
第二终端设备接收第一终端设备发送的传输延迟t1后,经过t1后才进行信号接收。第二终端设备在信号接收后才接着进行信号发送。After receiving the transmission delay t1 sent by the first terminal device, the second terminal device receives the signal after t1 has elapsed. The second terminal does not send the signal until after the signal has been received.
本申请实施例通过第二终端设备接收第一终端设备发送的经由Wifi路由器进行数据转发所对应的传输延迟,经过传输延迟后进行信号接收,接着才进行信号发送,避免第一终端设备和第二终端设备同时发送信号,提高通信质量。In this embodiment of the present application, the second terminal device receives the transmission delay corresponding to the data forwarding via the Wifi router sent by the first terminal device, receives the signal after the transmission delay, and then sends the signal, avoiding the first terminal device and the second terminal device. Terminal devices send signals at the same time, improving communication quality.
可选地,所述传输延迟是基于所述数据包的大小确定的。Optionally, the transmission delay is determined based on the size of the data packet.
传输延迟根据第一终端设备向第二终端设备发送的数据包的大小确定。数据包越大,经由Wifi路由器进行数据转发的传输延迟越大。The transmission delay is determined according to the size of the data packet sent by the first terminal device to the second terminal device. The larger the data packet, the greater the transmission delay for data forwarding via the Wifi router.
本申请实施例实现准确确定传输延迟,从而使得第二终端设备经过传输延迟后进行信号接收,更好地避免第一终端设备和第二终端设备同时发送信号,提高通信质量。The embodiment of the present application realizes accurate determination of the transmission delay, so that the second terminal device receives signals after the transmission delay, better avoids simultaneous transmission of signals by the first terminal device and the second terminal device, and improves communication quality.
需要说明的是,本申请实施例提供的通信方法,执行主体可以为通信装置,或者该通信装置中的用于执行加载通信方法的控制模块。本申请实施例中以通信装置执行加载通信方法为例,说明本申请实施例提供的通信方法。It should be noted that, for the communication method provided in the embodiment of the present application, the execution subject may be a communication device, or a control module in the communication device for executing the loading communication method. In the embodiment of the present application, the communication method provided in the embodiment of the present application is described by taking the communication device executing the loading communication method as an example.
如图12所示,本申请实施例提供的通信装置包括第一发送模块1201;其中:As shown in Figure 12, the communication device provided in the embodiment of the present application includes a
第一发送模块1201用于通过蓝牙连接向第二终端设备发送第一信号,并通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号,所述第二信号由所述第二终端设备在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下进行解调;所述第一信号和所述第二信号携带相同的数据包。The
其中,通信装置为蓝牙设备,如蓝牙耳机、手环等,或具有蓝牙功能的移动终端,如智能手机、个人电脑、平板电脑或可穿戴智能设备等。Wherein, the communication device is a Bluetooth device, such as a Bluetooth headset, a bracelet, etc., or a mobile terminal with a Bluetooth function, such as a smart phone, a personal computer, a tablet computer or a wearable smart device.
第二终端设备为蓝牙设备或具有蓝牙功能的移动终端。The second terminal device is a bluetooth device or a mobile terminal with a bluetooth function.
通信装置和第二终端设备开启蓝牙,两者之间直接进行蓝牙通信。即第一信号为蓝牙信号。The communication device and the second terminal device turn on Bluetooth, and directly perform Bluetooth communication between the two. That is, the first signal is a Bluetooth signal.
通信装置和第二终端设备与Wifi路由器同频,例如三者都使用2.4G网络,使得第一终端设备和第二终端设备能够与Wifi路由器进行通信。The communication device and the second terminal device have the same frequency as the Wifi router, for example, all three use a 2.4G network, so that the first terminal device and the second terminal device can communicate with the Wifi router.
第一信号P0从第一发送模块1201通过两条路径到达第二终端设备,直接由第一发送模块1201发送给第二终端设备B,或经Wifi路由器转发给第二终端设备B。The first signal P0 reaches the second terminal device through two paths from the
Wifi路由器的中继功能相当于是增加了某条路径下第一信号P0的信号能量,从而使得第二终端设备接收信号的信号功率提高。The relay function of the Wifi router is equivalent to increasing the signal energy of the first signal P0 under a certain path, so that the signal power of the signal received by the second terminal device is increased.
第二信号P1虽然为第一信号P0经Wifi路由器放大后的信号,但第二终端设备接收的P1的信号强度不一定比P0的信号强度大。Although the second signal P1 is the amplified signal of the first signal P0 through the Wifi router, the signal strength of P1 received by the second terminal device is not necessarily greater than the signal strength of P0.
在P1大于P0的情况下,对P1进行解调;在P1小于P0的情况下,对P0进行解调。When P1 is greater than P0, P1 is demodulated; when P1 is smaller than P0, P0 is demodulated.
本申请实施例通过将wifi路由器作为蓝牙中继,利用wifi路由器的信号放大功能对第一终端设备发送的信号进行放大,在放大信号比原始信号的信号强度大的情况下,对放大信号进行解调,在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且也不需要额外的专业设备。In the embodiment of the present application, by using the wifi router as a Bluetooth relay, the signal amplification function of the wifi router is used to amplify the signal sent by the first terminal device, and when the signal strength of the amplified signal is greater than that of the original signal, the amplified signal is decomposed. It can expand the coverage of Bluetooth without changing the power consumption of Bluetooth, and does not require additional professional equipment.
可选地,所述设备还包括连接模块,用于:在所述第一发送模块的预设范围内存在与所述第一发送模块同频的Wifi路由器的情况下,显示经由所述Wifi路由器放大并转发信号的提示信息;接收第一输入;响应于所述第一输入,向所述Wifi路由器发送建立通信连接的请求,以建立所述Wifi连接。Optionally, the device further includes a connection module, configured to: if there is a Wifi router with the same frequency as the first sending module within the preset range of the first sending module, display the connection via the Wifi router. Amplifying and forwarding the prompt information of the signal; receiving a first input; in response to the first input, sending a request for establishing a communication connection to the Wifi router, so as to establish the Wifi connection.
可选地,所述连接模块用于:在确定通过所述蓝牙连接发送的信号对应的接收功率小于预设阈值的情况下,向所述Wifi路由器发送建立通信连接的请求。Optionally, the connection module is configured to: send a request for establishing a communication connection to the Wifi router when it is determined that the received power corresponding to the signal sent through the Bluetooth connection is less than a preset threshold.
可选地,所述设备还包括第二发送模块,用于:向所述第二终端设备发送经由所述Wifi路由器进行数据转发的传输延迟,所述传输延迟用于指示所述第二终端设备经过所述传输延迟后进行信号接收。Optionally, the device further includes a second sending module, configured to: send to the second terminal device a transmission delay for data forwarding via the Wifi router, where the transmission delay is used to indicate that the second terminal device Signal reception takes place after the transmission delay.
可选地,所述设备还包括确定模块,用于:基于所述数据包的大小,确定所述传输延迟。Optionally, the device further includes a determining module, configured to: determine the transmission delay based on the size of the data packet.
如图13所示,本申请实施例提供的通信装置包括第一接收模块1301和解调模块1302;其中:As shown in Figure 13, the communication device provided by the embodiment of the present application includes a
第一接收模块1301用于接收第一发送模块通过蓝牙连接发送的第一信号,并接收所述第一发送模块通过Wifi连接经由Wifi路由器对所述第一信号放大后发送的第二信号;The
第一接收模块1301和第一发送模块之间直接进行蓝牙通信。即第一信号为蓝牙信号。Bluetooth communication is directly performed between the
由于蓝牙的功率低,导致蓝牙的覆盖范围很小,在第一终端设备和第二终端设备之间的通信距离较大,或有障碍物的场景下,蓝牙通信不稳定。因此,将Wifi路由器作为第一终端设备和第二终端设备之间的蓝牙中继。Due to the low power of the Bluetooth, the coverage of the Bluetooth is very small, and the Bluetooth communication is unstable when the communication distance between the first terminal device and the second terminal device is relatively large or there are obstacles. Therefore, the Wifi router is used as a Bluetooth relay between the first terminal device and the second terminal device.
第一接收模块1301和第一发送模块与Wifi路由器同频,例如三者都使用2.4G网络,使得第一接收模块1301和第一发送模块能够与Wifi路由器进行通信。The
第一接收模块1301通过两条路径接收第一发送模块发送的第一信号P0。一条路径为直接接收第一发送模块发送的第一信号P0;另一条路径为第一发送模块发送的第一信号P0经Wifi路由器放大后变成第二信号P1,接收Wifi路由器发送的第二信号P1。The
解调模块1302用于在确定所述第二信号的信号强度大于所述第一信号的情况下,对所述第二信号进行解调;其中,所述第一信号和所述第二信号携带相同的数据包。The
第二信号P1虽然为第一信号P0经Wifi路由器放大后的信号,但第二终端设备接收的P1的信号强度不一定比P0的信号强度大。Although the second signal P1 is the amplified signal of the first signal P0 through the Wifi router, the signal strength of P1 received by the second terminal device is not necessarily greater than the signal strength of P0.
解调模块1302对P0和P1进行比较。在P1大于P0的情况下,对P1进行解调;在P1小于P0的情况下,对P0进行解调。The
本申请实施例通过将wifi路由器作为蓝牙中继,利用wifi路由器的信号放大功能对第一终端设备发送的信号进行放大,第二终端设备在放大信号比原始信号的信号强度大的情况下,对放大信号进行解调,在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且也不需要额外的专业设备。In this embodiment of the present application, the wifi router is used as a Bluetooth relay, and the signal amplification function of the wifi router is used to amplify the signal sent by the first terminal device. When the signal strength of the amplified signal is greater than that of the original signal, the second terminal device amplifies Amplify the signal for demodulation, expand the coverage of Bluetooth without changing the power consumption of Bluetooth, and do not require additional professional equipment.
可选地,所述设备还包括第二接收模块,用于:Optionally, the device further includes a second receiving module, configured to:
接收所述第一发送模块发送的、经由所述Wifi路由器进行数据转发的传输延迟,并在经过所述传输延迟后进行信号接收。receiving the transmission delay of data forwarding via the Wifi router sent by the first sending module, and performing signal reception after the transmission delay passes.
可选地,所述传输延迟是基于所述数据包的大小确定的。Optionally, the transmission delay is determined based on the size of the data packet.
本申请实施例中的通信装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personaldigital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The communication device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, tablet computer, notebook computer, palmtop computer, vehicle electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant) , PDA), etc., the non-mobile electronic device can be a server, a network attached storage (NetworkAttached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., the embodiment of the present application Not specifically limited.
本申请实施例中的通信装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The communication device in this embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
本申请实施例提供的通信装置能够实现图1、图2、图6、图7,以及图9至图11的方法实施例中通信装置实现的各个过程,为避免重复,这里不再赘述。The communication device provided in the embodiment of the present application can realize the various processes implemented by the communication device in the method embodiments in Fig. 1, Fig. 2, Fig. 6, and Fig. 7, and Fig. 9 to Fig. 11. To avoid repetition, details are not repeated here.
本申请实施例通过将wifi路由器作为蓝牙中继,利用wifi路由器的信号放大功能对第一终端设备发送的信号进行放大,在放大信号比原始信号的信号强度大的情况下,对放大信号进行解调,在不改变蓝牙功耗的情况下,扩大蓝牙的覆盖范围,且也不需要额外的专业设备。In the embodiment of the present application, by using the wifi router as a Bluetooth relay, the signal amplification function of the wifi router is used to amplify the signal sent by the first terminal device, and when the signal strength of the amplified signal is greater than that of the original signal, the amplified signal is decomposed. It can expand the coverage of Bluetooth without changing the power consumption of Bluetooth, and does not require additional professional equipment.
图14为本申请实施例提供的一种电子设备的硬件结构示意图,如图14所示,该电子设备1400包括但不限于:射频单元1401、网络模块1402、音频输出单元1403、输入单元1404、传感器1405、显示单元1406、用户输入单元1407、接口单元1408、存储器1409、以及处理器1410等中的至少部分部件。FIG. 14 is a schematic diagram of the hardware structure of an electronic device provided by the embodiment of the present application. As shown in FIG. At least some of the components in the
本领域技术人员可以理解,电子设备1400还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图14中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the
应理解的是,本申请实施例中,输入单元1404可以包括图形处理器(GraphicsProcessing Unit,GPU)14041和麦克风14042,图形处理器14041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1406可包括显示面板14061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板14061。用户输入单元1407包括触控面板14071以及其他输入设备14072。触控面板14071,也称为触摸屏。触控面板14071可包括触摸检测装置和触摸控制器两个部分。其他输入设备14072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that, in this embodiment of the present application, the
本申请实施例中,射频单元1401将来自网络侧设备的下行数据接收后,给处理器1410处理;另外,将上行的数据发送给网络侧设备。通常,射频单元1401包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。In the embodiment of the present application, the
存储器1409可用于存储软件程序或指令以及各种数据。存储器1409可主要包括存储程序或指令区和存储数据区,其中,存储程序或指令区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1409可以包括高速随机存取存储器,还可以包括非易失性存储器,其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。The
处理器1410可包括一个或多个处理单元;可选地,处理器1410可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序或指令等,调制解调处理器主要处理无线通信,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1410中。The
其中,处理器1410,用于通过蓝牙连接向第二终端设备发送第一信号,并通过Wifi连接经由Wifi路由器对所述第一信号放大后向所述第二终端设备发送第二信号,所述第二信号由所述第二终端设备在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下进行解调;其中,所述第一信号和所述第二信号携带相同的数据包。Wherein, the
可选地,处理器用于:在所述第一终端设备的预设范围内存在与所述第一终端设备同频的Wifi路由器的情况下,显示经由所述Wifi路由器放大并转发信号的提示信息;接收用户的输入;响应于所述输入,向所述Wifi路由器发送建立通信连接的请求,以建立所述Wifi连接。Optionally, the processor is configured to: in the case that there is a Wifi router with the same frequency as the first terminal device within the preset range of the first terminal device, display a prompt message for amplifying and forwarding signals via the Wifi router ; receiving user input; in response to the input, sending a request to establish a communication connection to the Wifi router, so as to establish the Wifi connection.
可选地,处理器用于:在确定通过所述蓝牙连接发送的信号对应的接收功率小于预设阈值的情况下,向所述Wifi路由器发送建立通信连接的请求。Optionally, the processor is configured to: send a request for establishing a communication connection to the Wifi router when it is determined that the received power corresponding to the signal sent through the Bluetooth connection is less than a preset threshold.
可选地,处理器用于:向所述第二终端设备发送经由所述Wifi路由器进行数据转发所对应的传输延迟,所述传输延迟用于指示所述第二终端设备经过所述传输延迟后进行信号接收。Optionally, the processor is configured to: send to the second terminal device a transmission delay corresponding to data forwarding via the Wifi router, where the transmission delay is used to instruct the second terminal device to forward the data after the transmission delay signal reception.
可选地,处理器用于:基于所述数据包的大小,确定所述传输延迟。Optionally, the processor is configured to: determine the transmission delay based on the size of the data packet.
或者,处理器1410,用于接收第一终端设备通过蓝牙连接发送的第一信号,并接收所述第一终端设备通过Wifi连接经由Wifi路由器对所述第一信号放大后发送的第二信号;在确定所述第二信号的信号强度大于所述第一信号的信号强度的情况下,对所述第二信号进行解调;其中,所述第一信号和所述第二信号携带相同的数据包。Alternatively, the
可选地,处理器用于:接收所述第一终端设备发送的、经由所述Wifi路由器进行数据转发所对应的传输延迟,并在经过所述传输延迟后进行信号接收。Optionally, the processor is configured to: receive a transmission delay corresponding to data forwarding via the Wifi router sent by the first terminal device, and perform signal reception after the transmission delay passes.
可选地,所述传输延迟是基于所述数据包的大小确定的。Optionally, the transmission delay is determined based on the size of the data packet.
本申请实施例中的电子设备实施例是与上述方法实施例对应的产品实施例,上述方法实施例中的所有实现方式均适用于该电子设备实施例,亦可达到相同或相似的技术效果,故在此不再赘述。The electronic device embodiment in the embodiment of the present application is a product embodiment corresponding to the above-mentioned method embodiment. All the implementation methods in the above-mentioned method embodiment are applicable to this electronic device embodiment, and can also achieve the same or similar technical effects. So I won't repeat them here.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述物体间距测量方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, each process of the above-mentioned object distance measurement method embodiment is realized, and can achieve The same technical effects are not repeated here to avoid repetition.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述物体间距测量方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above embodiment of the object distance measurement method Each process, and can achieve the same technical effect, in order to avoid repetition, will not repeat them here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without more limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional elements in the process, method, article, or apparatus that includes the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Performing may also include performing functions in a substantially simultaneous manner or in a reverse order depending on the functions involved, for example, the described methods may be performed in an order different from that described, and additions, omissions, or Combine various steps. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this application.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110287740.8A CN113068168B (en) | 2021-03-17 | 2021-03-17 | Communication method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110287740.8A CN113068168B (en) | 2021-03-17 | 2021-03-17 | Communication method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113068168A CN113068168A (en) | 2021-07-02 |
CN113068168B true CN113068168B (en) | 2023-06-23 |
Family
ID=76561283
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110287740.8A Active CN113068168B (en) | 2021-03-17 | 2021-03-17 | Communication method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113068168B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117879629B (en) * | 2024-03-13 | 2024-05-07 | 成都正扬博创电子技术有限公司 | A method and device for processing response signals of an airborne collision avoidance system |
CN119893606A (en) * | 2025-02-20 | 2025-04-25 | 荣耀终端股份有限公司 | Communication method of Bluetooth equipment and related device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN205017328U (en) * | 2015-08-27 | 2016-02-03 | 杨珊珊 | Intelligence relay system and unmanned aerial vehicle thereof |
CN105451321B (en) * | 2015-12-01 | 2019-06-04 | 小米科技有限责任公司 | Promote the method, device and equipment of WIFI signal intensity |
CN105680927A (en) * | 2015-12-29 | 2016-06-15 | 青岛海尔智能家电科技有限公司 | Intelligent household appliance and WIFI signal relay method and device |
EP3509229B1 (en) * | 2018-01-04 | 2022-03-02 | Wilson Electronics, LLC | Detection of line loss in signal booster system |
CN111866831A (en) * | 2020-06-30 | 2020-10-30 | 歌尔科技有限公司 | Connection control method, device, terminal equipment and system |
-
2021
- 2021-03-17 CN CN202110287740.8A patent/CN113068168B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113068168A (en) | 2021-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107896119B (en) | Antenna sharing circuit and mobile terminal | |
CN110247678A (en) | A kind of terminal control method and terminal | |
CN108063646A (en) | Anti-interference method for electronic equipment and related products | |
CN109890022B (en) | Data transmission control method, mobile terminal and computer readable storage medium | |
CN111988771B (en) | Wireless connection control method, device and electronic equipment | |
EP3975436A1 (en) | Communication control method and apparatus, and electronic device | |
CN110166794B (en) | Live broadcast audio processing method, device and system | |
CN112262532B (en) | Method and terminal device for improving MIMO throughput direction by increasing radio frequency channel | |
CN113068168B (en) | Communication method, device, electronic device and storage medium | |
CN112769445A (en) | Radio frequency circuit, signal transmitting method and electronic equipment | |
WO2018120239A1 (en) | Network communication method and terminal | |
CN111313915B (en) | an electronic device | |
CN110149639B (en) | Interference processing method, terminal equipment and network side equipment | |
CN112769446B (en) | Radio frequency circuit, signal transceiving method and electronic device | |
WO2022206651A1 (en) | Instant communication method and apparatus, electronic device, and storage medium | |
WO2023169434A1 (en) | Communication method and apparatus | |
WO2022237325A1 (en) | Radio frequency front-end, chip and device | |
CN109711830B (en) | Quick display method and device for two-dimension code payment, mobile terminal and storage medium | |
CN112888055B (en) | Wi-Fi uplink data transmission method, device, electronic equipment and storage medium | |
CN112600583B (en) | Antenna control method, control device, user equipment and readable storage medium | |
CN107592132B (en) | Antenna switching method, multi-antenna terminal and computer readable storage medium | |
CN117545054B (en) | UWB communication method, device, storage medium and electronic equipment | |
CN113329203A (en) | Call control method, call control device, electronic device and readable storage medium | |
WO2022206831A1 (en) | Communication mode determination method and apparatus, and related device | |
CN106648902B (en) | Application data processing method and 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 |