Data transmission method and electronic equipment

By setting up AP and multiple short-range communication chips in electronic devices and using the priority judgment mechanism, antenna time-sharing multiplexing between multiple chips is achieved, solving the problem of multi-chip sharing antenna transmission data, and improving data transmission efficiency and service fluency.

CN119946727APending Publication Date: 2025-05-06HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311388887.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In electronic devices, how multiple short-range communication chips reasonably use antennas to transmit service data has become an urgent problem.

Method used

By setting the AP, the first chip and the second chip in the electronic device, the first chip and the second chip are respectively connected to the AP. Using the priority judgment mechanism, the first chip determines its priority after receiving the data. If it is lower than the preset priority, the second chip is notified to switch the antenna so that the second chip can use the antenna to transmit data.

Benefits of technology

It realizes reasonable antenna time-sharing multiplexing between multiple short-range communication chips, ensures the transmission rate of important data and ensures the smooth operation of important services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946727A_ABST
    Figure CN119946727A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and electronic equipment, and relates to the technical field of communication. After a first chip in the electronic equipment receives first data sent by an AP (Access Point), whether a priority corresponding to the first data is smaller than a first preset priority can be judged so as to determine whether a service corresponding to the first data is a low-flow service. And under the condition that the priority is smaller than the first preset priority, the first chip sends a first notification message to a second chip in the electronic equipment so as to actively inform the second chip that the first antenna can be switched. And the second chip responds to the first notification message and switches to use the antenna a to transmit the second data, so that reasonable time division multiplexing of the first antenna is realized, and the operation fluency of important services is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a data transmission method and an electronic device. Background Art

[0002] With the development of technology, electronic devices are generally equipped with short-range communication chips (such as WI-FI (wireless fidelity) chips), and electronic devices can use short-range communication chips to communicate with other electronic devices to transmit business data corresponding to the business with other electronic devices.

[0003] In order to improve the efficiency of electronic devices in processing different services, multiple short-range communication chips (such as two short-range communication chips) can be provided in the electronic device, so that the electronic device can use multiple short-range communication chips to process different services, that is, to transmit business data corresponding to different services. Since the space of the electronic device is limited, the short-range communication chip in the electronic device needs to use time-division multiplexing antennas to transmit business data. Therefore, how to use antennas to transmit business data between multiple short-range communication chips has become an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method and an electronic device for realizing service data transmission between multiple short-range communication chips using antennas.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a data transmission method is provided, which is applied to an electronic device, wherein the electronic device includes an AP, a first chip and a second chip. The first chip and the second chip are both short-range communication chips, and the AP is connected to the first chip and the second chip respectively.

[0007] After receiving the first data sent by the AP, the first chip determines whether the priority corresponding to the first data is less than the first preset priority. The priority corresponding to the data indicates the importance of the data. The higher the priority corresponding to the data, the higher the importance of the data and the more important the service corresponding to the data.

[0008] When it is determined that the priority corresponding to the first data is less than the first preset priority, the first chip can send a first notification message to the second chip, and the first notification message is used to trigger the second chip to switch the first antenna. The first antenna is an antenna multiplexed by the first chip and the second chip.

[0009] The second chip receives second data sent by the AP.

[0010] The second chip receives the first notification message, and in response to the first notification message, controls the first antenna to communicate with the second chip, so as to transmit the second data based on the first antenna. When the first antenna is connected to the second chip, the first antenna is disconnected from the first chip, that is, the first chip stops using the first antenna to transmit the first data.

[0011] In an embodiment of the present application, after receiving the first data, the first chip can determine whether the first data is less than the first preset priority, that is, determine whether the priority corresponding to the first data is smaller, that is, determine whether the importance of the first data is lower. When the priority corresponding to the first data is less than the first preset priority, it indicates that the priority corresponding to the first data is smaller and the importance is lower, that is, the importance of the service corresponding to the first data is lower, and the first chip can temporarily not use the first antenna to transmit the first data. Therefore, the first chip can actively notify the second chip so that the second chip switches to use the first antenna to transmit the second data, so that when the priority of the second data is higher, the first antenna can be used directly to transmit the second data, ensuring the transmission rate of important data, thereby ensuring the smoothness of the operation of important services, and ensuring the reasonable time-division multiplexing of the first antenna, so as to realize the reasonable transmission of service data of multiple short-range communication chips.

[0012] In a possible implementation of the first aspect, when the first chip determines that the priority corresponding to the first data is greater than or equal to the first preset priority, it indicates that the priority corresponding to the first data is greater and the importance is higher, that is, the service importance corresponding to the first data is higher, and therefore, the first chip can continue to use the first antenna to transmit the first data. After receiving the second data sent by the AP, the second chip sends a first request to the first chip, the first request including the priority corresponding to the second data, and the first request is used to request to use the first antenna.

[0013] The first chip receives the first request, and in response to the first request, determines whether the priority corresponding to the second data is greater than the priority corresponding to the first data being transmitted by the first chip. If it is determined that the priority corresponding to the second data is greater than the priority corresponding to the first data, the first chip may send an acceptance response message to the second chip. The acceptance response message indicates that the second chip is allowed to use the first antenna.

[0014] The second chip receives the above-mentioned acceptance response message. In response to the acceptance response message, the second chip controls the first antenna to communicate with the second chip, so as to transmit the second data based on the first antenna.

[0015] In the embodiment of the present application, since the priority of the first data processed by the first chip is higher, the first chip can continue to use the first antenna to process the first data to ensure the transmission rate of the first data. After receiving the second data sent by the AP, the second chip indicates that the first antenna needs to be used to transmit the second data. Since the first antenna is an antenna multiplexed by the first chip and the second chip, the second chip can send a first request to the first chip to negotiate with the first chip to use the first antenna. After receiving the first request, the first chip indicates that the second chip needs to use the first antenna. The first chip can determine whether the priority corresponding to the second data is less than the priority corresponding to the first data being transmitted by the first chip. In the case where the priority corresponding to the second data is greater than the priority corresponding to the first data, it indicates that the priority corresponding to the second data is higher, the importance of the second data is higher, and the service corresponding to the second data is more important. The first chip agrees that the second chip uses the first antenna, so the first chip can send an acceptance response message to the second chip. In response to the acceptance response message, the second chip controls the second chip to communicate with the first antenna so that the first data can be transmitted using the first antenna to ensure the transmission rate of important data, thereby ensuring the smoothness of the operation of important services and realizing the transmission of service data of multiple short-range communication chips.

[0016] In a possible implementation of the first aspect, the above-mentioned first chip can indicate that the priority of the first data is neither very small nor very large, when the priority corresponding to the first data is greater than or equal to the first preset priority and less than the second preset priority, that is, there is no temporary need to use the first antenna, nor is there a need to directly monopolize the antenna. Therefore, the first chip can transmit the first data based on the first antenna, and when the second chip requests to use the first antenna, the second chip can negotiate with the first chip to use the first antenna.

[0017] Among them, the above-mentioned second preset priority is greater than the first preset priority.

[0018] In a possible implementation of the first aspect, while the first chip uses the first antenna to transmit data (such as the above-mentioned first data), it can also use the second antenna to transmit the first data. The second antenna is an antenna used independently by the first chip, thereby realizing dual-antenna transmission of the first data and improving the transmission rate of the first data.

[0019] In a possible implementation manner of the first aspect, the first chip may use the second antenna to transmit data during a period when the first antenna is not used to transmit data, thereby ensuring that data transmission is not terminated.

[0020] In a possible implementation of the first aspect, during the period when the second chip uses the first antenna, the first chip receives third data sent by the AP. The first chip can determine whether the priority corresponding to the third data is greater than or equal to the second preset priority. When it is determined that the priority corresponding to the third data is greater than or equal to the second preset priority, the first chip can send a second notification message to the second chip, and the second notification message is used to trigger the second chip to stop using the first antenna.

[0021] The second chip receives the second notification message, and in response to the second notification message, controls the first antenna to communicate with the first chip. The first chip can transmit third data using the first antenna.

[0022] In an embodiment of the present application, after receiving the third data, the first chip can determine whether the third data is greater than or equal to the second preset priority, that is, determine whether the priority corresponding to the third data is very large, that is, determine whether the importance of the third data is very high. When the priority corresponding to the third data is greater than or equal to the first preset priority, it indicates that the priority corresponding to the first data is very large and the importance is very high, that is, the business importance corresponding to the third data is very high, and the first chip needs to immediately use the first antenna to transmit the third data to ensure that the transmission rate of the third data is high. Therefore, the first chip can actively notify the second chip so that the second chip switches the first antenna so that the first chip can use the first antenna to transmit the third data, ensure the transmission rate of important data, and then ensure the smoothness of the operation of important business, and ensure the reasonable time-division multiplexing of the first antenna, so as to realize the reasonable transmission of business data of multiple short-range communication chips.

[0023] In a possible implementation of the first aspect, when it is determined that the priority corresponding to the third data is greater than or equal to the second preset priority, it indicates that the priority corresponding to the third data is very high, and the first antenna needs to be used to transmit the third data to avoid affecting the service corresponding to the third data. Therefore, the first chip can send a second notification message to the second chip to notify the second chip to stop using the first antenna, so that the first chip can use the first antenna to transmit the third data.

[0024] In a possible implementation of the first aspect, the first chip and the second chip can communicate directly through a bus or input / output pins. In one case, the first chip and the second chip are connected through a bus. Accordingly, the first chip can interact with the second chip through the bus, such as sending a first notification message to the second chip through the bus.

[0025] In another case, the first chip and the second chip are connected via input / output pins. The first chip includes a first input / output pin, the second chip includes a second input / output pin, and the first input / output pin is connected to the second input / output pin. Accordingly, the first chip controls the first input / output pin to output a first electrical signal, the first electrical signal represents a first notification message, and the first electrical signal is a low level signal or a high level signal.

[0026] In another possible implementation manner of the first aspect, the first chip and the second chip may communicate indirectly through an AP. The first chip may send the first notification message to the second chip through the AP.

[0027] In a possible implementation of the first aspect, the second chip can switch the first antenna through a single-pole multi-throw switch. Specifically, the process of the second chip controlling the first antenna to be connected to the second chip may include: the second chip connects the first end and the second end of the single-pole multi-throw switch; wherein the first end of the single-pole multi-throw switch is connected to the first antenna, the second end of the single-pole multi-throw switch is connected to the second chip, and the single-pole multi-throw switch also includes a third end, and the third end is connected to the first chip.

[0028] In a possible implementation of the first aspect, the second data includes private data (i.e., data corresponding to a private service). The second chip can send the second data to the second chip in the first device based on the first antenna and in combination with a custom short-range communication protocol, and the second data is used to establish a short-range communication connection with the first device, so that the electronic device and the first device can establish a short-range communication connection using a custom short-range communication protocol, simplifying the short-range communication connection establishment process, thereby improving communication efficiency.

[0029] Optionally, the above-mentioned private services may include super notification services and / or multi-screen collaboration services, etc.

[0030] In a second aspect, a data transmission method is provided, which is applied to an electronic device. The electronic device includes an AP, a first chip and a second chip. The first chip and the second chip are short-range communication chips. The AP is connected to the first chip and the second chip, respectively.

[0031] The AP sends the first data to the first chip. The AP determines whether the priority corresponding to the first data is less than the first preset priority. If it is determined that the priority corresponding to the first data is less than the first preset priority, the AP may send a first notification message to the second chip. The priority indicates the importance of the data. The higher the priority, the higher the importance of the data (or service data). The first control message is used to instruct the second chip to switch to use the first antenna.

[0032] The AP sends the second data to the second chip.

[0033] In response to the first notification message, the second chip connects the first antenna to the second chip, and the second chip transmits the second data based on the first antenna. When the first antenna is connected to the first chip, the first antenna is disconnected from the second chip.

[0034] In the embodiment of the present application, the AP determines whether the priority corresponding to the first data transmitted by the first chip is low. When the priority corresponding to the first data transmitted by the first chip is low, the AP can trigger the second chip to switch to use the first antenna, so that the second chip can use the first antenna to transmit the second data, ensuring the transmission rate of important data, thereby ensuring the smoothness of important business operations, and realizing the transmission of business data of multiple short-range communication chips. In addition, by comparing priorities and sending notification messages through the AP, the processing volume of the first chip and the second chip can be reduced, and there is no need for a connection between the first chip and the second chip, which is an improvement on the chip.

[0035] In a third aspect, the present application provides a chip system, which includes a first chip and a second chip, and the first chip and the second chip are both short-range communication chips.

[0036] In a possible implementation manner of the third aspect, the first chip and the second chip are connected.

[0037] In a possible implementation manner of the third aspect, the chip system further includes an AP, which is connected to the first chip and the second chip respectively.

[0038] In a possible implementation manner of the third aspect, the chip system is applied to an electronic device, and the electronic device executes the method as described above.

