Data Sending Method, Electronic Device, Chip System and Storage Medium
By determining the transmission order based on data priority in the electronic device, the problem of difficult timely scheduling of high-priority services when Wi-Fi devices communicate with multiple devices at the same time is solved, and the effect of reducing transmission delay and ensuring QoS is achieved.
Patent Information
- Application Number
- CN202011063176.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-09-30
AI Technical Summary
When Wi-Fi devices communicate with multiple devices at the same time, high-priority services are difficult to schedule in time, resulting in an increase in data transmission delay and the service QoS requirements cannot be guaranteed.
By implementing the data transmission method in the electronic device, the transmission order is determined according to the priority of the data, and high-priority data are sent first. This method is suitable for scenarios where electronic devices communicate with multiple devices simultaneously and operate in SBSC mode.
By prioritizing the transmission of high-priority data, the transmission delay of high-priority services is reduced, the QoS requirements of the service are ensured, and the data transmission delay is shortened.
Smart Images

Figure CN114339897B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a data sending method, an electronic device, a chip system, and a storage medium. Background Art
[0002] Wireless fidelity (Wi-Fi) technology is a widely used wireless network transmission technology. With the increasing popularity and rapid growth of Wi-Fi devices, Wi-Fi usage scenarios are increasing, and Wi-Fi devices can communicate with multiple devices at the same time. For example, one application scenario is: the mobile phone works in the wireless workstation (STA) mode to connect to the access point (AP) to access the Internet. At the same time, the mobile phone also works in the Wi-Fi peer-to-peer (P2P) mode for file sharing or screen projection services.
[0003] Currently, when a Wi-Fi device communicates with multiple devices simultaneously, the Wi-Fi device can work on the same channel of a single frequency band. The Wi-Fi device uses time division multiplexing to send data, which results in high-priority services not being scheduled in time and increases data transmission delay. Summary of the invention
[0004] The embodiments of the present application provide a data sending method, an electronic device, a chip system, and a storage medium. When the electronic device uses the same frequency and the same channel to perform Wi-Fi communication with two other devices, data priority is taken into consideration when sending service data, and high-priority data is given the opportunity to be sent first, thereby reducing transmission delay.
[0005] In a first aspect, a data transmission method is provided, which is applied to a first electronic device, wherein the first electronic device performs a first service through a first Wi-Fi connection with a second electronic device, and the first electronic device performs a second service through a second Wi-Fi connection with a third electronic device, and both the first Wi-Fi connection and the second Wi-Fi connection use a first channel of a first frequency band; the method includes: obtaining first data of the first service at a first moment, and obtaining second data of the second service at a second moment; before the first moment, the priority of the first data is lower than the priority of the second data; sending the second data at a third moment, and sending the first data at a fourth moment; and the third moment is before the fourth moment.
[0006] The data transmission method provided in the first aspect is applicable to the scenario where the electronic device simultaneously communicates with multiple devices through Wi-Fi and the electronic device operates in SBSC mode. The electronic device obtains data of different services according to the time when the data arrives at the Wi-Fi chip. When sending data, the sending order is determined according to the priority of the data, and high-priority data is sent first, so that high-priority data has the opportunity to be sent first. In the SBSC mode, the transmission delay of high-priority services is reduced, and the QoS requirements of the services are guaranteed.
[0007] In one possible implementation, when the first electronic device communicates with the second electronic device, the first electronic device operates in STA mode and the second electronic device operates in AP mode; when the first electronic device communicates with the third electronic device, both the first electronic device and the third electronic device operate in Wi-Fi P2P mode.
[0008] In a possible implementation manner, the second service is a Wi-Fi P2P service.
[0009] In one possible implementation, the second service is a screen projection service or a file sharing service.
[0010] In a possible implementation, the second data includes at least one of the following: projection data, video data, or audio data. By setting at least one of the projection data, video data, or audio data as high-priority data, the projection data, video data, or audio data has a chance to be sent first, thereby shortening the data transmission delay and meeting the delay requirement.
[0011] In a possible implementation, the first frequency band is the Wi-Fi 5 GHz frequency band.
[0012] In a possible implementation, there are multiple first data and at least one second data, and the number of second data sent at the third moment is greater than the number of first data sent at the fourth moment. By sending a larger number of high-priority data each time, the transmission delay of the high-priority data is further shortened.
[0013] In a possible implementation, before obtaining the first data of the first service at the first moment and obtaining the second data of the second service at the second moment, the method further includes: running the first application to set the priority of the first data for the first data; and running the second application to set the priority of the second data for the second data. By setting priorities for data of different services, it is convenient to send data according to the priority in the future, thereby ensuring the QoS requirements of the services.
[0014] In a possible implementation, when the first electronic device sends data, it can obtain the first service message to be sent; determine whether the first service message has a priority; if it is determined that the first service message has a priority, then according to the corresponding relationship between the preset M priorities and N queues, divide the first service message into the target queue corresponding to the priority of the first service message; where M and N are integers greater than 1, and the number of service messages sent by the first electronic device in the i-th queue each time is greater than or equal to the number of service messages sent in the (i + 1)-th queue, 1 ≤ i < M, and the priority corresponding to the i-th queue is higher than the priority corresponding to the (i + 1)-th queue; if it is determined that the first service message does not have a priority, then divide the first service message into the first queue; where the number of service messages sent by the first electronic device in the first queue each time is the minimum value among the N queues; and send the service messages in each queue in turn according to the sorting of the N queues.
[0015] In a possible implementation, each queue is set with a weight value, and the weight value is used to determine the number of service messages sent by the first electronic device in this queue each time.
[0016] In a possible implementation, the weight value is the number of service messages sent by the first electronic device in the queue each time; or, the weight value is the ratio between the number of service messages sent by the first electronic device in the queue each time and a preset number.
[0017] In a possible implementation, the weight value of the i-th queue is greater than or equal to the weight value of the (i + 1)-th queue.
[0018] In a possible implementation, if the first service message has a priority, the priority of the first service message is carried in the first field of the first service message.
[0019] In a possible implementation, if the first service message has a priority, the priority of the first service message is carried in the encapsulation structure of the first service message.
[0020] In a possible implementation, the encapsulation structure includes an skb structure.
[0021] In one possible implementation, the business messages in each queue are sent in sequence according to the order of N queues, including: obtaining the number of business messages remaining in the first queue according to the order of the N queues; determining whether the number of business messages remaining in the first queue is less than the number of business messages in the first queue sent by the first electronic device each time; if it is determined that the number of business messages remaining in the first queue is less than the number of business messages in the first queue sent by the first electronic device each time, sending the remaining business messages in the first queue; if it is determined that the number of business messages remaining in the first queue is greater than or equal to the number of business messages in the first queue sent by the first electronic device each time, sending the business messages in the first queue according to the number of business messages in the first queue sent by the first electronic device each time; obtaining the number of business messages remaining in the second queue, performing the above-mentioned operations on the first queue for the second queue, and so on, until the business messages in the last queue are sent.
[0022] In a possible implementation, M is greater than or equal to N.
[0023] In a second aspect, a device is provided, comprising: a unit or means for executing each step of the above first aspect.
[0024] In a third aspect, an electronic device is provided, including a processor, which is connected to a memory and is used to call a program stored in the memory to execute the method provided in the first aspect above. The memory can be located inside the electronic device or outside the electronic device. The processor includes one or more and the memory includes one or more.
[0025] In a fourth aspect, a chip system is provided, including a processor, wherein the processor is coupled to a memory, and the processor executes a computer program stored in the memory to perform the method provided in the first aspect above.
[0026] According to a fifth aspect, a program is provided, which, when executed by a processor, is used to execute the method according to the first aspect.
[0027] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer or a processor, the method provided in the first aspect above is implemented.
[0028] In the seventh aspect, an embodiment of the present application provides a program product, which includes a computer program, and the computer program is stored in a readable storage medium. At least one processor of a device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the device implements the method provided in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of an application scenario applicable to the embodiments of the present application;
[0030] Figure 2 for Figure 1 A schematic diagram of the frequency bands and channels used by mobile phone A;
[0031] Figure 3 for Figure 1 Another schematic diagram of the frequency bands and channels used by mobile phone A in FIG;
[0032] Figure 4 for Figure 1 Another schematic diagram of the frequency bands and channels used by mobile phone A;
[0033] Figure 5 A schematic diagram of a functional module of a terminal device provided in an embodiment of the present application;
[0034] Figure 6 Another functional module diagram of a terminal device provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of another functional module of a terminal device provided in an embodiment of the present application;
[0036] Figure 8 A schematic diagram of a terminal device sending a service message in SBSC mode;
[0037] Fig. 9 A schematic diagram of a terminal device provided in an embodiment of the present application working in SBSC mode to send a service message;
[0038] Fig.10 Another schematic diagram of a terminal device provided in an embodiment of the present application working in an SBSC mode and sending a service message;
[0039] Fig.11 Another schematic diagram of a terminal device providing an embodiment of the present application working in the SBSC mode to send a service message;
[0040] Fig.12 Another schematic diagram of a terminal device providing an embodiment of the present application working in the SBSC mode to send a service message;
[0041] Fig.13 Another schematic diagram of a terminal device providing an embodiment of the present application working in the SBSC mode to send a service message;
[0042] Fig.14 A flow chart of a data sending method provided in an embodiment of the present application;
[0043] Fig.15 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0044] Fig.16 Another structural schematic diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0046] The data transmission method provided in the embodiment of the present application can be applied to the scenario where the terminal device performs Wi-Fi communication with multiple devices at the same time. Figure 1 This is a schematic diagram of an application scenario applicable to the embodiment of the present application. Figure 1 As shown, mobile phone A can simultaneously communicate with router B and projection device C through Wi-Fi. For example, when mobile phone A communicates with router B through Wi-Fi, mobile phone A can work in STA mode, and router B works in AP mode. AP manages and controls STA to form a wireless network, which is mainly used for application scenarios such as Internet access. Among them, the AP mode can provide wireless access services, allow other wireless devices to access, and provide data access. General wireless routers / bridges work in this mode. APs are allowed to connect to each other. The STA mode is similar to a wireless terminal. The STA itself does not accept wireless access. It can be connected to the AP. Generally, the wireless network card works in this mode. Mobile phone A and projection device C can communicate through Wi-Fi P2P. Both mobile phone A and projection device C work in Wi-Fi P2P mode. Wi-Fi P2P, also known as Wi-Fi Direct, can realize direct communication between two devices without an AP. It is mainly used in application scenarios such as file transfer and data transfer. Common terminal devices, such as mobile phones, can play different roles in different scenarios. For example, when accessing the Internet through hotspots such as routers, they can act as STAs; when sharing hotspots, they can also act as APs; during P2P communication, they can act as one end.
[0047] Need to explain, Figure 1 There is no limitation on the working mode when mobile phone A communicates with multiple devices through Wi-Fi at the same time.
[0048] It should be noted that the embodiments of the present application do not limit the services implemented by the terminal device through Wi-Fi communication. Figure 1In the example, after mobile phone A is wirelessly connected to router B, mobile phone A can run a chat application (application, APP), a browser APP, and an email APP. By running the chat APP, mobile phone A can send or receive text messages, or make voice calls, or make video calls. By running the browser APP, mobile phone A can allow users to browse the web or watch videos. By running the email APP, mobile phone A can send or receive emails. Mobile phone A can implement screen projection services by performing Wi-Fi P2P communication with screen projection device C, and the content displayed on the screen of mobile phone A can be projected and displayed on screen projection device C. For example, in another implementation method, a file sharing service can be performed between mobile phone A and screen projection device C.
[0049] It should be noted that the embodiments of the present application do not limit the name and type of the terminal device, and do not limit the number and type of other devices that the terminal device simultaneously performs Wi-Fi communication. The terminal device may also be referred to as an electronic device. At present, some examples of terminal devices are: mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes, etc.
[0050] When a terminal device communicates with multiple devices through Wi-Fi at the same time, there is no limit on the operating frequency band and operating channel of the terminal device. Currently, terminal devices can operate in three modes: single band single concurrent (SBSC), dual band dual concurrent (DBDC), and dual band adaptive concurrent (DBAC). Figure 2 to Figure 4 Provide explanation.
[0051] 1.SBSC
[0052] In SBSC mode, terminal devices can operate on the same channel in a single frequency band. Figure 2 As shown, when mobile phone A communicates with router B through Wi-Fi, channel 149 in the 5GHz band is used. When mobile phone A communicates with screen projection device C through Wi-Fi P2P, channel 149 in the 5GHz band is also used. Since mobile phone A works on the same channel in a single frequency band, mobile phone A can communicate with router B or screen projection device C at a certain time through time division multiplexing of radio frequency resources, and the latency performance is poor. For example, mobile phone A sends a chat APP-related message to router B at time T1, and sends a screen projection service message to screen projection device C at time T2.
[0053] 2. DBDC
[0054] In DBDC mode, terminal devices can work on different frequency bands, or on different channels of a single frequency band. Mobile phone A can use frequency division multiplexing to multiplex radio frequency resources. At a certain moment, mobile phone A can communicate with router B and projection device C at the same time, with better latency performance.
[0055] Optionally, in one implementation, as Figure 3 As shown, mobile phone A uses the 2.4GHz frequency band to communicate with router B via Wi-Fi, and uses the 5GHz frequency band to communicate with projection device C via Wi-Fi P2P.
[0056] Optionally, in another implementation, such as Figure 4 As shown, mobile phone A uses channel 36 of the 5GHz frequency band to communicate with router B via Wi-Fi, and uses channel 149 of the 5GHz frequency band to communicate with projection device C via Wi-Fi P2P.
[0057] 3. DBAC
[0058] In DBAC mode, the terminal device can operate on different channels of a single frequency band. For example, see Figure 4 , mobile phone A uses channel 36 of the 5GHz band to communicate with router B via Wi-Fi, and uses channel 149 of the 5GHz band to communicate with screen projection device C via Wi-Fi P2P. Mobile phone A can communicate with router B or screen projection device C at a certain moment by time-division multiplexing radio frequency resources.
[0059] Combine the following Figure 5 to Figure 7 An exemplary description is given of a structure applicable when the terminal equipment works in SBSC, DBDC or DBAC. Figure 5 to Figure 7 The difference lies in the number of Wi-Fi modules and radio frequency modules included in the terminal device. Figure 5As shown, the terminal device may include an application processing module 11, a Wi-Fi module 12 and a radio frequency module 13. Figure 6 As shown, the terminal device may include an application processing module 11, a first Wi-Fi module 121, a second Wi-Fi module 122, a first radio frequency module 131, and a second radio frequency module 132. Figure 7 As shown, the terminal device may include an application processing module 11, a first Wi-Fi module 121, a second Wi-Fi module 122 and a radio frequency module 13. Among them, the application processing module can be used to process the first data related to the upper-layer application installed in the terminal device. The Wi-Fi module can be used to process the second data according to the wireless local area network (WLAN) protocol. The embodiment of the present application does not limit the WLAN protocol, for example, the Institute of Electrical and Electronics Engineers (IEEE) 802 series protocol. The radio frequency module can be used to send or receive third data. The embodiment of the present application does not limit the specific content of the first data, the second data and the third data, for example, it can include service messages processed by the upper-layer application. It can be understood that the functional modules included in the terminal device can be hardware and / or software modules.
[0060] When the terminal equipment works in SBSC mode, the structure can be seen in Figure 5 to Figure 7 . Combined Figure 1 , Optionally, in one implementation, mobile phone A may include 1 radio frequency module, for example Figure 5 or Figure 7 The RF module 13 in the mobile phone A is used by the mobile phone A to communicate with the router B or the projection device C. If there are multiple Wi-Fi antennas, the Wi-Fi antenna is used by one RF module, which can achieve multi-input multi-output (MIMO) and improve the channel capacity and spectrum efficiency, for example, 2*2 Wi-Fi MIMO. Optionally, in another implementation, the mobile phone A can include two RF modules, for example Figure 6 The RF module 131 and the RF module 132 in the mobile phone A are time-division multiplexed to realize communication with the router B or with the screen projection device C. At this time, the Wi-Fi antenna is used by the RF module 131 and the RF module 132 respectively, and the RF module 131 and the RF module 132 can jointly realize 2*2 Wi-Fi MIMO.
[0061] Optionally, in one implementation, mobile phone A may include a Wi-Fi module, for example Figure 5 The Wi-Fi module 12 in the router B and the services between the mobile phone A and the screen projection device C are processed by the Wi-Fi module 12. Optionally, in another implementation, the mobile phone A may include two Wi-Fi modules, for example Figure 6 or Figure 7 The first Wi-Fi module 121 and the second Wi-Fi module 122 in the mobile phone A and the router B and the mobile phone A and the screen projection device C can be processed by a Wi-Fi module respectively. For example, the first Wi-Fi module 121 is used to process the business between the mobile phone A and the router B, and the second Wi-Fi module 122 is used to process the business between the mobile phone A and the screen projection device C.
[0062] When the terminal device works in DBDC mode, the structure can be seen in Figure 6 Optionally, in one implementation, Figure 1 and Figure 3 , Figure 6 The first Wi-Fi module 121 and the first radio frequency module 131 in the embodiment can operate in the 2.4 GHz frequency band to implement the service between the mobile phone A and the router B. The second Wi-Fi module 122 and the second radio frequency module 132 can operate in the 5 GHz frequency band to implement the service between the mobile phone A and the projection device C. Optionally, in another implementation, Figure 1 and Figure 4 , Figure 6 The first Wi-Fi module 121 and the first radio frequency module 131 can operate in the 5 GHz low frequency band to implement services between mobile phone A and router B. The second Wi-Fi module 122 and the second radio frequency module 132 can operate in the 5 GHz high frequency band to implement services between mobile phone A and projection device C.
[0063] In DBDC mode, the Wi-Fi antennas are used by two RF modules respectively. The 2*2 Wi-Fi MIMO mode in SBSC will degenerate to the 2.4 GHz 1*1+5 GHz 1*1 mode, or to the 5 GHz 1*1+5 GHz 1*1 mode, or to the 2.4 GHz 1*1+2.4 GHz 1*1 mode, thus losing the MIMO performance.
[0064] When the terminal device works in DBAC mode, the structure can be seen in Figure 7 . Combined Figure 1 and Figure 4 Mobile phone A can communicate with router B or screen projection device C by time division multiplexing radio frequency module 13. Figure 7The first Wi-Fi module 121 can operate in the 5 GHz low frequency band, and is used to implement the service between the mobile phone A and the router B. The second Wi-Fi module 122 can operate in the 5 GHz high frequency band, and is used to implement the service between the mobile phone A and the projection device C.
[0065] In practical applications, the terminal device can adopt at least one of SBSC, DBDC or DBAC. For example, the terminal device can select different modes according to factors such as the type of terminal device, the hardware and software structure of the terminal device, the mode pre-configured by the terminal device, and the type of service implemented by the terminal device. Among them, for the SBSC mode, since multiple Wi-Fi antennas can work in the same frequency and channel to realize MIMO, the channel capacity and spectrum efficiency are improved. However, because the time-division multiplexing RF module sends data, high-priority services cannot be scheduled in time, the data transmission delay increases, and the quality of service (QoS) of the service cannot be guaranteed.
[0066] Combine the following Figure 8 , an exemplary description is given of sending service messages when the terminal device works in SBSC mode.
[0067] like Figure 8 As shown, mobile phone A works in SBSC mode. After mobile phone A is wirelessly connected to router B, mobile phone A can run chat APP, browser APP and email APP in response to user instructions. Chat APP involves voice service messages and video service messages. For example, user A uses chat APP to send a voice short message to user B. Accordingly, mobile phone A obtains the audio signal input by user A, and a voice service message can be generated by running chat APP. For another example, user A uses chat APP to make a video call with user B. Accordingly, mobile phone A obtains the audio signal input by user A through the microphone, and the image of user A can be obtained through the camera, and a video service message can be generated by running chat APP. Browser APP involves web service messages. For example, user A uses browser APP to browse web pages. Accordingly, mobile phone A can generate web service messages by running browser APP. Email APP involves email service messages. For example, user A uses email APP to edit and send emails to user C. Accordingly, mobile phone A can generate email service messages by running email APP. After mobile phone A establishes a Wi-Fi P2P connection with screen projection device C, mobile phone A can generate screen projection service messages by running the screen projection APP or the system application that comes with the mobile phone system.
[0068] After mobile phone A generates a service message, the service message arrives at the Wi-Fi chip randomly. Mobile phone A obtains the message queue before scheduling and sends the service message according to the message queue. Figure 8As shown, the messages included in the message queue before scheduling are arranged in the order of message arrival. For the convenience of explanation, each message in the message queue is numbered, and the smaller the number, the message arrives first, and the larger the number, the message arrives later. Assume that the message queue before scheduling includes 13 messages, numbered 0 to 12, message 0 arrives first, and message 12 arrives last. Among them, messages 0 and 9 are video service messages, messages 1, 5, and 10 are voice service messages, messages 4 and 7 are web service messages, message 6 is an email service message, and messages 2, 3, 8, 11, and 12 are screen projection service messages. Mobile phone A sends messages in sequence according to the order of arrangement of each message in the message queue before scheduling. The message sending order is the same as the order of arrangement of the messages in the message queue before scheduling, that is, message 0 is sent first and message 12 is sent last.
[0069] It can be seen that when the terminal device works in SBSC mode, the terminal device uses time division multiplexing to send data, and sends it in sequence according to the order in which the messages arrive, resulting in high-priority services not being scheduled in time. For example, the priority of the screen projection service message is higher, but when the arrival time is later than other types of messages, it cannot be sent in time, the delay increases, and the QoS of the service cannot be guaranteed.
[0070] The embodiment of the present application provides a data sending method, which is suitable for a scenario in which a terminal device simultaneously performs Wi-Fi communication with multiple devices and the terminal device operates in SBSC mode. The terminal device can obtain the priority of the service message and divide the service message into different queues according to the priority of the service message. Among them, the terminal device can add priority to the service message when running the upper-layer application. Each queue corresponds to a weight value, and the weight value is used to determine the number of service messages in the queue sent by the terminal device each time. The terminal device sends the service messages in each queue in turn according to the weight values corresponding to the multiple queues. Since the terminal device takes the priority of the service message into consideration when sending the service message, the high-priority service message is given the opportunity to be sent first. In the SBSC mode, the gain of simultaneous operation of multiple Wi-Fi antennas is obtained, and the transmission delay of high-priority services is reduced, thereby ensuring the QoS requirements of the service.
[0071] It should be noted that the service message in the embodiment of the present application can be transmitted through Wi-Fi communication, and the name of the service message is not limited, for example, it can also be called service data, service data packet, message, etc. For the sake of convenience, the embodiment of the present application is described by taking the service message as an example.
[0072] It should be noted that the embodiment of the present application does not limit the number of queues. The number of queues can be any integer greater than 1.
[0073] It should be noted that the embodiment of the present application does not limit the value of the weight value of each queue. The weight values of different queues may be the same or different. There are at least two values in the weight values corresponding to all queues. For example. In one example, there are 4 queues, marked as queues 1 to 4, and the corresponding weight values are 4, 2, 1, and 1, respectively. The weight value may be the number of service messages sent by the terminal device in the queue each time. Then, the terminal device may send 4 messages in queue 1, 2 messages in queue 2, 1 message in queue 3, or 1 message in queue 4 each time. In another example, there are 3 queues, marked as queues 1 to 3, and the corresponding weight values are 3, 2, and 1, respectively. The weight value may be the ratio between the number of service messages sent by the terminal device in the queue each time and the preset number. For example, if the preset number is 1, then the terminal device may send 3 messages in queue 1, 2 messages in queue 2, or 1 message in queue 3 each time. For another example, if the preset number is 2, then the terminal device can send 6 (weight value 3×preset number 2) messages in queue 1, 4 (2×2) messages in queue 2, or 2 (1×2) messages in queue 3 each time.
[0074] It should be noted that the number of business messages in the queue sent by the terminal device each time refers to the maximum number that can be sent. In actual transmission, if the number of business messages remaining in the queue is large, greater than or equal to the maximum number, the terminal device can send the maximum number of business messages in the queue. If the number of business messages remaining in the queue is small, less than the maximum number, the terminal device can send all remaining business messages in the queue. For example, according to the weight value, it is determined that the number of business messages in queue 1 sent by the terminal device each time is 6. Then, when the number of remaining messages in queue 1 is 7, the terminal device can send 6 messages, and when the number of remaining messages in queue 1 is 5, the terminal device can send 5 messages.
[0075] It should be noted that the embodiment of the present application does not limit the correspondence between the queue and the priority of the service message. Optionally, the number of queues and the number of priorities can be the same, and there can be a one-to-one correspondence between the queues and the priorities. For example, there are 4 queues, marked as queues 1 to 4. There are 4 priorities for service messages, marked as priorities 1 to 4, with priority 1 being the highest and priority 4 being the lowest. Service messages of priorities 1 to 4 can be divided into queues 1 to 4 respectively. Optionally, the number of queues can be less than the number of priorities, and there is at least one queue, which corresponds to at least two priorities. For example, there are 3 queues, marked as queues 1 to 3. There are 5 priorities for service messages, marked as priorities 1 to 5, with priority 1 being the highest and priority 5 being the lowest. In one implementation, service messages of priority 1 can be divided into queue 1, service messages of priority 2 to 3 can be divided into queue 2, and service messages of priority 4 to 5 can be divided into queue 3. In another implementation, service packets of priority 1 may be classified into queue 1, service packets of priority 2 may be classified into queue 2, and service packets of priority 3 to 5 may be classified into queue 3. The weight value of the queue corresponding to the high priority is greater than or equal to the weight value of the low priority queue.
[0076] It should be noted that the embodiment of the present application does not limit the correspondence between the type of service message and the priority of the service message. Optionally, the number of types of service messages and the number of priorities can be the same, and the types of service messages and priorities can correspond one to one. For example, there are 4 types of service messages, marked as types 1 to 4. There are 4 priorities of service messages, marked as priorities 1 to 4, with priority 1 being the highest and priority 4 being the lowest. Types 1 to 4 of service messages correspond one to one with priorities 1 to 4 of service messages, for example, type 1 of service messages corresponds to priority 1 of service messages. Optionally, the number of types of service messages is greater than the number of priorities, and there is at least one priority, which corresponds to at least two types of service messages. For example, there are 3 priorities of service messages, marked as priorities 1 to 3. There are 5 types of service messages, marked as types 1 to 5. In one implementation, type 1 of service messages corresponds to priority 1, types 2 to 3 of service messages correspond to priority 2, and types 4 to 5 of service messages correspond to priority 3. In another implementation, type 1 of the service message corresponds to priority 1, type 2 of the service message corresponds to priority 2, and types 3 to 5 of the service message correspond to priority 3.
[0077] It should be noted that the embodiment of the present application does not limit the type of service message, and different implementation methods may be used according to the settings of the terminal device or the type of the upper layer application. Optionally, the type of service message may include but is not limited to at least one of the following: voice service message, video service message, web service message, email service message, game service message, screen projection service message or file sharing service message.
[0078] It should be noted that the embodiment of the present application does not limit the correspondence between the upper layer application and the service message type. An application may involve at least one type of service message, for example, Figure 8 As shown, the chat APP may involve voice service messages and video service messages.
[0079] It should be noted that the data sending method provided in the embodiment of the present application can be applied in one scenario: multiple types of applications are installed on the terminal device, and the application that comes with the system is also installed. Due to different developers and versions of the application, some applications support adding priority to the service message, and some applications do not support adding priority to the service message. Correspondingly, the terminal device may add priority to the service message by running different applications, or it may not add priority to the service message. In the embodiment of the present application, the service message has no priority and can also be understood as having the lowest level of priority. For example, there are 3 queues, marked as queues 1 to 3. There are 3 priorities for the service message, marked as priority 1 to 3, with priority 1 being the highest and priority 3 being the lowest. In one implementation, the service message of priority 1 can be divided into queue 1, the service message of priority 2 can be divided into queue 2, the service message of priority 3 and the service message without priority can be divided into queue 3. In another implementation, the service message of priority 1 can be divided into queue 1, the service message of priority 2 to 3 can be divided into queue 2, and the service message without priority can be divided into queue 3.
[0080] Combine the following Figures 9 to 13 , an exemplary description is given of a terminal device sending a service message after adopting the data sending method provided in an embodiment of the present application. Figures 9 to 13 For the types of service messages and the message queues before scheduling, see Figure 8 In each example, the weight value of the queue directly indicates the number of service packets in the queue sent by the terminal device each time.
[0081] Optionally, in one example, Fig. 9As shown, there are 5 priorities for service messages, marked as priorities 1 to 5, with priority 1 being the highest and priority 5 being the lowest. The priorities of screen projection service messages, video service messages, voice service messages, web service messages, and email service messages are priority 1 to 5, respectively. There are 5 queues, marked as queues 1 to 5. Mobile phone A can obtain the priority of each message in the message queue before scheduling, and divide the service messages into different queues according to the priority of the service messages. Specifically, service messages of priority 1 to 5 are divided into queues 1 to 5 respectively. Queue 1 includes messages 2, 3, 8, 11, and 12, all of which are screen projection service messages. Queue 2 includes messages 0 and 9, all of which are video service messages. Queue 3 includes messages 1, 5, and 10, all of which are audio service messages. Queue 4 includes messages 4 and 7, all of which are web service messages. Queue 5 includes message 6, which is an email service message. The weight values of queues 1 to 5 are 5, 4, 3, 2, and 1, respectively, that is, mobile phone A can send 5 messages in queue 1, 4 messages in queue 2, 3 messages in queue 3, 2 messages in queue 4, or 1 message in queue 5 at a time. Mobile phone A sends the service messages in each queue in turn according to the weight values corresponding to the multiple queues, and the message sending order (expressed by digital numbers) is: 2, 3, 8, 11, 12, 0, 9, 1, 5, 10, 4, 7, 6. It can be seen that since the terminal device considers the priority of the service message when sending the service message, the high-priority service message has the opportunity to be sent first. For example, mobile phone A gives priority to sending the screen projection service message and sends 5 messages each time, which reduces the transmission delay of the high-priority service when the terminal device works in the SBSC mode, and ensures the QoS requirements of the service. Moreover, although the proportion of low-priority business messages sent is small, for example, the email business message is in queue 5, and mobile phone A sends one email business message each time, the low-priority business messages will not be completely deprived of the opportunity to be sent, and the functions of low-priority services will not be affected.
[0082] Alternatively, in another example, Fig.10 As shown in the figure, there are 4 service message priorities, marked as priority 1 to 4, with priority 1 being the highest and priority 4 being the lowest. There are 4 queues, marked as queues 1 to 4. Service messages with priorities 1 to 4 are divided into queues 1 to 4 respectively. This example is different from Fig. 9 The difference between the examples shown is that in this example, one priority can correspond to multiple types of service messages. For example, the priorities of web service messages and email service messages are both priority 4. After mobile phone A classifies the service messages, queues 1 to 3 are Fig. 9The queues 1 to 3 in the table are the same, and queue 4 includes messages 4, 6, and 7, including web service messages and email service messages. The weight values of queues 1 to 4 are 4, 2, 1, and 1, respectively. Mobile phone A sends the service messages in each queue in turn according to the weight values corresponding to the multiple queues. The messages sent in the first round (indicated by digital numbers) include: 2, 3, 8, 11, 0, 9, 1, and 4. The remaining messages in each queue include: message 12 in queue 1, messages 5 and 10 in queue 3, and messages 6 and 7 in queue 4. Mobile phone A continues to send the service messages in each queue according to the weight values corresponding to the multiple queues. The messages sent in the second round include: 12, 5, and 6, and the messages sent in the third round include: 10 and 7. Finally, the message sending order is: 2, 3, 8, 11, 0, 9, 1, 4, 12, 5, 6, 10, and 7.
[0083] Optionally, in yet another example, Fig.11 As shown in the figure, there are 5 service message priorities, marked as priority 1 to 5, with priority 1 being the highest and priority 5 being the lowest. There are 4 queues, marked as queues 1 to 4. Fig. 9 The difference between the examples shown is that in this example, one queue can correspond to multiple service message priorities. For example, service messages of priority 4 and 5 can be classified into queue 4. After mobile phone A classifies the service messages, queues 1 to 3 are Fig. 9 The queues 1 to 3 in the example are the same, and the queue 4 includes messages 4, 6, and 7, including web service messages and email service messages. The weight values of queues 1 to 4 are 4, 2, 1, and 1 respectively. Mobile phone A sends the service messages in each queue in turn according to the weight values corresponding to the multiple queues. The message sending order is the same as Fig.10 The same is not repeated here.
[0084] Optionally, in yet another example, Fig.12 As shown in the figure, there are three priorities for service messages, marked as priority 1 to 3, with priority 1 being the highest and priority 3 being the lowest. The priority of screen projection service messages is priority 1, the priority of video service messages and voice service messages is priority 2, and the priority of email service messages is priority 3. There are three queues, marked as queues 1 to 3. This example is different from Figures 9-11The difference between the examples shown is that in this example, some service messages do not have priority, for example, web service messages do not have priority. In this example, service messages of priority 1 can be divided into queue 1, service messages of priority 2 can be divided into queue 2, and service messages of priority 3 and no priority can be divided into queue 3, and the weight value of queue 3 is the smallest. After mobile phone A classifies the service messages, queue 1 includes messages 2, 3, 8, 11, and 12, all of which are screen projection service messages. Queue 2 includes messages 0, 1, 5, 9, and 10, including voice service messages and video service messages. Queue 3 includes messages 4, 6, and 7, including web service messages and email service messages. The weight values of queues 1 to 3 are 4, 2, and 1, respectively. Mobile phone A sends the service messages in each queue in turn according to the weight values corresponding to the multiple queues. The messages sent in the first round (indicated by digital numbers) include: 2, 3, 8, 11, 0, 1, 4; the messages sent in the second round include: 12, 5, 9, 6; and the messages sent in the third round include: 10, 7.
[0085] Optionally, in yet another example, Fig.13 As shown in the figure, there are 4 service message priorities, marked as priority 1 to 4, with priority 1 being the highest and priority 4 being the lowest. There are 4 queues, marked as queues 1 to 4. Fig.12 The difference between the examples shown is that in this example, the service messages without priority are separately divided into one queue, and the weight value of the queue is the minimum value among the weight values of all queues, for example, it is divided into queue 4. After mobile phone A classifies the service messages, queue 1 includes messages 2, 3, 8, 11, and 12, all of which are screen projection service messages. Queue 2 includes messages 0 and 9, all of which are video service messages. Queue 3 includes messages 1, 5, 6, and 10, including voice service messages and email service messages. Queue 4 includes messages 4 and 7, including web service messages, without priority. The weight values of queues 1 to 4 are 4, 2, 2, and 1, respectively. Mobile phone A sends the service messages in each queue in turn according to the weight values corresponding to the multiple queues. The messages sent in the first round (indicated by digital numbers) include: 2, 3, 8, 11, 0, 9, 1, 5, and 4, and the messages sent in the second round include: 12, 6, 10, and 7.
[0086] The technical solution of the present application is described in detail below with reference to specific embodiments.
[0087] Fig.14 A flow chart of a data transmission method provided in an embodiment of the present application. The data transmission method provided in this embodiment can be executed by a terminal device. Fig.14 As shown, the data sending method provided in this embodiment may include:
[0088] S1401. Obtain a first service message to be sent.
[0089] The first service message is a service message that can be transmitted via Wi-Fi communication, and can be a service message that is processed by an upper-layer application and then transmitted to a bottom-layer Wi-Fi chip.
[0090] The embodiments of the present application do not limit the developers and functions of the upper-layer application. Optionally, the application can be an application that comes with the terminal device system, such as a browser, an email application, or a smart home application, etc. The system's built-in application may be different for different types of terminal devices. Optionally, the application can be an application developed by a third party and installed by the user on the terminal device, such as a browser, a chat APP, a video APP, or a file sharing APP, etc.
[0091] S1402: Determine whether the first service message has a priority.
[0092] The first service message may or may not have a priority, which is related to the upper-layer application that processes the first service message. For example, some applications that come with the terminal device system may support adding priorities to service messages, and the first service message has a priority. Some applications developed by a third party may not support adding priorities to service messages, and the first service message does not have a priority.
[0093] If the first service message has a priority, S1403 is executed. If the first service message does not have a priority, S1404 is executed.
[0094] When the first service message has a priority, the embodiment of the present application does not limit the manner in which the first service message carries the priority.
[0095] Optionally, in one implementation, the priority may be carried in a field of the service message. Optionally, the field may be an existing field in the service message. Optionally, the priority may reuse some bits in the existing field, or occupy reserved bits in the existing field. Optionally, the field may be a reserved field in the service message. Optionally, the field may be a newly added field in the service message.
[0096] The format of the service message and the field carrying the priority in the service message are exemplified below through Table 1, but Table 1 does not limit this. Table 1 shows the message format specified in the 802.3 protocol. The first service message can carry the priority by using the "user priority" part in the multiplexing field "Q-Tag". In the embodiment of the present application, a correspondence between the priority and the queue is pre-established.
[0097] Table 1
[0098] Fields Destination Address Source Address Q Tags Length / Type Data / LLC Frame Check Sequence Number of bytes 6 bytes 6 bytes 4 bytes 2 bytes 46 to 1500 bytes 4 bytes
[0099] The destination address consists of 6 bytes and indicates the destination address of the service message.
[0100] The source address (sourceaddress) consists of 6 bytes and indicates the source address of the service message.
[0101] The Q tag (Q-Tag) consists of 4 bytes, the first two bytes are the tag protocol identifier (TAG protocol identifier, TPID), and the last two bytes are the tag control information (TAG control information, TCI). TCI consists of 3 parts: user priority (user_priority), canonical format indicator (canonical format indicator, CFI) and virtual network identifier (VLAN ID, VID). User priority occupies 3 bits and can represent up to 8 different priorities. CFI occupies 1 bit. When the value is 0, it means that the media access control (media access control, MAC) address format in the service message is in the standard format. When the value is 1, it has different meanings depending on the network type. VID occupies 12 bits and represents the identifier of the virtual local area network (VLAN).
[0102] Data / LLC consists of 46 to 1500 bytes. LLC stands for logical link control, and the logical link control protocol is defined in IEEE 802.2.
[0103] The frame check sequence consists of 4 bytes.
[0104] For a detailed description of each field, please refer to the 802.3 protocol and will not be repeated here.
[0105] Optionally, in another implementation, the priority can be encapsulated in the encapsulation structure of the Wi-Fi message, for example, in a Linux system, it can be encapsulated in a socket buffer (skb). The skb consists of two parts: message data and management data. Among them, the message data saves the actual transmitted data, for example, the message format specified in the IEEE 802 series protocol. The management data includes additional data for the kernel to process the message, for example, control information exchanged between different protocols. After an application transmits data to a socket, the socket will create a corresponding socket buffer and copy the data to the buffer.
[0106] It should be noted that the embodiment of the present application does not limit the position of the priority in the encapsulation structure of the Wi-Fi message and the number of bits occupied.
[0107] S1403: If the first service message has a priority, according to a preset correspondence between the M priorities and the N queues, the first service message is divided into a target queue corresponding to the priority of the first service message.
[0108] Wherein, M and N are integers greater than 1, and M is greater than or equal to N. A queue is set with a weight value, and the weight value is used to determine the number of service messages in the queue sent by the terminal device each time. The weight value of the queue corresponding to the first priority among the M priorities is greater than or equal to the weight value of the queue corresponding to the second priority, and the first priority is higher than the second priority.
[0109] The embodiment of the present application does not limit the specific values of M and N, the corresponding relationship between M priorities and N queues, and the specific value of the weight value of each queue. Figures 9 to 13 The relevant description will not be repeated here.
[0110] In the embodiment of the present application, N queues also have priorities, and the weight value of the high-priority queue is greater than or equal to the weight value of the low-priority queue. For queue A corresponding to the high priority among the M priorities and queue B corresponding to the low priority among the M priorities, the priority of queue A is higher than the priority of queue B. When the terminal device sends a service message, it will give priority to sending the service message in the high-priority queue and then send the service message in the low-priority queue. For example. In one example, Fig. 9 As shown, M priorities include priorities 1 to 5, priorities 1 to 5 correspond to queues 1 to 5 respectively, and the priorities of queues 1 to 5 gradually decrease, with queue 1 having the highest priority and queue 5 having the lowest priority. The weight values of queues 1 to 5 are 5, 4, 3, 2, and 1 respectively, and the weight value of the high priority queue is greater than the weight value of the low priority queue. In another example, Fig.11As shown, the M priorities include priorities 1 to 5. Priority 1 corresponds to queue 1, priority 2 corresponds to queue 2, priority 3 corresponds to queue 3, and priorities 4 to 5 correspond to queue 4. The priorities of queues 1 to 4 gradually decrease, with queue 1 having the highest priority and queue 4 having the lowest priority. The weight values of queues 1 to 4 are 4, 2, 1, and 1, respectively. Among them, the priority of queue 3 is higher than that of queue 4, and the weight value of queue 3 is the same as that of queue 4. When sending service messages, the terminal device will give priority to sending service messages in queue 3 and then send service messages in queue 4.
[0111] S1404: If the first service message does not have a priority, the first service message is divided into a first queue, wherein a weight value of the first queue is a minimum value among weight values of the N queues.
[0112] Specifically, for a service message that does not have a priority, the terminal device classifies the service message into a first queue with the lowest priority.
[0113] Optionally, in one implementation, the service packets in the first queue may include service packets without priority and service packets with low priority among the M priority levels. Fig.12 As shown, service messages of priority 3 and those without priority are all divided into queue 3.
[0114] Optionally, in another implementation, the service messages in the first queue may include service messages that do not have priority. Fig.13 As shown, service messages without priority are all divided into queue 4.
[0115] S1405 . Send the service messages in each queue in descending order of priority of the N queues according to the weight value of the queue.
[0116] Specifically, in order of priority from high to low, for the first queue with the highest priority, determine the number of business messages that the terminal device can send each time (marked as Q) according to the weight value of the queue, and determine whether the current number of business messages in the queue is greater than or equal to Q. If the current number of business messages in the queue is greater than or equal to Q, the terminal device sends the Q business messages in the queue. If the current number of business messages in the queue is less than Q, the terminal device sends all business messages in the queue. Then, for the second queue with a lower priority than the first queue, send the business messages in the second queue in accordance with the processing method of the first queue, and so on, until the business messages in the last queue with the lowest priority are sent. Afterwards, the terminal device cyclically sends the business messages in the N queues in order of priority from high to low. Exemplary, the process of sending business messages can be seen in Figures 9 to 13 Related description in .
[0117] It can be seen that the data sending method provided in this embodiment can be applied to the scenario where the terminal device simultaneously performs Wi-Fi communication with multiple devices and the terminal device works in SBSC mode. After the terminal device obtains the first service message to be sent, it determines whether the first service message has priority. When the first service message has priority, the first service message can be divided into the target queue corresponding to the priority of the first service message according to the corresponding relationship between the priority and the queue. When the first service message does not have priority, the first service message can be divided into the queue with the lowest priority. Each queue corresponds to a weight value. The terminal device sends the service messages in each queue in order from high to low according to the weight values corresponding to the multiple queues. Since the terminal device considers the priority of the service message when sending the service message, the high-priority service message gets the opportunity to be sent first. In the SBSC mode, the transmission delay of the high-priority service is reduced, and the QoS requirements of the high-priority service are guaranteed. Moreover, although the proportion of low-priority service messages sent is small, they will not be completely unable to get the opportunity to send, and the function of the low-priority service will not be affected.
[0118] Optionally, the data sending method provided in this embodiment may further include:
[0119] A first application is run, and a priority is added to the first service message.
[0120] The first application supports adding priority to the service message. The embodiment of the present application does not limit the developer and function of the first application. The first application can be an application that comes with the terminal device system, or an application developed by a third party and installed on the terminal device.
[0121] The first application is related to the first service message. Optionally, the first service message may be a service message generated when the terminal device runs the first application. Optionally, the first service message may be a service message obtained by the first application from other processing modules of the terminal device.
[0122] Optionally, adding a priority to the first service message may include:
[0123] According to the correspondence between the type of the service message and the priority of the service message, the priority corresponding to the type of the first service message is added to the first service message.
[0124] It should be noted that the embodiment of the present application does not limit the correspondence between the type of business message and the priority of the business message.
[0125] It should be noted that the implementation method of the priority is not limited in the embodiment of the present application. For example, if there are 8 priorities, the value can be a decimal number of 0 to 7, represented by 3 bits. It can be defined that the value 0 represents the highest priority and the value 7 represents the lowest priority, or it can be defined that the value 0 represents the lowest priority and the value 7 represents the highest priority.
[0126] It is understandable that, in order to implement the above functions, the terminal device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0127] The embodiment of the present application can divide the functional modules of the terminal device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0128] In the case of dividing each functional module into corresponding functional modules, Fig.15 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Fig.15 As shown, the terminal device can be used as a first electronic device and can include: a processing module 1501 and a sending module 1502.
[0129] The processing module 1501 is used to obtain first data of a first service at a first moment, and obtain second data of a second service at a second moment. Before the first moment, the priority of the first data is lower than the priority of the second data. The first electronic device performs the first service through a first Wi-Fi connection with the second electronic device, and the first electronic device performs the second service through a second Wi-Fi connection with the third electronic device, and both the first Wi-Fi connection and the second Wi-Fi connection use a first channel of a first frequency band.
[0130] The sending module 1502 is used to send the second data at a third moment and send the first data at a fourth moment; the third moment is before the fourth moment.
[0131] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0132] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The sending module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0133] The embodiment of the present application also provides a terminal device. Fig.16 Another structural schematic diagram of a terminal device provided in an embodiment of the present application.
[0134] like Fig.16 As shown, the terminal 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. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0135] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split 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.
[0136] 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.
[0137] The controller may be the nerve center and command center of the terminal 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.
[0138] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0139] 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.
[0140] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.
[0141] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0142] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0143] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0144] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the terminal device 100.
[0145] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0146] The USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transfer data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other terminal devices, such as AR devices, etc.
[0147] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0148] The charging management module 140 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the charging input from a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also supply power to the terminal device through the power management module 141.
[0149] 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, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0150] The wireless communication function of the terminal 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.
[0151] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 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.
[0152] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (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.
[0153] 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.
[0154] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal 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.
[0155] In some embodiments, the antenna 1 of the terminal 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 terminal 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-Synchronous 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 (GNSS), a BeiDou Navigation Satellite System (BDS), a Quasi-Zenith Satellite System (QZSS) and / or a Satellite Based Augmentation System (SBAS).
[0156] The terminal 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, which execute program instructions to generate or change display information.
[0157] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0158] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0159] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0160] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0161] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0162] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0163] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0164] 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 terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0165] 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 terminal 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 terminal 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 (Universal Flash Storage, UFS), etc.
[0166] The terminal 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.
[0167] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0168] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0169] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0170] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.
[0171] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
[0172] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0173] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0174] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0175] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0176] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.
[0177] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0178] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.
[0179] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
[0180] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0181] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0182] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.
[0183] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0184] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.
[0185] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0186] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0187] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
[0188] The terminal device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0189] An embodiment of the present application also provides a chip system, including a processor, wherein the processor is coupled to a memory, and the processor executes a computer program stored in the memory, and can execute the method in the above embodiment.
[0190] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a terminal device, the terminal device executes the method in the above embodiment.
[0191] The embodiments of the present application also provide a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the method in the above-mentioned embodiments.
[0192] It should also be understood that the terms "first", "second", "third", etc. used in the embodiments of the present application are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance. "Multiple" means two or more.
[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data sending method, characterized in that, applied to a first electronic device, the first electronic device performs a first service through a first Wi-Fi connection with a second electronic device, and the first electronic device performs a second service through a second Wi-Fi connection with a third electronic device. Both the first Wi-Fi connection and the second Wi-Fi connection use a first channel in a first frequency band; The method includes: obtaining first data of the first service at a first moment and obtaining second data of the second service at a second moment; the first moment is before the second moment, and the priority of the first data is lower than the priority of the second data; According to the correspondence between preset M priorities and N queues, divide the first data and the second data into target queues corresponding to the priorities of the first data and the second data, where M and N are integers greater than 1, and M is greater than or equal to N; the queue is set with a weight value, and the weight value is used to determine the number of data sent in the queue each time; sending the second data at a third moment and sending the first data at a fourth moment, including: sequentially sending the data in each queue according to the weight value of each queue in the order of the priorities of the N queues from high to low; the third moment is before the fourth moment.
2. The method according to claim 1, characterized in that, when the first electronic device communicates with the second electronic device, the first electronic device operates in the wireless station STA mode, and the second electronic device operates in the access point AP mode; when the first electronic device communicates with the third electronic device, both the first electronic device and the third electronic device operate in the Wi-Fi peer-to-peer Wi-Fi P2P mode.
3. The method according to claim 1, characterized in that, the second service is a Wi-Fi P2P service.
4. The method according to claim 3, characterized in that, the second service is a screen mirroring service or a file sharing service.
5. The method according to claim 1, characterized in that, the second data includes at least one of the following: screen mirroring data, video data or audio data.
6. The method according to claim 1, characterized in that, the first frequency band is the Wi-Fi 5GHz frequency band.
7. The method according to any one of claims 1-6, characterized in that, there are multiple pieces of the first data and at least one piece of the second data, and the number of the second data sent at the third moment is greater than the number of the first data sent at the fourth moment.
8. The method according to any one of claims 1-6, characterized in that, before obtaining the first data of the first service at the first moment and obtaining the second data of the second service at the second moment, it further includes: running a first application program to set the priority of the first data for the first data; running a second application program to set the priority of the second data for the second data.
9. An electronic device, characterized in that, As a first electronic device, the first electronic device conducts a first service through a first Wi-Fi connection with a second electronic device, and conducts a second service through a second Wi-Fi connection with a third electronic device. Both the first Wi-Fi connection and the second Wi-Fi connection use a first channel in a first frequency band; The first electronic device includes: One or more processors; One or more memories; A transceiver; The memory stores one or more programs. When the one or more programs are executed by the processor, the first electronic device is caused to perform the following steps: Obtain first data of the first service at a first moment and obtain second data of the second service at a second moment; the first moment is before the second moment, and the priority of the first data is lower than the priority of the second data; According to a correspondence relationship between M priorities and N queues preset, divide the first data and the second data into target queues corresponding to the priorities of the first data and the second data, where M and N are integers greater than 1, and M is greater than or equal to N; the queues are set with weight values, and the weight values are used to determine the number of data sent in each queue each time; Send the second data at a third moment and send the first data at a fourth moment, including: sequentially sending the data in each queue according to the weight value of each queue in the order of the priorities of the N queues from high to low; the third moment is before the fourth moment.
10. The electronic device according to claim 9, wherein, When the first electronic device communicates with the second electronic device, the first electronic device operates in the wireless station STA mode, and the second electronic device operates in the access point AP mode; When the first electronic device communicates with the third electronic device, both the first electronic device and the third electronic device operate in the Wi-Fi peer-to-peer Wi-Fi P2P mode.
11. The electronic device according to claim 9, wherein, The second service is a Wi-Fi P2P service.
12. The electronic device according to claim 11, wherein, The second service is a screen mirroring service or a file sharing service.
13. The electronic device according to claim 9, wherein, The second data includes at least one of the following: screen mirroring data, video data, or audio data.
14. The electronic device according to claim 9, wherein, The first frequency band is the Wi-Fi 5GHz frequency band.
15. The electronic device according to any one of claims 9-14, wherein, There are multiple pieces of the first data and at least one piece of the second data, and the number of the second data sent at the third moment is greater than the number of the first data sent at the fourth moment.
16. The electronic device according to any one of claims 9-14, wherein, The processor is further configured to: Run a first application program and set the priority of the first data for the first data; Run a second application and set the priority of the second data for the second data.
17. A chip system characterized in that it is applied to a first electronic device. The first electronic device conducts a first service through a first Wi-Fi connection with a second electronic device, and the first electronic device conducts a second service through a second Wi-Fi connection with a third electronic device. Both the first Wi-Fi connection and the second Wi-Fi connection use a first channel in a first frequency band; The chip system includes: a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to perform the following steps: Obtain first data of the first service at a first moment, and obtain second data of the second service at a second moment; the first moment is before the second moment, and the priority of the first data is lower than the priority of the second data; According to a preset correspondence between M priorities and N queues, divide the first data and the second data into target queues corresponding to the priorities of the first data and the second data, where M and N are integers greater than 1, and M is greater than or equal to N; the queue is set with a weight value, and the weight value is used to determine the number of data sent in the queue each time; Send the second data at a third moment and send the first data at a fourth moment, including: in the order of the priorities of the N queues from high to low, successively send the data in each queue according to the weight value of each queue; the third moment is before the fourth moment.
18. The chip system according to claim 17 characterized in that When the first electronic device communicates with the second electronic device, the first electronic device operates in the wireless station STA mode, and the second electronic device operates in the access point AP mode; When the first electronic device communicates with the third electronic device, both the first electronic device and the third electronic device operate in the Wi-Fi peer-to-peer Wi-Fi P2P mode.
19. The chip system according to claim 17 characterized in that The second service is a Wi-Fi P2P service.
20. The chip system according to claim 19 characterized in that The second service is a screen mirroring service or a file sharing service.
21. The chip system according to claim 17 characterized in that The second data includes at least one of the following: screen mirroring data, video data or audio data.
22. The chip system according to claim 17 characterized in that The first frequency band is the Wi-Fi 5GHz frequency band.
23. The chip system according to any one of claims 17-22 characterized in that There are multiple pieces of the first data and at least one piece of the second data, and the number of the second data sent at the third moment is greater than the number of the first data sent at the fourth moment.
24. The chip system according to any one of claims 17-22 characterized in that The processor is further used for: Run the first application program and set the priority of the first data for the first data; Run the second application program and set the priority of the second data for the second data.
25. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores computer instructions, and when the computer instructions run on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-8.
Citation Information
Patent Citations
Data transmission control method and related product
CN109640310A
Cited By
Data sending method, electronic device, chip system, and storage medium
WO2022068486A1