[0039] In a fourth aspect, the present application provides an electronic device, comprising a first chip, a second chip and one or more processors; the display screen, the memory, the first chip and the second chip are coupled to the processor; the processor includes an application processor, the display screen is used to display an image generated by the processor, the memory is used to store computer program code, the first chip and the second chip are short-range communication chips, both used to transmit data, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method described above.

[0040] In a fifth aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0041] In a sixth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described above.

[0042] It can be understood that the beneficial effects that can be achieved by the data transmission method described in the second aspect, the chip system described in the third aspect, the electronic device described in the fourth aspect, the computer storage medium described in the fifth aspect, and the computer program product described in the sixth aspect provided above can refer to the beneficial effects in the first aspect and any possible implementation method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1A A schematic diagram of a collaborative scenario provided in an embodiment of the present application;

[0044] Figure 1B A collaborative scenario provided in an embodiment of the present application Figure 2 ;

[0045] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0046] Figure 3 A structural block diagram of an electronic device provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of a dual-chip structure provided in an embodiment of the present application;

[0048] Figure 5 A flowchart of a data transmission method provided in an embodiment of the present application is shown in FIG1 ;

[0049] Fig. 6A A schematic diagram of application startup provided in an embodiment of the present application is shown in FIG. 1 ;

[0050] Figure 6B An application startup diagram provided in an embodiment of the present application Figure 2 ;

[0051] Figure 6C An application startup diagram provided in an embodiment of the present application Figure 3 ;

[0052] Fig. 7A A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 2 ;

[0053] Figure 7B A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 3 ;

[0054] Figure 7C A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 4 ;

[0055] Figure 8Schematic diagram 1 of a single-pole double-throw switch provided in an embodiment of the present application;

[0056] Fig. 9 A single-pole double-throw switch provided in an embodiment of the present application Figure 2 ;

[0057] Fig. 10A A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 5 ;

[0058] Fig. 10B Schematic diagram 6 of a dual-chip structure provided in an embodiment of the present application;

[0059] Fig. 10C Schematic diagram 7 of a dual-chip structure provided in an embodiment of the present application;

[0060] Fig. 10D A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 8 ;

[0061] Fig.10E A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 9 ;

[0062] Fig.10F A schematic diagram of a dual-chip structure provided in an embodiment of the present application is shown in Figure 10;

[0063] Fig.11A A schematic diagram 11 of a dual-chip structure provided in an embodiment of the present application;

[0064] Fig. 11B A schematic diagram of a dual chip structure provided in an embodiment of the present application Figure 12 ;

[0065] Fig. 11C 13. Schematic diagram of a dual-chip structure provided for an embodiment of the present application;

[0066] Fig.11D Schematic diagram 14 of a dual-chip structure provided for an embodiment of the present application;

[0067] Fig.12 A schematic diagram of a data transmission method provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0068] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following items (individuals)" or similar expressions thereof refer to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In the embodiments of the present application, "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "multiple" is two or more.

[0069] To facilitate understanding of the embodiments of the present application, some terms involved in the embodiments of the present application are explained below.

[0070] Short-distance communication: refers to a communication method for transmitting data within a relatively close distance. When the distance between electronic devices is less than a certain distance, the electronic devices can communicate through short-distance communication. Exemplary short-distance communication methods may include Bluetooth, near field communication (NFC), WI-FI and other communication methods. In this application, short-distance communication can also be referred to as close-range communication or short-distance communication.

[0071] WI-FI connection mode: including WI-FI station (sta) mode and WI-FI peer-to-peer (P2P) mode. Among them, WI-FI sta mode means that an electronic device can establish a WI-FI connection with other devices through a wireless access point (access point, AP), that is, to conduct WI-FI communication, and the role of the electronic device can be a station. WI-FIP2P mode refers to the use of WI-FI technology between multiple devices to conduct point-to-point direct communication to form a P2P network (also referred to as a P2P group), which includes a group owner (group owner, Go) and at least one group client (group client, Gc). It can be understood that the group owner is equivalent to the above-mentioned wireless access point (or described as a router), and the group client is equivalent to the above-mentioned station.

[0072] In order to improve the efficiency of electronic equipment in processing services, the electronic equipment is provided with two short-range communication chips, namely a short-range main chip and a short-range auxiliary chip. The short-range main chip and the short-range auxiliary chip can transmit service data of corresponding services respectively to realize concurrent operation of services.

[0073] In some embodiments, users have more and more types of electronic devices, such as mobile phones, tablets, PCs, smart watches, Bluetooth headsets, smart screens, etc. In order to achieve interconnection between multiple electronic devices, the first electronic device can first perform device discovery through short-range communication. Then, the first electronic device transmits device authentication data (such as a key) to other discovered devices (second electronic devices) through short-range communication to match devices and establish a first short-range communication connection. In some embodiments, after the first short-range communication connection is established, the first electronic device can also establish a second short-range communication connection with the second electronic device, so that business data can be transmitted between electronic devices through the first short-range communication connection or the second short-range communication connection. In a multi-screen collaboration scenario or a super notification scenario, different types of electronic devices may establish short-range communication connections through different types of short-range communication chips. For example, taking the first electronic device as a mobile phone as an example, in a multi-screen collaboration scenario, the mobile phone can respectively communicate with the second electronic device through a short-range communication chip (here or referred to as a short-range main chip). Figure 1A The tablet computer and personal computer (PC) in the computer can establish a WI-FI P2P connection (or simply a P2P connection). In addition, the mobile phone can also communicate with the Figure 1A The Bluetooth headset, smart watch, mouse and keyboard in the embodiment establish a Bluetooth (BT) connection to transmit corresponding business data. Optionally, as Figure 1AAs shown, the mobile phone establishes Bluetooth low energy (BLE) connections with the mouse and keyboard respectively. The mobile phone establishes Bluetooth connections with the Bluetooth headset and the short-range main chip in the smart watch.

[0074] However, during the operation of the multi-screen collaborative service (or collaborative service) or the super notification service, the electronic device may also run other services at the same time, and the electronic device also needs to use the short-range communication chip to transmit the service data corresponding to other services. That is to say, not only the multi-screen collaborative service and the super notification service need to use the short-range communication chip, but there are also other services that require the support of the short-range communication chip. Therefore, in order to ensure the smoothness of the concurrent operation of the services, a short-range communication chip can be added inside the electronic device. That is to say, there are two short-range communication chips in the electronic device, and one of the two short-range communication chips can be called a short-range main chip, and the other can be called a short-range sub-chip. The short-range main chip and the short-range sub-chip can process different services at the same time. For example, the short-range main chip processes conventional services, such as video call services, social services, short video services, news services, file downloads, audio and video playback services, game services, etc. The short-range sub-chip can handle private services, such as multi-screen collaborative services, super notification services, etc.

[0075] For example, the mobile phone can communicate with the Figure 1B The tablet computer and PC (such as the short-range secondary chip in the tablet computer and PC) transmit the business data corresponding to the multi-screen collaborative business, such as device authentication data, screen projection data, file transfer, notification messages, etc. In addition, Figure 1B As shown, the mobile phone can also communicate with the smart watch and Bluetooth headset (such as the short-range sub-chip in the smart watch and Bluetooth headset) through the short-range sub-chip to transmit business data. For example, the smart watch can send business data such as heartbeat data, number of steps, and location detected by the smart watch to the short-range sub-chip in the mobile phone through the short-range sub-chip. The mobile phone can send audio data and command data (such as play, pause command data) and other business data to the short-range sub-chip in the Bluetooth headset through the short-range sub-chip. In addition, the mobile phone can communicate with the smart watch and Bluetooth headset through the short-range sub-chip. Figure 1B The mouse and keyboard shown communicate to transmit service data, such as user operation data. Optionally, when the mouse and keyboard include a short-range main chip and a short-range secondary chip, the mobile phone can communicate with the short-range secondary chip in the mouse and keyboard through the short-range secondary chip.

[0076] Among them, the mobile phone can establish a communication connection with other devices through a short-range communication protocol to transmit business data. Figure 1BAs shown, the mobile phone can establish P2P connections with the tablet computer and PC respectively through the P2P communication protocol. The mobile phone can establish Bluetooth connections with the Bluetooth headset, smart watch, keyboard and mouse respectively through the Bluetooth communication protocol. Figure 1B As shown, the mobile phone can establish BLE connections with the mouse and keyboard respectively.

[0077] Among them, optionally, the above-mentioned short-range communication protocol can be a custom short-range communication protocol (ie, a private protocol), for example, the above-mentioned P2P communication protocol can be a custom P2P communication protocol, and the above-mentioned Bluetooth communication protocol can be a custom Bluetooth communication protocol.

[0078] It should be noted that the above Figure 1B The scenario shown can also be a super notification scenario. For example, after receiving an incoming call, the mobile phone can send the incoming call data to a tablet computer, PC, Bluetooth headset, smart watch and other devices through the short-range secondary chip, so that the device can prompt the incoming call. Among them, optionally, Figure 1B The dotted circle in the figure indicates that the devices (i.e., tablet computer, PC, Bluetooth headset, smart watch, mobile phone, mouse and keyboard) can be networked and communicate with each other through the short-range secondary chip.

[0079] In addition, the above Figure 1B The tablet computer can also establish a short-distance communication connection with other devices (such as smart watches, PCs, etc.) through the short-distance main chip, so as to use the short-distance main chip to transmit the business data corresponding to other businesses. Similarly, the PC can also establish a short-distance communication connection with other devices (such as Bluetooth headsets, tablet computers, etc.) through the short-distance main chip, so as to use the short-distance main chip to transmit the business data corresponding to other businesses, so as to realize the concurrent operation of businesses.

[0080] Optionally, as above Figure 1A or Figure 1B As shown, tablet computers, mobile phones and PCs can be in the same network environment and use the WI-FI provided by the router.

[0081] It should be noted that the above-mentioned short-range main chip may include at least one of the following short-range communication chips: NFC chip, Bluetooth chip and WI-FI chip. Similarly, the short-range secondary chip may also include at least one of the following short-range communication chips: NFC chip, Bluetooth chip and WI-FI chip. The short-range secondary chip and the short-range main chip may include the same or different types of short-range communication chips. In addition, due to the limited space of the above-mentioned smart watch and Bluetooth headset, the smart watch and Bluetooth headset may not add an additional short-range communication chip, but only include one short-range communication chip.

[0082] In some embodiments, the short-distance main chip and the short-distance secondary chip need to use time-division multiplexing antennas to transmit service data. For electronic devices with small space such as mobile phones, the short-distance main chip and the short-distance secondary chip in the electronic device can reuse an antenna (or antenna a), thereby reducing the space occupied by the antenna. The short-distance main chip and the short-distance secondary chip use antenna a for time-division multiplexing, which means that during the period when the short-distance main chip uses antenna a to transmit service data, the short-distance secondary chip cannot use antenna a to transmit service data. During the period when the short-distance secondary chip uses antenna a to transmit service data, the short-distance main chip cannot use antenna a to transmit service data. In other words, the short-distance main chip and the short-distance secondary chip cannot use antenna a to transmit service data continuously, but transmit service data alternately, resulting in the data transmission rate of the short-distance main and secondary chips being affected, thereby affecting the services processed by the short-distance main chip and the short-distance secondary chip. If the service processed by the short-distance main chip has a high throughput requirement, that is, it is sensitive to the transmission rate, such as the service processed by the short-distance main chip is a video call service, resulting in the inability to transmit video call data in time, which may cause the video call to be disconnected, affecting the user experience.

[0083] Therefore, in response to the above problems, the present application provides a data transmission method. The electronic device includes a short-range main chip and a short-range sub-chip, and antenna a is reused between the short-range main and sub-chips. During the period when one chip in the short-range main and sub-chips uses antenna a to transmit business data, the other chip needs to transmit business data. For example, during the period when the short-range main chip uses antenna a to transmit business data 1 with an external device, when the short-range sub-chip needs to transmit business data 2, the short-range sub-chip can send the priority corresponding to business data 2 to the short-range main chip to apply to the short-range main chip for the use of antenna a. The short-range main chip can agree or refuse the short-range sub-chip to refuse to use antenna a according to the relationship between the priority corresponding to business data 1 and the priority corresponding to business data 2, that is, according to the importance of business 1 and business 2, to achieve the negotiated use of antenna a, so as to ensure the reasonable use of antennas to transmit business data between multiple short-range communication chips, ensure the transmission of important business data, avoid affecting the operation of important businesses, and ensure the smoothness of the operation of important businesses.

[0084] Alternatively, the short-range main chip can, when service data 1 is less than the preset priority 1, indicate that service 1 is a low-traffic service that does not need to use antenna a temporarily, and that service 1 is of low importance. Therefore, the short-range main chip can actively notify the short-range secondary chip to switch to antenna a, so that the short-range secondary chip can use antenna a to transmit service data 2, thereby achieving reasonable time-division multiplexing of antenna a, ensuring the operation of important services, and thus ensuring the smoothness of the operation of important services, and avoiding unnecessary antenna usage negotiations to reduce waste of resources.

[0085] It should be noted that after receiving the business data, the short-range main chip can also actively negotiate with the short-range secondary chip to use antenna a. The process is similar to the process in which the short-range secondary chip actively negotiates with the short-range main chip to use antenna a.

[0086] Exemplarily, the electronic device in the present application may be a mobile phone, a tablet computer, a laptop computer, a personal computer (PC), a smart TV (also referred to as a smart screen, a large screen, etc.), or wearable devices such as smart watches and smart bracelets, personal digital assistants (PDA), vehicle-mounted terminals, Internet of Things devices, and other devices with short-range communication chips.

[0087] Figure 2 A schematic structural diagram of an electronic device 100 is shown.

[0088] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0089] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0090] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0091] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0092] The processor 110 may also be provided with a memory for storing instructions and data.

[0093] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0094] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0095] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power for the electronic device 100 and the like.

[0096] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0097] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0098] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0099] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0100] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (WI-FI) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0101] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0102] In some embodiments, the number of the antennas 2 may be one or more. The wireless communication module 160 may include a short-range communication module (or short-range communication chip). The short-range communication chip may include at least one of NFC, WI-FI, and BT chips. The number of short-range communication chips is multiple, and the short-range communication chips may include the same chips or different chips. For example, the number of short-range communication chips is two, namely, a short-range main chip and a short-range secondary chip, the short-range main chip includes NFC, WI-FI, and BT chips, the short-range secondary chip includes NFC, WI-FI, and BT chips, and the short-range secondary chip includes the same chip as the short-range main chip. The short-range main chip includes NFC, WI-FI, and BT chips, the short-range secondary chip includes WI-FI and BT chips, and the short-range secondary chip includes different chips from the short-range main chip.

[0103] Among them, each short-range communication chip is connected to the above-mentioned AP, and is used to receive the service data assigned by the AP, send the service data to an external device, or receive the service data sent by an external device to realize the transmission of service data.

[0104] Optionally, the short-distance communication chips may reuse antennas. The short-distance communication chips may be directly connected to communicate, or the short-distance communication chips may communicate through an AP without establishing a connection between them.

[0105] Optionally, the short-range master chip supports a single input single output (SISO) mode and a multiple input multiple output (MIMO) mode. The short-range slave chip supports the SISO mode.

[0106] Exemplarily, the above-mentioned AP may also be referred to as an AP processor or an AP chip, etc.

[0107] In some embodiments, the above-mentioned AP chip can be integrated on a system-on-chip (SOC) chip of an electronic device, and the short-distance main chip and the short-distance secondary chip may not be integrated on the SOC, and the short-distance main chip and the short-distance secondary chip are two independent communication chips. Of course, this is only an example, and the short-distance main chip and / or the short-distance secondary chip can also be integrated on the SOC, and this application does not limit it, as long as the AP can be connected to the short-distance main chip and the short-distance secondary chip respectively.

[0108] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0109] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

[0110] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0111] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .

[0112] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0113] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0114] Among them, the above-mentioned sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor 180K, an ambient light sensor, a bone conduction sensor, etc.

[0115] The buttons 190 include a power button, a volume button, etc. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, messages, missed calls, notifications, etc.

[0116] The SIM card interface 195 is used to connect a SIM card. The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0117] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes a layered architecture system as an example to exemplify the software structure of the electronic device 100.

[0118] Figure 3 It is a structural block diagram of the electronic device 100 according to an embodiment of the present application.

[0119] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime and system library, hardware abstraction layer (HAL), and kernel layer.

[0120] The application layer can include a series of application packages.

[0121] like Figure 3 As shown, the application package may include camera, gallery, call, multi-screen collaboration, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0122] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0123] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a service priority module, a scene recognition module, a coexistence strategy module, and the like.

[0124] The scene recognition module is used to identify the application running on the electronic device 100, that is, the running service, that is, the service scenario, such as file download scenario, audio and video playback scenario, video call scenario, etc. The scene recognition module can send the service identifier (or application identifier, process identifier corresponding to the service, etc.) to the service priority module.

[0125] The service priority module is used to determine the priority corresponding to the service to mark the priority of the service. Optionally, the service priority module can send the priority corresponding to the service to the coexistence strategy module.

[0126] The coexistence strategy module is used to generate a target coexistence strategy based on the business processed by the short-range main chip, that is, the business scenario in which it is located, and then send the target coexistence strategy to the short-range secondary chip, so that the short-range secondary chip determines whether it is necessary to switch the target switch or reduce its own transmission frequency according to the target coexistence strategy. Among them, the target switch is used to realize the connection between the first antenna and the short-range main chip, or the first antenna and the short-range secondary chip, so that the short-range main chip can continue to use the first antenna.

[0127] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0128] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0129] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0130] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0131] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0132] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0133] A 2D graphics engine is a drawing engine for 2D drawings.

[0134] The hardware abstraction layer is the interface layer between the operating system kernel and the hardware circuit. Figure 3 As shown, the hardware abstraction layer may include a transmission link control module.

[0135] The transmission link control module is used to determine the short-distance communication chip that processes the service, and sends the service data to the short-distance communication chip that processes the service corresponding to the service data. Exemplarily, the transmission link control module can determine the short-distance communication chip that processes the service based on the type of service. For example, a certain service needs to transmit service data with a large amount of data, and the service does not have high real-time requirements. The priority corresponding to the service is low, and the transmission link control module can assign it to the main chip. Of course, the short-distance communication chip that processes the service can also be determined according to other rules, such as using a random allocation rule. This application does not limit the rules used to determine the short-distance communication chip that processes the service.

[0136] Optionally, the above-mentioned service priority module can send the priority corresponding to the service to the transmission link control module. After determining the short-distance communication chip that processes the service, the transmission link control module can send the priority corresponding to the service to the short-distance communication chip that processes the service. Alternatively, the transmission link control module can also send the information of the short-distance communication chip that processes the service to the service priority module, so that the service priority module can send the priority corresponding to the service to the short-distance communication chip, such as the short-distance communication chip that processes the service, and this application does not limit it.

[0137] The kernel layer is the layer between hardware and software. The kernel layer at least includes a short-distance main chip driver and a short-distance slave chip driver.

[0138] It should be understood that the software system to which the above-mentioned software layer belongs may be a software system located on the AP chip, that is, a program code running on the AP chip.

[0139] In some embodiments, when the relevant module needs to transmit data to the short-distance main chip, the relevant module can call the short-distance main chip driver to transmit the data to the short-distance main chip. When the relevant module needs to transmit data to the short-distance secondary chip, the relevant module can call the short-distance secondary chip driver to transmit the data to the short-distance secondary chip. For example, when the transmission link control module needs to transfer business data to the short-distance main chip, it can call the short-distance main chip driver to transmit the business data to the short-distance main chip, so that the short-distance main chip sends the business data to the external device. For another example, when the transmission link control module needs to transfer business data to the short-distance secondary chip, it can call the short-distance secondary chip driver to transmit the business data to the short-distance secondary chip, so that the short-distance secondary chip sends the business data to the external device.

[0140] It should be understood that the above-mentioned short-range main chip and short-range slave chip are only examples. The electronic device 100 may also include other numbers of short-range communication chips, each short-range communication chip has a corresponding short-range communication chip driver, such as including three short-range communication chips and three short-range communication chip drivers, and the short-range communication chips correspond to the short-range communication chip drivers one-to-one.

[0141] The following will take the above-mentioned electronic device as device 1 as an example to introduce a service transmission method provided by an embodiment of the present application. During the period when the short-range main chip in device 1 transmits service data with an external device, the short-range main chip can actively notify the short-range secondary chip to use or stop using antenna a based on the service data processed by it, so that device 1 can use the multiplexed antenna to preferentially transmit services with higher transmission rate requirements, that is, service data corresponding to important services, to achieve reasonable time-division multiplexing of the antenna, to ensure the transmission speed of important services, and thus to ensure the smooth operation of important services.

[0142] In the present application embodiment, Figure 4As shown, the dual chips in device 1 (i.e., the short-range main chip and the short-range secondary chip) time-share one antenna (i.e., antenna a), and the short-range main and secondary chips are connected by wires, so that the short-range main and secondary chips can communicate with each other. For example, the short-range main chip can actively notify the short-range secondary chip to use or stop using antenna a, or the secondary chips can negotiate and determine the short-range communication chip to use antenna a based on the priority of the business data, and execute the corresponding coexistence strategy, so that the short-range communication chip can use antenna a to transmit business data (or simply data), ensuring that the short-range communication chip can continuously transmit important business data, ensuring that the transmission delay of important business data is low, thereby ensuring that important business can be processed in a timely manner. Specifically, Figure 5 As shown, the time division multiplexing process may include S201-S228.

[0143] S201 . The short-range main chip in device 1 transmits service data 1 to device 2 via antenna a in device 1 .

[0144] Among them, antenna a (or called the first antenna) represents the antenna multiplexed by the above-mentioned short-range main chip (or called the first chip) and the short-range auxiliary chip (or called the second chip).

[0145] In the embodiment of the present application, device 1 runs service 1, and device 1 (such as the AP chip in device 1) determines that the short-range communication chip that processes the service 1 is the short-range main chip, then the AP chip can allocate the service data corresponding to service 1 (or referred to as service data 1) to the short-range main chip, and the short-range main chip needs to use an antenna (including antenna a) to transmit service data 1. If the short-range main chip and antenna a are connected, indicating that the short-range main chip is currently using antenna a, then the short-range main chip can continue to use antenna a to send service data 1 (or referred to as first data) to an external device (such as device 2). Of course, the short-range main chip can also receive service data corresponding to service 1 sent by an external device through antenna a.

[0146] The above service (such as service 1) may be a service corresponding to an application. For example, if device 1 is a mobile phone, Fig. 6A As shown, the user clicks the icon 10 of the first game application on the mobile phone desktop. In response to the click operation on the icon 10 of the first game application, the mobile phone starts the first game application (as shown in FIG. Figure 6B Startup content 11 and Figure 6CThe startup content 12) determines the short-distance communication chip responsible for processing the first game application, that is, transmitting the service data corresponding to the first game application (such as the short-distance main chip sends login data to the server corresponding to the first game application, the server sends the game screen data to the short-distance main chip, and the short-distance main chip sends the game screen data to the AP chip, so that the AP chip displays the corresponding game screen based on the game screen data). Here, the game service corresponding to the first game application can be understood as the above-mentioned service 1, and the service data corresponding to the first game application can be understood as service data 1.

[0147] Optionally, the antenna that can be used by the above-mentioned short-range main chip may also include antenna b (or called a second antenna), antenna b may be an independent antenna, and the short-range secondary chip cannot use antenna b to transmit data. Accordingly, the short-range main chip can use antenna b to transmit the above-mentioned service data 1.

[0148] In some embodiments, the AP chip can determine the chip that processes the service (such as service 1 mentioned above) according to the type of service. For example, if the AP chip determines that the service belongs to the first preset service, the AP chip assigns service 1 to the short-range main chip, and if it determines that the service belongs to the second preset service, the AP chip assigns service 2 to the short-range secondary chip. Among them, the first preset service and the second preset service are preset, such as the second preset service is a private service (such as a multi-screen collaborative service), and the first preset service is all services except the second preset service. Of course, the AP chip can also determine the chip that processes the service according to other rules, for example, it can be randomly assigned, and this application does not limit it.

[0149] S202 . The short-range master chip determines whether the priority corresponding to service data 1 is less than preset priority 1 .

[0150] Among them, the priority corresponding to the business data (such as the above-mentioned business data 1), that is, the priority corresponding to the business, indicates the importance of the business data, that is, the importance of the business corresponding to the business data. The higher the importance of the business, the higher the priority corresponding to the business, and the lower the importance of the business, the lower the priority corresponding to the business. Optionally, the importance can be characterized by throughput or latency. The higher the throughput of the business, or the lower the latency of the business, the more sensitive it is to the transmission rate, the higher the transmission rate required to transmit the business data corresponding to the business, and the higher the importance. When the transmission rate is low, the impact on the operation of the business with high throughput is greater, and may even cause business interruption. For example, the video call service is highly sensitive to the transmission speed. When the transmission rate of the video call data is low, the video call service may be stuck, or the video call may be disconnected, affecting the user experience.

[0151] In an embodiment of the present application, when the short-range main chip uses antenna a to transmit service data (which can be replaced here as service data 1), it can determine whether the priority corresponding to service data 1 is low, that is, whether it is less than the preset priority 1 (or called the first preset priority). In other words, it is determined whether the service 1 corresponding to the service data 1 has low requirements for throughput and latency.

[0152] When the priority corresponding to service data 1 is less than the preset priority 1, it indicates that the service has low requirements for throughput and latency, and service 1 is a low-traffic service. The short-range main chip can actively notify the short-range secondary chip and allow the short-range secondary chip to use antenna a when transmitting service data. Then the short-range main chip can execute S203.

[0153] When the priority corresponding to service data 1 is greater than or equal to the preset priority 1, it indicates that the service has high requirements for throughput and latency, and the short-range main chip needs to use antenna a, then the short-range main chip can execute S218 or S222.

[0154] S203: The short-range main chip sends a notification message 1 to the short-range slave chip, wherein the notification message 1 indicates that the short-range slave chip can switch to use antenna a.

[0155] In an embodiment of the present application, the short-range main chip sends a notification message 1 (or called the first notification message) to the short-range secondary chip to actively notify the short-range secondary chip to allow it to switch to use antenna a to transmit business data, so that the short-range secondary chip can use antenna a to transmit business data in a timely manner. When the business processed by the short-range secondary chip is a high-traffic business, the transmission rate of the high-traffic business can be guaranteed in a timely and effective manner, and there is no need for the short-range secondary chip to negotiate with the short-range main chip to use antenna a, thereby improving the switching efficiency of antenna a, improving the transmission efficiency of high-traffic business, and reducing the waste of resources.

[0156] In some embodiments, the short-distance main chip is connected to the short-distance slave chip so that the short-distance main chip and the short-distance slave chip can communicate with each other. In one embodiment, the short-distance main chip and the short-distance slave chip can be connected via pins. Specifically, Fig. 7A As shown, pin 1 (or the first input / output pin) of the short-range main chip is connected to pin 2 (or the second input / output pin) of the short-range slave chip through a wire. When the priority corresponding to the above-mentioned business data 1 is less than the preset priority 1, the signal output from pin 1 of the short-range main chip will change from signal 1 to signal 2, which is equivalent to notification message 1 to indicate that the short-range slave chip can switch to use antenna a.

[0157] The above-mentioned signal 1 and signal 2 (or referred to as the first electrical signal) are different electrical signals. For example, signal 1 is a low-level signal, and signal 2 can be a high-level signal. For another example, signal 1 is a high-level signal, and signal 2 can be a low-level signal.

[0158] Optionally, the pin 1 and the pin 2 may be input / output pins, such as GPIO pins. For example, the short-distance master chip and the short-distance slave chip are connected via GPIO pins to achieve communication between the short-distance master chip and the short-distance slave chip.

[0159] In another case, the short-distance master chip and the short-distance slave chip may be connected via a bus (eg Figure 7B The bus interface of the short-range main chip is connected to the bus interface of the short-range slave chip through a bus. When the priority corresponding to the above-mentioned service data 1 is less than the preset priority 1, the short-range main chip can send the above-mentioned notification message 1 to the short-range slave chip through the bus to realize active notification of antenna a switching.

[0160] In another case, the short-range main chip and the short-range slave chip can communicate with each other through the AP. When the priority corresponding to the service data 1 is less than the preset priority 1, the short-range main chip can send the notification message 1 (such as Figure 7C As shown), to realize active notification of antenna a switching. That is, the short-range main chip sends the notification message 1 to the AP, and the AP forwards the notification message 1 to the short-range secondary chip.

[0161] S204: The short-range slave chip receives service data 2 sent by the AP chip.

[0162] In an embodiment of the present application, device 1 runs a new service (here also referred to as service 2), and the AP chip in device 1 determines that the short-range communication chip that processes service 2 is a short-range secondary chip. Then the AP chip allocates the service data corresponding to service 2 (i.e., service data 2) to the short-range secondary chip.

[0163] S205. In response to the notification message 1, the short-distance slave chip conducts the first end and the second end of the single-pole double-throw switch 1, the second end is connected to the short-distance slave chip, and the first end is connected to the antenna a. The third end of the single-pole double-throw switch 1 is connected to the short-distance master chip.

[0164] Among them, the above-mentioned single-pole double-throw switch 1 may include a first end, a second end and a third end, the first end is a fixed end, and the second end and the third end are both movable ends. The first end is connected to the short-distance auxiliary chip, the second end is connected to the short-distance auxiliary chip, and the third end is connected to the short-distance main chip. Specifically, the short-distance auxiliary chip outputs a control signal 1 to the single-pole double-throw switch 1 to connect the first end and the second end of the single-pole double-throw switch 1, so that the antenna a is connected to the short-distance auxiliary chip, that is, the short-distance auxiliary chip can use the antenna a to transmit data. At this time, the antenna a is not connected to the short-distance main chip, and the short-distance main chip cannot use the antenna a to transmit data. For example, if Figure 8 As shown, the first end of the single-pole double-throw switch 1 is connected to the third end, and the antenna a is connected to the short-distance main chip, so that the short-distance main chip can use the antenna a to transmit business data (such as the above-mentioned business data 1). When the short-distance main chip sends a notification message 1 to the short-distance secondary chip, it indicates that the short-distance main chip allows the short-distance secondary chip to switch antenna a. In response to the notification message 1, the short-distance secondary chip can connect the first end of the single-pole double-throw switch 1 to the second end, and disconnect the third end from the first end, so that the short-distance secondary chip is connected to the antenna a (such as the above-mentioned business data 1). Fig. 9 As shown), the short-range secondary chip occupies the antenna a, so that the short-range secondary chip can use the antenna a to transmit business data. At this time, the antenna a is not connected to the short-range main chip, and the short-range main chip cannot use the antenna a to transmit business data.

[0165] In some embodiments, the short-distance slave chip can be connected to the first end of the single-pole double-throw switch 1 through a GPIO pin to output a control signal through the GPIO pin to trigger the switching of the single-pole double-throw switch 1.

[0166] In some embodiments, the short-distance slave chip can be connected to the second end of the single-pole double-throw switch 1 through the ANT pin to output a radio frequency signal through the ANT pin to achieve transmission of service data. In addition, the short-distance master chip can be connected to the third end of the single-pole double-throw switch 1 through a core (such as ANT) pin to output a radio frequency signal through the core pin to achieve transmission of service data.

[0167] It should be noted that the above-mentioned switching of antenna a through single-pole double-throw switch 1 is only an example. The switching of antenna a can also be achieved through other types of switches (such as other single-pole multi-throw switches, or single-pole single-throw switches). In other words, the short-range slave chip can achieve the connection between the short-range slave chip and antenna a, or the connection between the short-range main chip and antenna a through a switch (or called a target switch). The type of the switch is not limited, as long as it can achieve the switching of antenna a.

[0168] In addition, optionally, after receiving the above-mentioned notification message 1, the short-range secondary chip can directly respond to the notification message 1 and switch to use antenna a, so that when the short-range secondary chip receives service data 2 (or called second data), it can directly use antenna a to transmit service data 2 to ensure timely transmission of service data 2, so that when the priority corresponding to service data 2 is higher than the priority corresponding to service data 1, that is, service 2 is a high-traffic service compared to service 1, the normal operation of the high-traffic service can be timely and effectively guaranteed.

[0169] S206. The short-range secondary chip sends service data 2 to device 3 via antenna a.

[0170] In an embodiment of the present application, when it is necessary to transmit business data 2, the short-range secondary chip responds to the notification message 1 and can directly connect the short-range secondary chip with the antenna a, and use the antenna a to transmit the business data 2 without negotiating with the short-range main chip to use the antenna a, thereby ensuring the transmission rate of the business data transmitted by the short-range secondary chip. When the business data 2 transmitted by the short-range secondary chip corresponds to the business 2 that is a high-traffic business, the transmission rate of the high-traffic business can be guaranteed, that is, the transmission rate of the important business can be guaranteed, thereby timely and effectively ensuring the smooth operation of the important business.

[0171] In some embodiments, the above-mentioned device 1 may also include antenna b, and the short-range main chip exclusively uses antenna b. Therefore, while the short-range secondary chip uses antenna a, the short-range main chip can use antenna b to continue to transmit service data 1, ensuring that the service processed by the short-range main chip can continue to run, but the transmission speed of service data 1 will be reduced to avoid interruption of the service processed by the short-range main chip, thereby ensuring the user experience. Exemplarily, the short-range main chip can switch from MIMO mode to SISO mode to transmit service data 1 using antenna b.

[0172] Optionally, the short-range main chip can be connected to the antenna b via a core pin (such as an ANT pin) to output a radio frequency signal via the core pin to achieve transmission of service data.

[0173] It should be noted that the above S202-S206 is an optional process. After receiving the service data 1, the short-range main chip can directly send a request to the short-range secondary chip. The request may include the priority corresponding to the service data 1, so as to negotiate with the short-range secondary chip to use antenna a without determining whether the priority corresponding to the service data 1 is less than the preset priority 1.

[0174] S207. The short-range main chip receives the service data 3 sent by the AP chip.

[0175] S208 . The short-range master chip determines whether the priority corresponding to the service data 3 is greater than or equal to the preset priority 2 .

[0176] In an embodiment of the present application, while the short-range secondary chip is using antenna a to transmit service data 2, the short-range main chip can, upon receiving new service data (i.e., service data 3), first determine whether the priority corresponding to service data 3 (or the third data) is higher, that is, determine whether it is greater than or equal to the preset priority 2 (or the second preset priority). In other words, determine whether the service 3 corresponding to the service data 3 has higher requirements for throughput and latency.

[0177] When the priority corresponding to service data 3 is greater than or equal to the preset priority 2, it indicates that the service has high requirements for throughput and latency, and service 3 is a high-traffic service. The short-range main chip can actively notify the short-range secondary chip to stop using antenna a, and the short-range main chip can execute S209.

[0178] When the priority corresponding to service data 3 is less than the preset priority 2, it indicates that the service has low requirements on throughput and latency, and the short-range main chip can negotiate with the short-range secondary chip to use antenna a, then the short-range secondary chip can execute S212.

[0179] In addition, optionally, the short-range main chip may determine whether the priority corresponding to the service data 3 is less than the preset priority 1. If it is less than the preset priority 1, it indicates that the service data 3 is still a low-traffic service, and the short-range main chip may not execute the above S208, but may directly send a notification message 1 to the short-range secondary chip. Alternatively, the short-range main chip may execute S212 described below to negotiate with the short-range main chip to use antenna a.

[0180] S209: The short-range main chip sends a notification message 2 to the short-range secondary chip, wherein the notification message 2 instructs the short-range secondary chip to stop using antenna a.

[0181] The process of the short-distance master chip sending notification message 2 to the short-distance slave chip can refer to the process of the short-distance master chip sending notification message 1 to the short-distance slave chip. For example, the short-distance master chip can send the rejection notification message 2 to the short-distance master chip through a bus, a pin or an AP.

[0182] S210 , the short-distance slave chip connects the first terminal and the third terminal of the single-pole double-throw switch 1 in response to the notification message 2 .

[0183] S211. The short-range main chip sends service data 3 to device 4 via antenna a.

[0184] In the embodiment of the present application, after the short-distance secondary chip receives the notification message 2 (or the second notification message), it indicates that the short-distance main chip needs to use antenna a for transmission. Therefore, the short-distance secondary chip needs to switch antenna a. The short-distance secondary chip can control the single-pole double-throw switch 1 to switch, and connect the first end and the third end, so that antenna a is connected to the short-distance main chip, so that the short-distance main chip can use antenna a to transmit the service data 3 processed by the short-distance main chip to an external device (such as device 4). Since high-traffic services have high requirements for throughput and latency, when the short-distance main chip receives the service data corresponding to the high-traffic service, it can actively notify the short-distance secondary chip to switch antenna a, so that the short-distance main chip can use antenna a to transmit the service data corresponding to the high-traffic service in time, realize the timely and rapid transmission of high-traffic services, effectively ensure the transmission rate of high-traffic services, and avoid service interruption caused by high-traffic services. And there is no need to negotiate with the short-distance secondary chip, improve the switching rate of antenna a, and avoid unnecessary negotiations, reducing the waste of resources.

[0185] The above S209-S211 introduces the situation that after S208, business data 3 is the business data corresponding to the high-traffic business that needs to be transmitted in time using antenna a. The following will continue to combine S212-S217 to introduce the situation that business data 3 is not the business data corresponding to the high-traffic business that needs to be transmitted in time using antenna a.

[0186] S212 : When the priority corresponding to the service data 3 is greater than or equal to the preset priority 1 , the short-range master chip sends a request 1 to the short-range slave chip. The request 1 includes the priority corresponding to the service data 3 .

[0187] Request 1 is used to request to use antenna a.

[0188] In an embodiment of the present application, the short-range main chip can determine whether the priority corresponding to the service data 3 is greater than the preset priority 1 to determine whether the service data 1 is the service data corresponding to the low-traffic service that does not need to be transmitted using antenna a temporarily. When the priority corresponding to the service data 3 is less than the preset priority 1, it indicates that the short-range main chip is the service data corresponding to the low-traffic service that does not need to be transmitted using antenna a temporarily. The short-range main chip can send a notification message 1 to the short-range secondary chip to notify the short-range secondary chip that it can use antenna a. When the priority corresponding to the service data 3 is greater than or equal to the preset priority 1, the short-range main chip can negotiate with the short-range secondary chip to use antenna a.

[0189] In some embodiments, the short-distance master chip and the short-distance slave chip are connected via a bus, and the short-distance slave chip can directly send a request 1 to the short-distance master chip via the bus, that is, the priority (such as Fig. 10A Correspondingly, the short-distance master chip also sends a response message corresponding to the request 1 to the short-distance slave chip through the bus.

[0190] In other embodiments, the short-distance main chip and the short-distance slave chip are connected by pins, and the pin 3 of the short-distance slave chip and the pin 4 of the short-distance main chip are connected by wires. The level signal (such as signal 3 or signal 4) output by pin 3 can represent the priority. Among them, signal 3 can represent 0, signal 4 can represent 1, and signal 3 and signal 4 are different. For example, signal 3 is a low level signal, and signal 4 is a high level signal. For another example, signal 3 is a high level signal, and signal 4 is a low level signal.

[0191] Among them, the number of pins 3 and pins 4 is the same, and pins 3 and pins 4 are connected one by one. It is worth mentioning that the number of pins 3, that is, the number of pins 4, corresponds to the number of priorities. Specifically, the corresponding relationship can be that x is greater than or equal to and closest to A positive integer, where x represents the number of pins 3, and x represents the number of priorities.

[0192] For example, the number of priorities is 2 (priorities 0 and 1 respectively), is 1, then x is 1, that is, the number of pin 3 is 1, pin 3 outputs signal 3 (such as a low-level signal) indicating that the priority corresponding to business data 2 is 0, and pin 3 outputs signal 4 (such as a high-level signal) indicating that the priority corresponding to business data 2 is 1.

[0193] For another example, the number of priorities is 3 (priorities are 0, 1, and 2), Approximately equal to 1.7, then x is 2, that is, the number of pins 3 is 2, namely high pin 3 and low pin 3. Both low pin 3 and high pin 3 output low-level signals, indicating that the priority corresponding to business data 2 is 0. Low pin 3 outputs a high-level signal, and high pin 3 outputs a low-level signal, indicating that the priority corresponding to business data 2 is 01, that is, the priority corresponding to business data 2 is 1. Low pin 3 outputs a low-level signal, and high pin 3 outputs a high-level signal, indicating that the priority corresponding to business data 2 is 10, that is, the priority corresponding to business data 2 is 3. It should be understood that the number of pins 3 is 2, and the number of pins 4 is also 2 (such as Fig. 10B shown).

[0194] For another example, the number of priorities is 4 (priorities are 0, 1, 2, and 3), is approximately equal to 2, then x is 2, that is, the number of pins 3 is 2, namely, high pin 3 and low pin 3. When low pin 3 outputs a high level signal and high pin 3 outputs a high level signal, it means that the priority corresponding to business data 2 is 11, that is, the priority corresponding to business data 2 is 3.

[0195] In other embodiments, Fig. 10C As shown, the short-range master chip sends the request 1 to the short-range slave chip through the AP.

[0196] S213 . The short-range slave chip responds to request 1 and determines whether the priority corresponding to service data 2 is greater than the priority corresponding to service data 3 .

[0197] In an embodiment of the present application, after the short-range slave chip receives request 1 (or the first request) sent by the short-range main chip, it indicates that the short-range main chip needs to use antenna a. In order to ensure the smooth operation of important services, the short-range slave chip can determine whether the priority corresponding to the service data 2 being transmitted by the short-range slave chip is greater than the priority corresponding to the service data 3 transmitted by the short-range main chip, that is, whether the importance of service 2 processed by the short-range slave chip is greater than the importance of service 3 processed by the short-range main chip, that is, whether service 3 has higher requirements for throughput and latency.

[0198] When the priority corresponding to service data 2 is less than or equal to the priority corresponding to service data 3, it indicates that the importance of service 2 processed by the short-distance slave chip is less than or equal to the importance of service 3 processed by the short-distance main chip. Service 3 has higher requirements on throughput and latency, and the short-distance slave chip can execute S214.

[0199] When the priority corresponding to service data 2 is greater than the priority corresponding to service data 3, it indicates that the importance of service 2 processed by the short-distance slave chip is greater than the importance of service 3 processed by the short-distance main chip. Service 3 has lower requirements on throughput and latency, and the short-distance slave chip can execute S216.

[0200] The priorities corresponding to the above-mentioned service data (such as the priority corresponding to service data 1, the priority corresponding to service data 2, and the priority corresponding to service data 3) can be determined by the AP chip and sent to the short-range communication chip that transmits the service data. For example, the AP chip determines the priority corresponding to service data 1 and sends the priority corresponding to service data 1 to the short-range main chip. The AP chip determines the priority corresponding to service data 2 and sends the priority corresponding to service data 2 to the short-range secondary chip.

[0201] Optionally, the priority corresponding to the above-mentioned service data may be determined by a preset service priority table, which includes at least one service identifier (such as an application identifier, a process identifier for processing the service) and a priority corresponding to each service identifier in the at least one service identifier. For example, the AP chip searches for the priority corresponding to service 1 through the preset service priority table to obtain the priority corresponding to service data 1.

[0202] In addition, the priority corresponding to the above-mentioned service data may also be determined by the short-range communication chip that transmits the service data. For example, after obtaining service data 1, the short-range main chip determines the priority corresponding to the service data 1.

[0203] S214 , the short-distance slave chip sends an acceptance response message to the short-distance master chip, and connects the first terminal and the third terminal of the single-pole double-throw switch 1 .

[0204] In some embodiments, the short-distance master chip and the short-distance slave chip are connected via a bus, and the short-distance master chip can send an acceptance response message (such as Fig. 10D As shown), to trigger the short-range slave chip to switch antenna a, so that the short-range master chip can use antenna a.

[0205] In other embodiments, the short-distance master chip and the short-distance slave chip are connected via pins, such as Fig.10E As shown, pin 5 of the short-distance main chip is connected to pin 6 of the short-distance slave chip through a wire, and the electrical signal output by pin 5 of the short-distance main chip indicates the response message corresponding to the above request 1. For example, pin 5 outputs signal 5, indicating that the response message is an acceptance response message, and pin 5 outputs signal 6, indicating that the response message is a rejection response message. Signal 5 and signal 6 are different electrical signals. For example, signal 5 is a low-level signal, and signal 6 can be a high-level signal. For another example, signal 5 is a high-level signal, and signal 6 can be a low-level signal.

[0206] In other embodiments, Fig.10F As shown, the short-range main chip sends the above-mentioned receiving response message to the short-range slave chip through the AP.

[0207] It can be understood that, when the importance of the business processed by the short-range main chip (such as the above-mentioned business 3) is equal to the importance of the business processed by the short-range secondary chip (such as the above-mentioned business 2), the short-range main chip can be used by default to use antenna a, and of course, the short-range secondary chip can also be used by default to use antenna a. Alternatively, when the importance of the business processed by the short-range main chip is equal to the importance of the business processed by the short-range secondary chip, the chip occupying antenna a can continue to occupy antenna a without switching antenna a.

[0208] S215. The short-range main chip responds to the above-mentioned acceptance response message and sends service data 3 to device 4 through antenna a.

[0209] In the embodiment of the present application, after the short-range main chip receives the acceptance response message, it indicates that the short-range secondary chip has switched the antenna. The short-range main chip can use antenna a to transmit business data 3, such as sending business data 3 to device 4 through antenna a, or receiving business data 3 sent by device 4 through antenna a, to ensure that important business data is transmitted first, thereby ensuring the smooth operation of important businesses and improving the user experience.

[0210] S214-S215 above introduced the situation that after S213, the priority corresponding to business data 3 is less than or equal to the priority corresponding to business data 2. The following will continue to introduce the situation that the priority corresponding to business data 3 is greater than the priority corresponding to business data 2 in combination with S216-S217.

[0211] S216: The short-range slave chip sends a rejection response message to the short-range master chip.

[0212] S217 . The short-range slave chip continues to use antenna a to transmit service data 2 with device 3 .

[0213] In an embodiment of the present application, when the importance of the service 3 processed by the short-range main chip is less than the importance of the service 2 processed by the short-range secondary chip, it indicates that the service processed by the short-range secondary chip is more sensitive to the transmission rate than the service processed by the short-range main chip. Therefore, the device 1 needs to give priority to the service processed by the short-range secondary chip. The short-range secondary chip can send a rejection response message to the short-range main chip to reject the switching request of antenna a of the short-range main chip, and continue to use antenna a to transmit service data 2.

[0214] Among them, the process of sending the above-mentioned rejection response message can refer to the relevant description of sending the above-mentioned notification message (such as the above-mentioned notification message 1, notification message 2) or receiving the response message. For example, the short-range secondary chip can send a rejection response message to the short-range main chip through a bus, pin or AP.

[0215] In some embodiments, the short-range sub-chips in different devices can be used to process private services, so that the short-range sub-chips between different devices can use a custom short-range communication protocol to transmit business data. For example, the short-range sub-chip in the above-mentioned device 1 sends private business data (or called private data) to the sub-chip in device 3, and device 3 can also send private business data to the short-range sub-chip in device 1, thereby improving the efficiency of short-range communication and thus improving the efficiency of business data transmission. Exemplarily, the private business data is used to trigger device discovery, establish short-range communication connections, and transmit business data (or data) between devices. If the private business is a collaborative business, the short-range communication connection corresponding to the collaborative business includes a WI-FI connection, and the steps corresponding to the conventional WI-FI communication protocol (or standard WI-FI communication protocol) include scanning, authentication, association, first handshake, second handshake, third handshake, and fourth handshake. The custom short-range communication protocol includes a custom WI-FI communication protocol, and the steps corresponding to the WI-FI protocol may include some steps in the conventional WI-FI communication protocol. That is to say, the connection establishment steps corresponding to the custom short-range communication protocol are less than the connection establishment steps corresponding to the standard short-range communication protocol, such as omitting the authentication step, thereby simplifying the WI-FI connection process and improving the efficiency of business data transmission.

[0216] For another example, devices discover each other through a custom Bluetooth communication protocol, transmit password information, and define the Go and Gc roles. Afterwards, a P2P connection is established between devices based on the custom P2P communication protocol. The steps corresponding to the P2P communication protocol may include some steps in the conventional P2P communication protocol, that is, the connection establishment steps corresponding to the custom short-range communication protocol are less than the connection establishment steps corresponding to the standard short-range communication protocol, such as omitting the Go and Gc role negotiation steps, thereby improving the efficiency of establishing the P2P connection. It should be understood that the custom Bluetooth communication protocol also belongs to the custom short-range communication protocol.

[0217] For another example, business data can be transmitted between devices through a custom short-range communication protocol to simplify the business data transmission process and improve the efficiency of business data transmission. Optionally, after establishing a P2P connection between devices, business data can be transmitted based on a short-range secondary chip through a custom network communication protocol (such as a custom TCP / IP protocol). For example, the conventional TCP / IP protocol corresponds to four layers (application layer, transport layer, internet layer, and network access layer), and the number of layers corresponding to the custom TCP / IP protocol is less than the number of layers corresponding to the conventional TCP / IP protocol, thereby simplifying the business data transmission process.

[0218] Among them, optionally, the transmission of business data (such as the above-mentioned private business data) between devices through the same short-range secondary chip can avoid the failure of business data transmission caused by different model specifications of short-range communication chips between devices, thereby avoiding compatibility issues.

[0219] In some embodiments, the above S207-S211 are optional steps, that is, device 1 may not execute S207-S211. After the short-range secondary chip completes the transmission of service data 2, that is, after service 2 ends, it may directly switch antenna a so that the short-range main chip can use antenna a to transmit service data.

[0220] The above S203-S217 introduced the situation that after S202, service data 1 is the service data corresponding to the low-traffic service that can be temporarily transmitted without using antenna a. The following will continue to combine S218-S228 to introduce the situation that service data 1 is not the service data corresponding to the low-traffic service that can be temporarily transmitted without using antenna a.

[0221] S218. When the priority level corresponding to the service data 1 is greater than or equal to the preset priority level 2, the short-range master chip sends a notification message 2 to the short-range slave chip.

[0222] S219. The short-range main chip continues to transmit service data 1 using antenna a.

[0223] In an embodiment of the present application, when service 1 corresponding to service data 1 is a high-traffic service, the short-range main chip can send a notification message 2 to the short-range secondary chip to prohibit the short-range secondary chip from switching antenna a, thereby ensuring the smooth operation of service 1 and avoiding unnecessary negotiations, thereby realizing reasonable time-sharing multiplexing of antenna a.

[0224] Optionally, the short-range slave chip may not negotiate with the short-range master chip to use antenna a within a preset time period after receiving the notification message 2 .

[0225] S218-S219 above introduces the process that after S202, when it is determined that the priority corresponding to the service data 1 processed by the short-range main chip is greater than or equal to the preset priority 2, the short-range main chip prohibits the short-range secondary chip from using antenna a so as to use antenna a. The following will continue to introduce the process that after S202, when it is determined that the priority corresponding to the service data 1 processed by the short-range main chip is less than the preset priority 2 and greater than or equal to the preset priority 1, the short-range main chip negotiates with the short-range secondary chip to use antenna a.

[0226] S220. When the priority level corresponding to the service data 1 is lower than the preset priority level 2, the short-range main chip continues to transmit the service data 1 through the antenna a.

[0227] S221. The short-range slave chip receives service data 2 sent by the AP chip.

[0228] S222: The short-range slave chip sends a request 2 to the short-range master chip in response to the service data 2. The request 2 includes a priority corresponding to the service data 2.

[0229] Request 2 is used to request to use antenna a.

[0230] In an embodiment of the present application, when the priority corresponding to service data 1 is between the preset priority 1 and the preset priority 2, the short-range main chip does not send notification message 1 and notification message 2 to the short-range secondary chip. Device 1 runs a new service (here or referred to as service 2), and the AP chip in device 1 determines that the short-range communication chip that processes service 2 is the short-range secondary chip, then the AP chip allocates the service data corresponding to service 2 (i.e., service data 2) to the short-range secondary chip. After obtaining service data 2, the short-range secondary chip indicates that it is necessary to use antenna a to send the service data 2 to the external device. The short-range secondary chip needs to negotiate with the short-range main chip to use antenna a. For example, the short-range secondary chip can send request 2 to the short-range main chip, and determine whether to switch antenna a according to the response message corresponding to request 2 returned by the short-range main chip, so that the short-range secondary chip actively negotiates with the short-range main chip to use antenna a.

[0231] In some embodiments, during the period when the short-range main chip uses antenna a to transmit service data (such as the above-mentioned service data 1), the short-range main chip can send the data transmission status information of the short-range main chip to the short-range slave chip. Accordingly, the above-mentioned S221 can be replaced by describing that when the above-mentioned data transmission status information is received, the short-range slave chip responds to the above-mentioned service data 2 and sends request 1 to the short-range main chip. The request 1 includes the priority corresponding to the service data 2.

[0232] The data transmission status information may include transmit (TX) status information and receive (RX) status information. The transmit status information indicates that device 1 sends service data to an external device via antenna a, that is, the short-range main chip is in a transmit state. The receive status information indicates that the short-range main chip receives service data sent by an external device via antenna a, that is, the short-range main chip is in a receive state.

[0233] In an embodiment of the present application, the short-distance main chip can share the state of the short-distance main chip with the short-distance secondary chip. When the short-distance main chip uses antenna a to transmit business data (such as business data 1) with an external device, the short-distance main chip can notify the short-distance secondary chip that the short-distance main chip is in a data transmission state, so that when the short-distance secondary chip needs to use antenna a to transmit business data, it determines whether it is necessary to negotiate with the short-distance main chip to use antenna a according to the state of the short-distance main chip. Exemplarily, the short-distance secondary chip can determine whether the short-distance main chip is in a data transmission state based on the data transmission state information. When the short-distance main chip is in a data transmission state, it indicates that the short-distance main chip also needs to use antenna a to transmit business data, and the short-distance secondary chip needs to negotiate with the short-distance main chip to use antenna a. When it is determined that the short-distance main chip is not in a data transmission state, it indicates that there is no demand for using antenna a at present. Therefore, the short-distance secondary chip does not negotiate with the short-distance main chip to use antenna a, and the short-distance secondary chip can directly switch antenna a to use antenna a to transmit business data 2, thereby avoiding unnecessary negotiations.

[0234] Optionally, each time the short-range main chip uses antenna a to send service data once, or uses antenna a to receive service data once, it will send data transmission status information to the short-range secondary chip.

[0235] In some embodiments, the short-distance main chip is connected to the short-distance secondary chip so that communication can be performed between the short-distance main chip and the short-distance secondary chip. In one case, the short-distance main chip and the short-distance secondary chip can be connected through pins. Specifically, pin 7 of the short-distance main chip is connected to pin 8 of the short-distance secondary chip through a wire. When the short-distance main chip uses antenna a to send business data 1, or receives business data 1, the signal output by pin 7 of the short-distance main chip will change from signal 7 to signal 8, and the signal 8 indicates that the short-distance main chip is in a data transmission state, that is, it indicates data transmission status information. Afterwards, the short-distance main chip can send the signal 8 to the short-distance secondary chip.

[0236] The above-mentioned signal 7 and signal 8 are different electrical signals. For example, signal 7 is a low-level signal, and signal 8 can be a high-level signal. For another example, signal 7 is a high-level signal, and signal 8 can be a low-level signal.

[0237] Optionally, the pins 7 and 8 may be input / output pins, such as GPIO pins. For example, the short-distance master chip and the short-distance slave chip are connected via GPIO pins to achieve communication between the short-distance master chip and the short-distance slave chip.

[0238] It should be noted that the number of the pins 7 and 8 is the same, and the number of the pins 7 and 8 can be more than one. Fig.11AAs shown, the number of pins 7 is two, and correspondingly, the number of pins 8 is also two, pins 7 and pins 8 are connected one by one, one pin 7 (or pin 7A) is used to transmit the sending status information, and the other pin 7 (or pin 7B) is used to transmit the receiving status information. Specifically, the short-range main chip uses antenna a to send service data 1 to device 2 (simply described as the short-range main chip sends service data 1), the signal output by pin 7A will change from signal 7 to signal 8, and the signal output by pin 7B is still signal 7, indicating that the short-range main chip is in the sending state, and the sending status information is shared with the short-range secondary chip. The short-range main chip uses antenna a to receive business data 1 sent by device 1 (briefly described as the short-range main chip receives business data 1). The signal output by pin 7A is still signal 7, and the signal output by pin 7B changes from signal 7 to signal 8, indicating that the short-range main chip is in a receiving state, and shares the receiving state information with the short-range secondary chip, so that the short-range secondary chip can know the specific data transmission state of the short-range main chip, and realize accurate sharing of the data transmission state, so that when the short-range secondary chip needs to use antenna a to transmit business data, it can determine whether to negotiate with the short-range main chip to use antenna a according to whether the short-range main chip is in a data transmission state.

[0239] Alternatively, since the short-distance slave chip only needs to determine whether the short-distance master chip is in a data transmission state, thereby determining whether it needs to negotiate with the short-distance master chip, the number of the pins 7 and 8 can be one (eg Fig. 11B Specifically, when the short-range main chip sends service data 1, the signal output by pin 7 will change from signal 7 to signal 8, indicating that the short-range main chip is in a data transmission state, and data transmission status information is sent to the short-range secondary chip. When the short-range main chip receives service data 1, the signal output by pin 7 will change from signal 7 to signal 8, indicating that the short-range main chip is in a data transmission state, and data transmission status information is sent to the short-range secondary chip, so that the short-range secondary chip knows that the short-range main chip is in a data transmission state. When the short-range secondary chip needs to use antenna a to transmit service data, it determines whether to negotiate with the short-range main chip to use antenna a based on whether the short-range main chip is in a data transmission state.

[0240] In another case, the bus interface of the short-distance master chip is connected to the bus interface of the short-distance slave chip through a bus. When the short-distance master chip sends service data 1 or receives service data 1, the short-distance master chip can send data transmission status information to the short-distance slave chip (as described above). Fig. 11CAs shown), to indicate that the short-distance main chip is in a data transmission state, and to achieve sharing of the data transmission state. Exemplarily, the short-distance main chip sends business data 1, and the short-distance main chip can send the sending state information to the short-distance secondary chip, and the short-distance main chip receives business data 1, and the short-distance main chip can send the receiving state information to the short-distance secondary chip, so that the short-distance secondary chip knows the specific data transmission state of the short-distance main chip. Alternatively, whether the short-distance main chip sends business data 1 or receives business data 1, it can send data transmission state information to the short-distance secondary chip, so that the short-distance secondary chip knows that the short-distance main chip is in a data transmission state.

[0241] In another case, if Fig.11D As shown, the short-range main chip sends the data transmission status information to the short-range slave chip through the AP.

[0242] In some embodiments, the process in which the short-distance secondary chip determines whether the short-distance main chip is in a data transmission state may include: when the short-distance secondary chip receives the service data 2 sent by the AP chip, it determines whether the data transmission status information sent by the short-distance main chip is received within the target time. The target time includes a preset time 1 before the current time and / or a preset time 2 after the current time. If yes, the short-distance secondary chip can determine that the short-distance main chip is in a data transmission state. If not, the short-distance secondary chip determines that the short-distance main chip is not in a data transmission state. For example, after the short-distance secondary chip receives the service data corresponding to the multi-screen collaborative service, it determines whether the data transmission status information sent by the short-distance main chip is received within 30 seconds before and after. If yes, the short-distance secondary chip determines that the short-distance main chip is in a data transmission state. If not, the short-distance secondary chip determines that the short-distance main chip is not in a data transmission state. Here, the service data corresponding to the multi-screen collaborative service refers to service data 2, and 30 seconds before and after refers to the target time.

[0243] S223 . The short-range master chip responds to request 2 and determines whether the priority corresponding to service data 1 is greater than or equal to the priority corresponding to service data 2 .

[0244] In the embodiment of the present application, while the short-range main chip uses antenna a, the short-range main chip has the decision-making power of antenna a. After the short-range main chip receives request 1 sent by the short-range secondary chip, it indicates that the short-range secondary chip needs to use antenna a. In order to ensure the smooth operation of important services, the short-range main chip can determine whether the priority corresponding to the service data 1 transmitted by the short-range main chip is greater than or equal to the priority corresponding to the service data 2 that the short-range secondary chip needs to transmit, that is, whether the importance of service 1 processed by the short-range main chip is greater than or equal to the importance of service 2 processed by the short-range secondary chip.

[0245] When the priority corresponding to service data 1 is lower than the priority corresponding to service data 2, it indicates that the importance of service 1 processed by the short-distance main chip is lower than the importance of service 2 processed by the short-distance secondary chip, and the short-distance main chip can execute S224.

[0246] When the priority corresponding to service data 1 is greater than or equal to the priority corresponding to service data 2, it indicates that the importance of service 1 processed by the short-distance main chip is greater than or equal to the importance of service 2 processed by the short-distance secondary chip, and the short-distance main chip can execute S227.

[0247] S224. The short-range master chip sends an acceptance response message to the short-range slave chip.

[0248] S225 . In response to the acceptance response message, the short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 .

[0249] In an embodiment of the present application, after the short-range secondary chip receives the acceptance response message, it indicates that the short-range secondary chip can switch the antenna so that the short-range secondary chip can use antenna a. The short-range secondary chip responds to the acceptance response message and can connect the first end and the second end of the single-pole double-throw switch 1, thereby switching antenna a to the short-range secondary chip side, so that the short-range secondary chip can transmit business data 2, ensuring that important business data is transmitted first, thereby ensuring the smooth operation of important businesses.

[0250] In some embodiments, the short-range secondary chip may send a request 2 to the short-range main chip once for each service data 2 sent by the AP during the period of occupying antenna a to transmit service data 2, that is, send the priority corresponding to service data 2 to the short-range main chip to negotiate with the short-range main chip to use the short-range communication chip of antenna a. Alternatively, in order to reduce the number of times request 2 is sent to reduce resource consumption, the short-range secondary chip may not actively send request 2 during the period of occupying antenna a, but wait for the short-range main chip to send a request or notification message (such as the above notification message 1 or notification message 2). The request includes the service data corresponding to the service data processed by the short-range main chip. After receiving the request or notification message sent by the short-range main chip, determine whether to switch antenna a.

[0251] S226. The short-range secondary chip sends service data 2 to device 3 via antenna a.

[0252] In an embodiment of the present application, after the short-range secondary chip is connected to antenna a, the short-range secondary chip can use antenna a to transmit business data 2 with an external device (such as device 3), such as sending business data 2 to device 3 through antenna a, or receiving business data 2 sent by device 3 through antenna a.

[0253] In the embodiment of the present application, the short-range slave chip and the short-range main chip reuse antenna a, and avoid working at the same time through negotiation, that is, avoid using antenna a to transmit business data at the same time, thereby avoiding mutual interference of signals caused by working at the same time, ensuring the rate of business data transmission, and realizing reasonable time-sharing multiplexing of antenna a, which can effectively ensure the smooth operation of important businesses and improve the user experience.

[0254] In some embodiments, after S226, the short-range main chip receives the service data corresponding to service 3 (or referred to as the above-mentioned service data 3) sent by the AP chip, indicating that the short-range main chip needs to transmit service data 3. Therefore, the short-range main chip needs to negotiate with the short-range secondary chip to use antenna a. The short-range main chip can send request 3 to the short-range secondary chip. The request 3 can be service 3, that is, the priority corresponding to the service data corresponding to service 3.

[0255] Optionally, the short-distance main chip can send request 3 to the short-distance slave chip through a bus, AP or pin. The detailed process can refer to the content of the short-distance slave chip sending request 1 to the short-distance main chip through a bus, AP or pin introduced above, and will not be repeated here.

[0256] Among them, optionally, when the priority corresponding to service data 3 is greater than or equal to the preset priority 1 and less than the preset priority 2, the short-range main chip can send request 3 to the short-range secondary chip, indicating that service 3 is neither a high-traffic service that requires timely use of antenna a nor a low-traffic service that does not require the use of antenna a.

[0257] In some embodiments, after the AP chip assigns service 3 to the short-range main chip, the short-range main chip can first determine whether the priority corresponding to service data 3 is greater than the priority corresponding to service data 1. Since the priority corresponding to service data 1 is less than the priority corresponding to service data 2 transmitted by the above-mentioned short-range secondary chip, therefore, when the priority corresponding to service data 3 is less than or equal to the priority corresponding to service data 1, the priority corresponding to service data 3 is less than the priority corresponding to service data 2. Therefore, the short-range main chip does not need to negotiate with the short-range secondary chip to use antenna a, avoiding unnecessary negotiation of antenna a. When the priority corresponding to service data 3 is greater than the priority corresponding to service data 1, the priority corresponding to service data 3 may be greater than the priority corresponding to service data 2. Therefore, the short-range main chip can send request 3 to the short-range secondary chip.

[0258] After receiving request 3, the short-range slave chip indicates that the short-range main chip needs to use antenna a to transmit and process the business data corresponding to the business. In order to ensure the smooth operation of important businesses, the short-range slave chip can determine whether the priority of business data 3 that the short-range main chip needs to transmit is greater than or equal to the priority of business data 2 transmitted by the short-range slave chip, that is, whether the importance of business 3 processed by the short-range main chip is greater than or equal to the importance of business 2 processed by the short-range slave chip.

[0259] When the priority corresponding to service data 3 is lower than the priority corresponding to service data 2, it indicates that the importance of service 3 processed by the short-range main chip is lower than the importance of service 2 processed by the short-range secondary chip, and the service processed by the short-range secondary chip is more sensitive to the transmission rate. The short-range secondary chip sends a rejection response message to the short-range main chip, and the short-range secondary chip continues to use antenna a to transmit service data 2.

[0260] When the priority corresponding to service data 3 is greater than or equal to the priority corresponding to service data 2, it indicates that the importance of service 3 processed by the short-distance main chip is greater than or equal to the importance of service 2 processed by the short-distance secondary chip, and the service processed by the short-distance main chip is more sensitive to the transmission rate. The short-distance secondary chip needs to switch antenna a, and the short-distance secondary chip sends an acceptance response message to the short-distance main chip, connecting the first end and the third end of the single-pole double-throw switch 1. In response to the above acceptance response message, the short-distance main chip sends service data 3 to the device 4 through antenna a.

[0261] Among them, optionally, the priority corresponding to the above-mentioned service data 1 is the service data with the highest priority processed by the short-distance main chip. The short-distance main chip determines whether the priority corresponding to service data 3 is greater than the priority corresponding to service data 1. If greater, it indicates that the priority corresponding to service data 3 is the highest priority among the priorities corresponding to the service data that the short-distance main chip needs to transmit, which may be higher than the priority corresponding to the above-mentioned service data 2. Therefore, the short-distance main chip can send the above-mentioned request 3 to the short-distance secondary chip, otherwise, the short-distance main chip does not need to send request 3.

[0262] In some embodiments, during the period when the short-range secondary chip occupies antenna a, that is, during the period when the short-range secondary chip is connected to antenna a, such as during the period when the service data 2 is transmitted using antenna a, the device 1 runs a new service (or service 4), and the service 4 is assigned to the short-range secondary chip, indicating that the short-range secondary chip needs to transmit the service data corresponding to service 4 (i.e., service data 4), and the short-range secondary chip needs to determine whether the importance of service 4 is high, that is, whether it is necessary to give priority to transmitting service data 4. Since the short-range secondary chip uses antenna a, it indicates that the priority corresponding to the service processed by the short-range secondary chip is greater than the priority corresponding to the service processed by the short-range main chip. Therefore, the short-range secondary chip can determine whether the priority corresponding to service data 4 is greater than or equal to the priority corresponding to service data 2. If the priority corresponding to service data 4 is greater than the priority corresponding to service data 2, it indicates that the importance of service 4 is higher than that of service 2, and the transmission rate of service 4 needs to be guaranteed first. The short-range secondary chip can use antenna a to transmit service data 4 and stop transmitting service data 2.

[0263] If the priority corresponding to service data 4 is less than or equal to the priority corresponding to service data 2, it indicates that the importance of service 4 is less than or equal to the importance of service 2, and the transmission rate of service 2 needs to be prioritized. The short-range secondary chip can continue to use antenna a to transmit service data 2.

[0264] Among them, optionally, after the operation of service 2 is completed, it indicates that the short-range secondary chip no longer needs to transmit service data 2, but there is service data 4 that needs to be transmitted. The short-range secondary chip can send request 4 to the short-range main chip, and the request 4 includes the priority corresponding to service data 4. The short-range main chip responds to the request 4 and determines whether the service data 4 is greater than the service data with the highest priority processed by the short-range main chip. If so, the short-range secondary chip still does not need to switch antenna a, but can continue to use antenna a to transmit service data 4 with the external device. If not, the short-range secondary chip needs to switch antenna a so that the short-range main chip can use antenna a to transmit the service data with the highest priority, thereby transmitting the corresponding service data in order from high to low priority, so that the service data with high priority is transmitted in time, and the smoothness of the operation of the service with high priority is ensured.

[0265] In the embodiment of the present application, when the importance of the business processed by the short-distance main chip is greater than or equal to the importance of the business processed by the short-distance secondary chip, it indicates that the business processed by the short-distance main chip is more sensitive to the transmission rate than the business processed by the short-distance secondary chip. Therefore, the short-distance secondary chip needs to switch antenna a, and the short-distance secondary chip can control the single-pole double-throw switch 1 to switch, connect the first end and the third end, so that the antenna a is connected to the short-distance main chip, so that the short-distance main chip can use antenna a to transmit the highest priority business data processed by the short-distance main chip to an external device (such as device 4).

[0266] S224-S225 above introduces the process that after S223, when it is determined that the priority corresponding to the service data 1 processed by the short-range main chip is less than the priority corresponding to the service data 2 processed by the short-range secondary chip, the short-range secondary chip switches antenna a to use antenna a to transmit service data 2. The following will continue to introduce the process that after S223, when it is determined that the priority corresponding to the service data 1 processed by the short-range main chip is greater than or equal to the priority corresponding to the service data 2 processed by the short-range secondary chip, the short-range main chip continues to use antenna a.

[0267] S227: The short-range master chip sends a rejection response message to the short-range slave chip.

[0268] S228. The short-range main chip sends service data 1 to device 1 via antenna a.

[0269] In an embodiment of the present application, when the importance of service 1 processed by the above-mentioned short-range main chip is greater than or equal to the importance of service 2 processed by the short-range secondary chip, in order to ensure the smooth operation of the important service, the short-range main chip can reject the switching request of antenna a of the short-range secondary chip, and inform the short-range secondary chip to stop switching antenna a. That is to say, the short-range main chip can continue to use antenna a to transmit service data 1, thereby ensuring the transmission speed of the service data corresponding to the important service, and further ensuring the smooth operation of the important service.

[0270] In some embodiments, the short-distance slave chip may not control the switching of the single-pole double-throw switch 1, but the short-distance master chip may control the single-pole double-throw switch 1. Accordingly, the first end of the single-pole double-throw switch 1 may be connected to the short-distance master chip instead of the short-distance slave chip. In addition, the operations performed by the above-mentioned short-distance master chip may also be replaced by the description that they are performed by the short-distance slave chip. Accordingly, the short-distance slave chip may perform the above-mentioned operations by the short-distance master chip, that is, the first chip may be the short-distance slave chip, and the second chip may be the short-distance master chip.

[0271] It should be noted that the type of chip used by the above-mentioned short-range main chip to send service data to the external device can be the same as the type of chip used by the short-range secondary chip to send service data to the external device. For example, the WI-FI chip in the short-range main chip sends service data 1 to device 2, and the WI-FI chip in the short-range secondary chip sends service data 2 to device 3, so that dual WI-FI chips can process different services.

[0272] Alternatively, the type of chip used by the above-mentioned short-range main chip to send business data to the external device may be different from the type of chip used by the short-range secondary chip to send business data to the external device. For example, the WI-FI chip in the short-range main chip sends business data 1 to device 2, and the NFC chip in the short-range secondary chip sends business data 2 to device 3, thereby realizing dual WI-FI chips to process different services.

[0273] In some embodiments, after receiving the rejection response message, the short-range slave chip may wait for a period of time and then resend the request 1 to the short-range master chip.

[0274] In an embodiment of the present application, the short-range main and secondary chips can communicate with each other through a bus, AP or GPIO pins. The short-range main and secondary chips reuse the same antenna a. The short-range main and secondary chips can negotiate to use the short-range communication chip of antenna a based on the importance of the services processed by the main and secondary chips, thereby avoiding the short-range main and secondary chips from working at the same time, realizing time-division multiplexing, and ensuring the transmission rate of important services, thereby reducing the impact of time-division multiplexing on user experience.

[0275] It should be noted that the above is an example of reusing an antenna a between the short-range main and auxiliary chips to introduce the process of negotiating the use of a reused antenna between the short-range main and auxiliary chips. Of course, multiple (such as two) antennas can also be reused between the short-range main and auxiliary chips, that is, the number of antennas a can be multiple. The process of negotiating the use of multiple reused antennas between the short-range main and auxiliary chips can refer to the relevant description of the negotiation between the short-range main and auxiliary chips to use a reused antenna, which will not be repeated here.

[0276] Among them, optionally, due to limited space in the device, multiple antennas are reused between the short-range main and secondary chips. For example, when two antennas are reused, the short-range main chip may not have a corresponding independent antenna b. In other words, the antenna b introduced above is also regarded as an antenna a.

[0277] In some embodiments, the above-mentioned determination of whether the service data (such as service data 1 or 3) is less than the preset priority 1 is an optional process. It is possible to directly determine whether the service data is greater than or equal to the preset priority 2. For example, when the priority corresponding to the service data 3 is less than the preset priority 2, the short-range main chip can send the above-mentioned request 1 to the short-range slave chip.

[0278] In addition, the above judgment of whether the priority corresponding to the service data is greater than or equal to the preset priority 2 and the execution of the corresponding operation according to the judgment result are optional. For example, the above S208-S211 are optional processes. After receiving the service data 3, the short-range main chip can directly send a request to the short-range secondary chip. The request may include the priority corresponding to the service data 3, so as to negotiate with the short-range secondary chip to use antenna a, that is, S212 can be directly executed. In summary, the above judgment of whether the priority corresponding to the service data is less than the preset priority 1 and whether the priority corresponding to the service data is greater than or equal to the preset priority 2 are both optional processes. After receiving the service data, the short-range main chip can perform the corresponding operation according to the size relationship between the priority corresponding to the service data and the preset priority 1, without using the preset priority 2. Alternatively, the short-range main chip can perform the corresponding operation according to the size relationship between the priority corresponding to the service data and the preset priority 2, without using the preset priority 1. Alternatively, the short-range main chip can directly send a request to the short-range secondary chip to negotiate with the short-range secondary chip to use antenna a. After receiving the service data, the short-range slave chip can directly send a related request to the short-range master chip to negotiate with the short-range master chip to use antenna a.

[0279] In some embodiments, the AP chip in the device 1 can directly determine whether to notify the short-range communication chip to occupy the reused antenna according to the priority of the service processed by the short-range main chip. Figure 3 The structure shown in the figure takes the collaborative business as an example to explain the process in detail. Fig.12 As shown, the process is as follows:

[0280] S1. The transmission link control module calls the short-distance main chip driver to send service data corresponding to the audio application to the short-distance main chip.

[0281] S2. The service priority module sends the priority corresponding to the audio application to the coexistence strategy module.

[0282] S3. The coexistence strategy module determines whether the priority corresponding to the audio application is less than a preset priority 1.

[0283] In an embodiment of the present application, the coexistence strategy module can determine whether the priority corresponding to the audio application is less than the preset priority 1. When it is less than the preset priority 1, the coexistence strategy module can notify the short-range secondary chip to use antenna a, that is, execute S4. When it is greater than or equal to the preset priority 1, the coexistence strategy module can directly compare the priority corresponding to the service processed by the short-range secondary chip with the priority corresponding to the service processed by the short-range main chip to determine the short-range communication chip that processes the service with a higher priority, thereby controlling the short-range secondary chip to connect antenna a to the short-range communication chip that processes the service with a higher priority, that is, S14 can be executed.

[0284] S4. The coexistence strategy module sends a notification message 1 to the short-range secondary chip.

[0285] S5. In response to the user's start-up operation on the coordinated application, the coordinated application is started.

[0286] S6. The scene recognition module obtains the identification of the collaborative application.

[0287] Exemplarily, the identifier of the collaborative application can be the name of the collaborative application, the package name, or the process ID corresponding to the collaborative application. For example, when the collaborative application is started, the scene recognition module can obtain the foreground application, that is, the package name of the collaborative application. Here, the identifier of the collaborative application refers to the business identifier introduced above.

[0288] S7. The scenario identification module sends the identification of the collaborative application to the service priority module and the transmission link control module.

[0289] In the embodiment of the present application, after receiving operation 1 input by the user, device 1 indicates that the collaborative application needs to be started, and device 1 (such as the AP chip in device 1) can start the collaborative application. For example, operation 1 is the user's Fig. 6A The icon 10 of the first game application is clicked.

[0290] The scene recognition module in the device 1 can obtain the identification of the foreground startup application, so the scene recognition module can obtain the identification of the application. After obtaining the identification of the application, the identification of the coordinated application is sent to the business priority module so that the business priority module can determine the priority corresponding to the coordinated application.

[0291] S8. The transmission link control module determines the identifier of the target short-range communication chip corresponding to the collaborative application based on the identifier of the collaborative application.

[0292] The target short-range communication chip corresponding to the collaborative application refers to a short-range communication chip that processes the service corresponding to the collaborative application, that is, a short-range communication chip that transmits the service data corresponding to the collaborative application.

[0293] S9. The transmission link control module sends the identifier of the target short-range communication chip corresponding to the collaborative application to the coexistence strategy module.

[0294] S10: When the identifier of the target short-range communication chip is a secondary chip identifier, the transmission link control module calls the short-range secondary chip driver to send service data corresponding to the collaborative application to the short-range secondary chip.

[0295] In an embodiment of the present application, the transmission link control module distributes the service data (such as startup data, operation data, etc.) corresponding to the collaborative application to a standard short-range communication chip, such as a short-range slave chip, so that the short-range slave chip transmits the service data corresponding to the collaborative application.

[0296] S11. The service priority module determines the priority corresponding to the collaborative application based on the identifier of the collaborative application, and sends the priority corresponding to the collaborative application to the coexistence strategy module.

[0297] In addition, the above-mentioned transmission link control module can also send the identifier of the target short-range communication chip corresponding to the collaborative application to the service priority module, and the service priority module sends the identifier of the target short-range communication chip to the coexistence strategy module. In other words, the present application does not limit the module that sends the identifier of the target short-range communication chip to the coexistence strategy module, as long as the coexistence strategy module can receive the identifier of the target short-range communication chip.

[0298] S12 . The short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 in response to the notification message 1 .

[0299] S13. The short-range secondary chip uses a custom short-range communication protocol based on antenna a to send business data corresponding to the collaborative application to the short-range secondary chip in the external device 1.

[0300] S14. The coexistence strategy module determines whether the priority corresponding to the collaborative application is greater than or equal to the priority corresponding to the audio application.

[0301] S15. When the priority level corresponding to the collaborative application is less than or equal to the priority level corresponding to the audio application, the coexistence strategy module calls the short-range slave chip driver to send a notification message 2 to the short-range slave chip.

[0302] In an embodiment of the present application, when the short-range main chip uses antenna a to transmit service data 1, and the service data 1 is greater than or equal to the preset priority 1, the coexistence strategy module, after receiving the priority corresponding to the collaborative application, determines whether the priority corresponding to the collaborative application is greater than or equal to the highest priority corresponding to the short-range main chip, that is, determines whether the priority corresponding to the service processed by the short-range main chip is greater than or equal to the priority corresponding to the service processed by the short-range secondary chip, so as to determine the short-range communication chip that handles the important service. In the case where the priority corresponding to the collaborative application is less than or equal to the highest priority corresponding to the short-range main chip, indicating that the short-range communication chip that handles the important service is the short-range main chip, the coexistence strategy module can issue the corresponding coexistence strategy to the short-range main chip, such as sending a notification message 2 to the short-range main chip, informing the short-range main chip that it can continue to use antenna a without switching antenna a, that is, without switching the single-pole double-throw switch 1.

[0303] S16 . The short-distance slave chip responds to the notification message 2 and continues to keep the first terminal and the third terminal of the single-pole double-throw switch 1 connected.

[0304] S17. The short-range main chip sends the service data corresponding to the above audio application to the external device 2 based on the antenna a.

[0305] S18. When the priority level corresponding to the collaborative application is greater than the priority level corresponding to the audio application, the coexistence strategy module calls the short-range slave chip driver to send a notification message 1 to the short-range slave chip.

[0306] S19 . The short-distance slave chip connects the first end and the second end of the single-pole double-throw switch 1 in response to the notification message 1 .

[0307] S20. The short-range secondary chip uses a custom short-range communication protocol based on antenna a to send business data corresponding to the collaborative application to the short-range secondary chip in the external device 1.

[0308] In an embodiment of the present application, when the priority level corresponding to the collaborative application is greater than the priority level corresponding to the audio application, the coexistence strategy module indicates that the priority level corresponding to the collaborative application is the highest, which means that the short-range communication chip that handles important services is the short-range secondary chip. The coexistence strategy module can issue the corresponding coexistence strategy to the short-range secondary chip, such as sending a notification message 1 to the short-range secondary chip to inform the short-range secondary chip that it is necessary to switch antenna a, that is, it is necessary to switch single-pole double-throw switch 1, so that the short-range secondary chip is connected to antenna a, and antenna a is used to transmit the service data corresponding to the collaborative application.

[0309] In some embodiments, after switching antenna a, the short-range slave chip may send a corresponding message to the short-range master chip to inform the short-range master chip of the status of antenna a.

[0310] In some embodiments, the coexistence strategy model may also compare the service data with the preset priority 2. For example, when the service data corresponding to the audio application is greater than or equal to the preset priority 1, it is determined whether the service data is greater than or equal to the preset priority 2, so as to perform a corresponding operation using the corresponding determination result.

[0311] In some embodiments, the above-mentioned short-range main and sub-chips can also negotiate the use of antenna a, and the above-mentioned service priority module or coexistence strategy can send the priority corresponding to the collaborative application to the target short-range communication chip, such as the above-mentioned short-range sub-chip. Afterwards, after obtaining the priority corresponding to the collaborative application, the main chip sends a corresponding request to the short-range main chip, and the request includes the priority corresponding to the collaborative application. Afterwards, the short-range main chip determines whether to switch antenna a based on the priority corresponding to the collaborative application and the highest priority corresponding to the short-range main chip, that is, whether to send a rejection response message or an acceptance response message to the short-range sub-chip, so as to realize the negotiated use of antenna a.

[0312] In some embodiments, the short-range sub-chip in the device (such as the external device 1 and the external device 2 mentioned above) can be configured to handle private services such as multi-screen collaboration and super notifications, so that device 1 can use the short-range sub-chip and a custom short-range communication protocol to perform short-range communication with the short-range sub-chips in other devices, such as performing device discovery and establishing communication connections; wherein the custom short-range communication protocol can define the communication process according to demand and simplify the communication process between devices.

[0313] The above describes the case where the identifier of the target short-distance communication chip is a secondary chip identifier. Of course, there is also the possibility that the identifier of the target short-distance communication chip is a primary chip identifier. Among them, the implementation process of the service data transmission corresponding to the identifier of the target short-distance communication chip being the primary chip identifier is similar to the implementation process of the service data transmission corresponding to the identifier of the target short-distance communication chip being the secondary chip identifier, and will not be repeated here.

[0314] It should be noted that the above text introduces the process of business data transmission by taking the number of short-range communication chips in device 1 as 2 as an example. The number of short-range communication chips in device 1 can also be other values, as long as it is greater than 1, and this application does not limit it.

[0315] In addition, the operations performed by the above modules (such as the scene recognition module, the service priority module, the coexistence strategy module, and the transmission link control module) are only examples, and the operations may also be performed by other modules. This application does not limit the modules that perform the operations.

[0316] In some embodiments, the present application provides a computer-readable storage medium, including computer instructions, which, when executed on a Bluetooth device, enable the electronic device to execute the data transmission method as described above.

[0317] In some embodiments, the present application provides a computer program product, which, when executed on a Bluetooth device, enables the electronic device to execute the data transmission method described above.

[0318] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0319] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0320] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0321] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0322] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0323] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A data transmission method, characterized in that: Applied to an electronic device, the electronic device comprises an application processor AP, a first chip and a second chip, the first chip and the second chip are short-range communication chips, and the AP is connected to the first chip and the second chip respectively; The data transmission method comprises: The first chip receives first data sent by the AP; The first chip determines that the priority corresponding to the first data is less than a first preset priority, and the first chip sends a first notification message to the second chip; wherein the priority corresponding to the first data indicates the importance of the first data; The second chip receives second data sent by the AP; In response to the first notification message, the second chip controls the first antenna to connect with the second chip, and transmits the second data based on the first antenna; the first antenna is an antenna multiplexed by the first chip and the second chip, and when the first antenna is connected with the second chip, the first antenna is disconnected from the first chip.

2. The method according to claim 1, characterized in that After transmitting the second data based on the first antenna, the method further includes: The first chip receives third data sent by the AP; The first chip determines that the priority corresponding to the third data is greater than or equal to a second preset priority, and the first chip sends a second notification message to the second chip; In response to the second notification message, the second chip controls the first antenna to communicate with the first chip; The first chip transmits the third data based on the first antenna.

3. The method according to claim 1, characterized in that The method further comprises: The first chip determines that the priority corresponding to the first data is greater than or equal to the first preset priority, and the first chip transmits the first data based on the first antenna; The second chip receives second data sent by the AP; The second chip sends a first request to the first chip, where the first request includes a priority corresponding to the second data; In response to the first request, the first chip determines that the priority corresponding to the second data is greater than the priority corresponding to the first data, and the first chip sends an acceptance response message to the second chip; In response to the acceptance response message, the second chip controls the first antenna to communicate with the second chip, and transmits the second data based on the first antenna.

4. The method according to claim 3, characterized in that The first chip determines that the priority corresponding to the first data is greater than or equal to the first preset priority, and the first chip transmits the first data based on the first antenna, including: The first chip determines that the priority corresponding to the first data is greater than or equal to the first preset priority and less than a second preset priority, and the first chip transmits the first data based on the first antenna.

5. The method according to claim 3 or 4, characterized in that: The method further comprises: The first chip transmits the first data based on the second antenna; wherein the second antenna is an antenna used independently by the first chip.

6. The method according to any one of claims 1 to 5, characterized in that The controlling the first antenna to communicate with the second chip includes: The first chip connects the first end of the single-pole multi-throw switch to the second end of the single-pole multi-throw switch; wherein the first end is connected to the first antenna, the second end is connected to the second chip, and the single-pole multi-throw switch includes a third end, and the third end is connected to the first chip.

7. The method according to any one of claims 1 to 6, characterized in that The first chip sending a first notification message to the second chip includes: The first chip sends the first notification message to the second chip through the AP.

8. The method according to any one of claims 1 to 6, characterized in that The first chip and the second chip are connected via a bus; The first chip sending a first notification message to the second chip includes: The first chip sends the first notification message to the second chip through the bus.

9. The method according to any one of claims 1 to 6, characterized in that The first chip includes a first input-output pin, the second chip includes a second input-output pin, and the first input-output pin is connected to the second input-output pin; The first chip sending a first notification message to the second chip includes: The first chip controls the first input / output pin to output a first electrical signal, where the first electrical signal represents the first notification message, and the first electrical signal is a low-level signal or a high-level signal.

10. The method according to any one of claims 1 to 9, characterized in that The second data includes private data; The transmitting the second data based on the first antenna includes: The second chip sends the second data to the first device based on the first antenna and in combination with a custom short-range communication protocol, where the second data is used to establish a short-range communication connection with the first device.

11. A data transmission method, characterized in that: Applied to an electronic device, the electronic device comprises an AP, a first chip and a second chip, the first chip and the second chip are short-range communication chips, and the AP is connected to the first chip and the second chip respectively; The data transmission method comprises: The AP sends first data to the first chip; The AP determines that the priority corresponding to the first data is less than the first preset priority, and the AP sends a first notification message to the second chip; wherein the priority corresponding to the first data indicates the importance of the first data; The AP sends second data to the second chip; In response to the first notification message, the second chip connects the first antenna with the second chip, and the second chip transmits the second data based on the first antenna; wherein the first antenna refers to the antenna multiplexed by the first chip and the second chip, and when the first antenna is connected with the second chip, the first antenna is disconnected from the first chip.

12. A chip system, characterized in that: The chip system includes a first chip and a second chip, and both the first chip and the second chip are short-range communication chips.

13. The chip system according to claim 12, characterized in that: The first chip and the second chip are connected.

14. The chip system according to claim 12 or 13, characterized in that: The chip system further includes an AP, and the AP is connected to the first chip and the second chip respectively.

15. The chip system according to claim 14, characterized in that: The chip system is applied to an electronic device, and the electronic device executes the method as claimed in any one of claims 1 to 11.

16. An electronic device, characterized in that: The electronic device includes a display screen, a memory, a first chip, a second chip and one or more processors; the display screen, the memory, the first chip and the second chip are coupled to the processor; the processor includes an application processor, the display screen is used to display an image generated by the processor, the memory is used to store computer program code, the first chip and the second chip are short-range communication chips, both used to transmit data, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method described in any one of claims 1 to 11.

17. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 11.