CN117135750A - Data transmission method, electronic device and storage medium - Google Patents

Data transmission method, electronic device and storage medium Download PDF

Info

Publication number
CN117135750A
CN117135750A CN202310481730.7A CN202310481730A CN117135750A CN 117135750 A CN117135750 A CN 117135750A CN 202310481730 A CN202310481730 A CN 202310481730A CN 117135750 A CN117135750 A CN 117135750A
Authority
CN
China
Prior art keywords
communication network
data packet
time
preset
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310481730.7A
Other languages
Chinese (zh)
Other versions
CN117135750B (en
Inventor
王琨琨
王春雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310481730.7A priority Critical patent/CN117135750B/en
Priority claimed from CN202310481730.7A external-priority patent/CN117135750B/en
Publication of CN117135750A publication Critical patent/CN117135750A/en
Application granted granted Critical
Publication of CN117135750B publication Critical patent/CN117135750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0055Transmission or use of information for re-establishing the radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

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

Abstract

The application provides a data transmission method, electronic equipment and a storage medium, and relates to the technical field of communication. The electronic device supports data transmission over a first communication network and a second communication network sharing the same frequency band. After the electronic equipment starts to transmit the first data packet of the first application through the first communication network, if the service transmission of the second communication network is detected, acquiring the time difference between the packet receiving time of the last first data packet and the current time. If the time difference is greater than the preset scheduling duration, switching to service transmission of the second communication network after the next first data packet is transmitted through the first communication network or after the first preset duration from the current moment. Therefore, the influence of the service transmission of the second communication network on the service transmission of the first communication network in the time division multiplexing process can be reduced, and the user experience is improved.

Description

Data transmission method, electronic device and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a data transmission method, electronic equipment and a storage medium.
Background
As the demand for communication between electronic devices increases, a single communication scheme has failed to meet the demand. Currently, more and more electronic devices are configured with multiple communication modes to meet multiple communication requirements. For example, taking an electronic device as a mobile phone as an example, the mobile phone may be configured with communication modes of various communication networks such as long term evolution (long term evolution, LTE), new Radio (NR), wireless local area network (wireless local area networks, WLAN), bluetooth network (BT), and the like.
Different communication networks may occupy the same frequency band. The electronic device may collect multiplexed data for transmission over different communication networks using time division multiplexing (Time Division Multiplexing, TDM) techniques. Time division multiplexing refers to transmitting different data in different time periods on the same frequency band. For example, the electronic device is a mobile phone. The mobile phone adopts a time division multiplexing mode to realize the sharing of the Wi-Fi network and the Bluetooth network on a frequency band of 2.4 gigahertz (2.4G frequency band).
However, in the time division multiplexing process, one path of data may occupy time slot resources and be transmitted preferentially, which affects normal transmission of the other path of data and then affects user experience.
Disclosure of Invention
The embodiment of the application provides a data transmission method, electronic equipment and a storage medium, which are used for reducing the influence of one path of data preempting time slot resource on the other path of data in a time division multiplexing process; under the condition that two paths of data coexist, the influence is reduced to the greatest extent, and the user experience is improved.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, a data transmission method is provided, applied to an electronic device, and the method includes: the electronic device runs a first application and transmits a first data packet of the first application through a first communication network. If the electronic device detects service transmission of a second communication network sharing a target frequency band with the first communication network after starting to transmit the first data packet through the first communication network, the electronic device obtains a time difference between a packet receiving time of the last first data packet and a current time. If the time difference is greater than the preset scheduling duration, the electronic device switches to the service transmission of the second communication network after the next first data packet is transmitted through the first communication network, or switches to the service transmission of the second communication network after the first preset duration from the current moment.
In the method, the preset scheduling time length is smaller than the packet receiving interval of the first data packet. The packet receiving interval is used to represent a time interval during which the electronic device receives two adjacent first data packets. If the time difference between the packet receiving time of the last first data packet and the current time is greater than the preset scheduling duration, the electronic equipment is about to receive the next data packet of the first communication network. In this case, the electronic device may delay receiving the second data packet of the second communication network, so that a situation in which the transmission delay of the first communication network is caused due to the preemption of the time slot by the second communication network may be reduced.
In a possible implementation manner of the first aspect, if the time difference is greater than a preset scheduling duration, the electronic device switches to service transmission of the second communication network, and receives the second data packet through the second communication network.
In the method, if the time difference is larger than the preset scheduling duration, the electronic equipment is less likely to receive the next first data packet in a short time. In this case, the electronic device may switch to the service transmission of the second communication network immediately and receive the second data packet of the second communication network in time.
In another possible implementation manner of the first aspect, after switching to the traffic transmission of the second communication network and receiving a second data packet through the second communication network, the electronic device switches to the traffic transmission of the first communication network again.
In this implementation manner, the electronic device immediately switches the service transmission of the first communication network after receiving a second data packet transmitted by the second communication network, so that the influence of the second communication network on the service transmission of the first communication network can be reduced.
In another possible implementation manner of the first aspect, after the electronic device starts transmitting the first data packet through the first communication network, before acquiring a time difference between a packet receiving time of receiving a previous first data packet and a current time, the electronic device may further count a packet receiving interval of the first data packet received through the first communication network in a second preset duration, and determine whether a difference of the counted packet receiving intervals in the second preset duration is smaller than a preset difference threshold. If the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold, the electronic equipment acquires the time difference between the packet receiving time of the last first data packet and the current time.
In this implementation manner, the electronic device may determine whether a packet receiving interval of the first data packet is periodic after starting to receive the first data packet. If the packet receiving interval of the first data packet is in a periodic rule, scheduling the time slot resources by utilizing the preset scheduling time length to improve the utilization rate of the time slot resources.
In another possible implementation manner of the first aspect, if the difference between the counted packet receiving intervals within the second preset duration is greater than or equal to a preset difference threshold, switching to service transmission of the second communication network.
In this implementation manner, if the packet receiving interval of the first data packet is not periodic, the electronic device may switch to the service transmission of the second communication network immediately after detecting the service transmission of the second communication network, and receive the second data packet of the second communication network in time.
In another possible implementation manner of the first aspect, before obtaining a time difference between a packet receiving time of receiving a last first data packet and a current time, the electronic device may calculate a packet receiving interval of the first data packet received through the first communication network within a second preset duration after the first data packet is transmitted through the first communication network, and determine whether a difference between the packet receiving intervals calculated within the second preset duration is smaller than a preset difference threshold. If the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold, the electronic equipment marks a first identifier for the first application, and the packet receiving intervals of the first data packets of the first application indicated by the first identifier have a periodicity rule. The electronic device detects the service transmission of the second communication network after transmitting the first data packet through the first communication network, and if the first application marks the first identifier, the step of acquiring the time difference between the packet receiving time of the last first data packet and the current time is executed.
In this implementation manner, the electronic device only needs to determine, when the first application is running for the first time, whether a packet receiving interval of the first data packet of the first application is a periodic rule. When the electronic equipment runs the first application again, the first mark of the first application mark can be used for judging that the packet receiving interval of the first data packet of the first application is in a periodic rule, and the duty ratio of service transmission of the first communication network and the second communication network is adjusted as early as possible under the condition that the first data packet of the first application is in the periodic rule, so that the utilization rate of time slot resources of data transmission is improved.
In another possible implementation manner of the first aspect, if the difference between the counted packet receiving intervals within the second preset time period is greater than or equal to a preset difference threshold, the electronic device marks the second identifier for the first application. If the first application marks the second identifier, the electronic device immediately switches to the service transmission of the second communication network under the condition that the existence of the service transmission of the second communication network is detected.
In this implementation manner, the electronic device may determine, through the second identifier of the first application flag, that the packet receiving interval of the first data packet of the first application is not in a periodic rule. In this case, the electronic device may switch to the service transmission of the second communication network immediately after detecting the service transmission of the second communication network, and receive the second data packet of the second communication network in time.
In another possible implementation manner of the first aspect, the electronic device may set the preset scheduling period according to a packet receiving interval counted in the second preset period. Therefore, the electronic equipment can more flexibly adjust the duty ratio of the service transmission of the first communication network and the service transmission of the second communication network by setting corresponding preset scheduling time length for different data transmission scenes, so that the scheme is suitable for more data transmission scenes.
In another possible implementation manner of the first aspect, the first communication network is a WiFi network, and the second communication network is a bluetooth network. The electronic equipment can schedule time slot resources according to the data transmission scene of time division multiplexing of the WiFi network and the Bluetooth network, so that the influence between the WiFi network and the Bluetooth network is reduced, and the user experience is improved.
In a second aspect, the present application provides an electronic device comprising: memory, wireless communication module and processor. The memory, the wireless communication module, and the processor are coupled. The wireless communication module is used for supporting the first communication network and the second communication network and transmitting data or signaling of the first communication network and/or the second communication network. The memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the steps of: running a first application, and transmitting a first data packet of the first application through a first communication network; acquiring a time difference between a packet receiving time of a last first data packet and a current time when service transmission of a second communication network is detected after the first data packet is transmitted through the first communication network; if the time difference is greater than the preset scheduling time length, switching to service transmission of the second communication network after the next first data packet is transmitted through the first communication network, or switching to service transmission of the second communication network after the first preset time length from the current moment; the preset scheduling time length is smaller than the packet receiving interval of the first data packet; the packet reception interval is used to represent a time interval during which the electronic device receives two adjacent first data packets.
In one possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: if the time difference is greater than the preset scheduling time length, switching to service transmission of the second communication network, and receiving a second data packet through the second communication network.
In another possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: after switching to the traffic transmission of the second communication network, after receiving a second data packet via the second communication network, switching to the traffic transmission of the first communication network.
In another possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: counting the packet receiving interval of a first data packet received through a first communication network within a second preset time length; judging whether the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold value or not; if the difference of the counted packet receiving intervals in the second preset time length is smaller than a preset difference threshold value, acquiring the time difference between the packet receiving time of the last first data packet and the current time.
In another possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: and if the difference of the counted packet receiving intervals in the second preset time length is greater than or equal to a preset difference threshold value, switching to service transmission of the second communication network.
In another possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: after a first application is operated for the first time and a first data packet is transmitted through a first communication network, counting the packet receiving interval of the first data packet received through the first communication network within a second preset duration; judging whether the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold value or not; if the difference of the counted packet receiving intervals in the second preset time length is smaller than a preset difference threshold value, marking a first mark for the first application; and if the first application marks the first identifier, acquiring the time difference between the packet receiving time of the last first data packet and the current time.
In another possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: if the difference of the counted packet receiving intervals in the second preset time length is greater than or equal to a preset difference threshold value, marking a second mark for the first application; and switching to the service transmission of the second communication network if the first application marks the second identifier under the condition that the service transmission of the second communication network is detected after the first data packet is transmitted through the first communication network.
In another possible implementation manner of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform: and setting a preset scheduling time length according to the counted packet receiving interval in the second preset time length.
In another possible implementation manner of the second aspect, the first communication network is a WiFi network, and the second communication network is a bluetooth network.
In a third aspect, the application provides a computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of the first aspect and any one of its possible implementations.
In a fourth aspect, the present application provides a computer program product comprising program instructions which, when run on a computer, enable the computer to perform the method of the first aspect and any one of its possible implementations.
In a fifth aspect, the present application provides a chip system, which is applied to an electronic device. The system-on-chip includes an interface circuit and a processor. The interface circuit and the processor are interconnected by a wire. The interface circuit is for receiving signals from the memory and transmitting signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method of the first aspect and any possible implementation manner thereof.
Drawings
Fig. 1 is a diagram illustrating a scenario where WiFi and bluetooth coexist according to an embodiment of the present application;
fig. 2 is a schematic diagram of a first example of data transmission through a WiFi network according to an embodiment of the present application;
fig. 3 is a block diagram of a hardware structure of an example of an electronic device according to an embodiment of the present application;
fig. 4 is a flowchart of an example of a data transmission method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a second example of data transmission through a WiFi network according to an embodiment of the present application;
fig. 6 is a schematic diagram of a third example of data transmission through a WiFi network according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a data transmission method which can reduce the mutual influence among data transmitted through different communication networks under the condition that different communication modes sharing the same frequency band coexist. In order to facilitate understanding of the solution provided by the embodiments of the present application, relevant matters will be first described herein.
As described in the background section above, the electronic device may be configured with a plurality of communication modes of a communication network, one corresponding to each path of data. If the electronic device performs data transmission by using two communication modes sharing the same frequency band at the same time, because the same frequency band can only transmit one path of data at the same time, interference can be generated between data transmitted by different communication networks. In order to reduce interference between data transmitted by different communication networks, the electronic device can time-division multiplex the data transmitted by different communication networks, and respectively transmit the data in different communication modes in different time periods on the same frequency band, so as to reduce the mutual influence of multiple paths of data in the transmission process.
By way of example, two communication modes sharing the same frequency band may include: wiFi communication, zigbee communication, and bluetooth communication. Taking the two communication modes sharing the same frequency band as an example, the WiFi communication and the bluetooth communication are both operated in the 2.4G frequency band, namely sharing the 2.4G frequency band.
For example, as shown in fig. 1, the electronic device is a mobile phone configured with a WiFi module (may be abbreviated as WiFi) for supporting WiFi communication and a bluetooth module (may be abbreviated as bluetooth) for supporting bluetooth communication.
In some usage scenarios, there may be situations where the user operates the handset while using both the WiFi network and the bluetooth network. For example, a user operates a mobile phone to transmit data (e.g., pictures or documents, etc.) to other electronic devices using a bluetooth network while operating the mobile phone to run a video application in the mobile phone using a WiFi network. For another example, a user operates a cell phone to play a game using a WiFi network and listens to the audio of the game through a bluetooth device (e.g., a bluetooth headset or bluetooth speaker). At this time, the handset time-multiplexes WiFi and bluetooth.
Taking a mobile phone running a game application through a WiFi network as an example. In the process of multiplexing WiFi and Bluetooth by the mobile phone, the phenomenon that the WiFi and the Bluetooth occupy time slots may occur. In general, wiFi services are more, and the situation that a mobile phone uses WiFi to transmit data is more common, where in the process that the mobile phone uses a WiFi network to transmit data, bluetooth takes a time slot of data transmission as an example.
In the case where the mobile phone uses WiFi to normally transmit data, as shown in a in fig. 2 a, the mobile phone is used as a client for WiFi data transmission, and receives, through a WiFi network, a data packet (indicated by an arrow pointing to the client from the server) sent by a server (such as a server). Accordingly, the handset may also send data packets (represented as arrows pointing to the server from the client) to the server via the WiFi network.
In the process of transmitting data by using WiFi by the mobile phone, when there is a bluetooth service, as shown in fig. 2B, after the client sends a data packet (indicated by an arrow pointing to the server from the client) to the server, bluetooth occupies a time slot. In this case, the client needs to wait for the bluetooth release slot and then receive the data packet through the WiFi network. It can be seen that the solid arrow representing the client receiving the data packet transmitted by the server follows the dashed arrow (representing one data packet received by the client via WiFi in case of a bluetooth unoccupied slot). That is, the client may delay receiving the data packet of the video application sent by the server. After waiting for the Bluetooth to release the time slot, the client receives the data packet of the game application sent by the server and resumes normal transmission. This may lead to slow transmission rate of WiFi, causing a phenomenon of game jamming, and degrading user experience.
It will be appreciated that the actual data transmission process is complex, and fig. 2 is merely illustrative of two behaviors of receiving and transmitting WiFi data, and does not limit the transmission process of WiFi data.
The following describes, in table 1, the process of the bluetooth preemption slot affecting WiFi data transmission in the above example, resulting in the mobile phone delaying receiving the data packet transmitted through the WiFi network. In an example, a cell phone may connect to a WiFi network through a wireless access point (e.g., router, hotspot, etc.). Table 1 shows a record of the transmission of data packets by the handset over the WiFi network. Each record (corresponding to a row in the table) includes the transmission time of the data packet, the transmission protocol, the time interval of the record, the sequence number, the data packet information, and the station status indication information.
Table 1 record of the transmit-receive packets for data transmission in a cell phone
Transmission time Transmission protocol Sequence number Site status indication information
22:04:07.982110 UDP 1400 STAwill stay up
22:04:07.989779 802.11 2409 STA will go to sleep
22:04:08.038390 802.11 2410 STA will stay up
22:04:08.038736 UDP 1401 STA will stay up
22:04:08.062006 802.11 2411 STA will go to sleep
22:04:08.110364 802.11 2412 STA will stay up
22:04:08.110595 UDP 1402 STA will stay up
The transmission time in the table is the time when the handset receives a data packet or transmits a data packet. The sequence numbers are indication marks of the data packets, the same data packet has the same sequence number, and the sequence numbers of different data packets are different.
Among the records in the table, the records having the same sequence number correspond to the same data packet. The data packets received by the handset via the WiFi network may be data packets with sequence numbers 1400, 1401, and 1402 (i.e., data packet 1400, data packet 1401, and data packet 1402). The time interval between the handset receiving the data packet 1400 and the data packet 1401 is around 56 milliseconds. The handset does not wait during the reception of the data packet 1400 and the time interval between the reception of the data packet 1401 and the reception of the data packet 1400 is approximately equal to one data transmission period of the game application. The time interval between the receipt of the data packet 1401 and the data packet 1402 by the handset is around 71 milliseconds. Before the mobile phone receives the data packet 1402, the bluetooth preempts the time slot of data reception, so that the mobile phone delays receiving the data packet 1402. Since the data packet 1402 has a waiting time after being delivered from the server, the time interval between the data packet 1402 and the data packet 1401 becomes longer, and the receiving time interval is longer than one data transmission period of the game application. The data transmission period may correspond to a packet interval of a data packet.
It can be seen that in the case of bluetooth preemption slots, the handset may delay receiving the data required to run the gaming application, i.e., delay WiFi transmission. For WiFi, data transmitted through WiFi is generally data with high real-time requirements (such as real-time data of a network, data required by application running, etc.), and the transmission rate of WiFi is slow, which can seriously affect user experience, so that user experience is poor.
The above-mentioned transmission protocol is a protocol followed by a mobile phone to transmit a data packet. The transport protocols in the table include user datagram protocol (User Datagram Protocol, UDP) and 802.11.
The Station status indication information is used for indicating the working status of a Station (STA) (such as a mobile phone). The mobile phone can carry the working state of the station in the data packet sent to the wireless access point (such as the router) to inform the wireless access point whether to send the data packet to the station. And under the condition that the station state indication information is that the station is about to enter an awake state (STA well standby up), the station state indication information indicates that WiFi of the mobile phone occupies a time slot of data transmission, and the mobile phone has the capability of receiving the data packet. In this case, the wireless access point may send the data packet to the handset via the WiFi network. The station status indication information is that the station is about to enter a sleep state (STA will go to sleep), and the time slot or time slot in which the WiFi of the handset is about to release data transmission is preempted by other communication networks. The handset does not have the capability to receive data packets. In this case, the wireless access point may stop sending packets to the handset. If the wireless access point has a data packet to be transmitted, but the site state indication information is about to enter a sleep state, the wireless access point delays transmitting the data packet to the mobile phone. After waiting for the station indication information to become about to enter the wake-up state, the wireless access point sends the data packet to the mobile phone.
In some implementations, the record of the data packet may include, in addition to the items of information listed in the table above, one or more of a record number of each record, a time interval of two adjacent records, a sender network protocol (Internet Protocol, IP) address and/or a media access control (Media Access Control, MAC) address of the data packet, a receiver IP address and/or a MAC address, and data packet information.
The IP address of the transmitting end is the IP address of the transmitting end that transmits the data packet. The receiving end IP address is the IP address of the receiving end that receives the data packet. If the mobile phone sends a data packet, the mobile phone is the sending end of the data packet. If the mobile phone receives a data packet, the mobile phone is the receiving end of the data packet.
The packet information may be used to describe information about the packet. For example, the packet transmission may include information about a source port number, a destination port number, a packet length, a sequence number of the packet, and the like.
In view of the above-mentioned problem of data transmission in the coexistence state (i.e. the electronic device uses the communication networks of the two communication modes sharing the same frequency band for data transmission at the same time), the embodiment of the present application provides a data transmission method. The method may be applied in electronic devices configured as different communication networks. The different communication networks include a first communication network and a second communication network. The first communication network and the second communication network share the target frequency band transmission data. The first communication network and the second communication network are different. For example, the first communication network may be a WiFi network and the second communication network may be a bluetooth network.
The electronic device may count the packet interval of the data packets received through the first communication network (e.g., wiFi network) after starting data transmission of the first communication network. The packet receiving interval refers to a receiving time interval of two adjacent data packets. If the packet receiving interval of the data packet received by the first communication network is regular within a period of time, if the packet receiving interval is relatively fixed, the electronic device can determine whether to switch to the service transmission of the second communication network or continue the service transmission of the first communication network according to the time difference between the packet receiving time of the last data packet received by the electronic device and the current time after detecting the service of the second communication network (such as a bluetooth network), so as to reduce the influence of the preemptive time slot resource of the second communication network on the service transmission of the first communication network.
Specifically, if the time difference is greater than the preset scheduling duration, it indicates that the electronic device may receive a data packet of the first communication network again in a short time, and the duration is very short, which may be insufficient to complete the service transmission of the second communication network before the next data packet arrives from the current moment to the first communication network. In this case, if the traffic transmission to the second communication network is switched, the influence on the normal transmission of the traffic of the first communication network is large. In this case, therefore, the electronic device may continue the traffic transmission of the first communication network, and switch to the traffic transmission of the second communication network after receiving the next data packet of the first communication network.
If the time difference is smaller than or equal to the preset scheduling duration, the electronic device is less likely to receive a data packet of the first communication network again in a short time, and the electronic device can immediately receive the data packet from the second communication network.
In this way, in the case where a plurality of communication modes sharing the same frequency band operate simultaneously, the data packets of the second communication network can be transmitted at the packet reception interval between the adjacent two data packets received through the first communication network by scheduling the slot resources. Therefore, the situation that the transmission delay of the first communication network is caused by the fact that the second communication network occupies the time slot resources can be reduced, the delay of the data transmission of the first communication network is reduced, the requirement of users on the real-time performance of the data transmission of the first communication network is met, and user experience is improved.
The preset scheduling duration may be used to measure a time difference between a packet receiving time of a last data packet of the first communication network and a current time. The preset scheduling time length is smaller than a packet receiving interval of a data packet received through the first communication network data. The preset scheduling time length can be set according to actual application scenes or requirements. For example, the packet receiving interval of the data packet of the first communication network is 60 ms, and the preset duration may be set to 20 ms, 30 ms, or the like.
It is understood that a slot is the smallest unit of time in a data transmission. In the process of time division multiplexing different communication modes, the electronic equipment can only transmit the data of the communication network in one communication mode in the same time slot. Time slots for data transmission can be preempted between different communication modes.
A data packet is a basic unit in data transmission. Data transmitted by an electronic device may be divided into a plurality of data packets. The electronic device transmits one data packet at a time. For example, when an electronic device transmits a file, the file may be split into multiple data packets for transmission.
The data transmission includes data reception and data transmission. For data transmission, data transmission of an electronic device is generally related to user operation of a user, so that data transmission of the electronic device is rarely regular. For data reception, the data reception of the electronic device is related to the transmitting end of the data. The sending end of some data sends data regularly, and a data packet can be sent to the electronic equipment at regular intervals, so that the electronic equipment also has regularity in receiving the data. Therefore, the embodiment of the application optimizes the process of receiving the data packet by the electronic equipment in the scene of more regular data reception. The electronic equipment adjusts the duty ratio of different communication networks based on the receiving condition of the data packet, so that the influence among the data transmitted by the different communication networks under the coexistence condition of the different communication networks is minimized.
In the embodiment of the application, the first communication network and the second communication network may be communication networks corresponding to two communication modes for transmitting data in a shared target frequency band in multiple communication modes configured by the electronic device. In the case where the first communication network and the second communication network transmit data simultaneously, the electronic device may time-division multiplex the first communication network and the second communication network. In one example, wiFi networks, bluetooth networks, and zigbee all use the 2.4G frequency band to transmit data. The first communication network may be one of a WiFi network, a bluetooth network, and a zigbee, and the second communication network may be the other of a WiFi network, a bluetooth network, and a zigbee. For example, the first communication network is a WiFi network and the second communication network is a bluetooth network. The electronic device may time-division multiplex the WiFi network and the bluetooth network to transmit data over both the WiFi network and the bluetooth network. As another example, the first communication network is a WiFi network and the second communication network is Zigbee (Zigbee). The electronic device may time-division multiplex the WiFi network and the zigbee to transmit data over the WiFi network and the zigbee simultaneously.
By way of example, the electronic device described in embodiments of the present application may be a cell phone, tablet, desktop, laptop, handheld, notebook, ultra-mobile personal computer (UMPC), netbook, cell phone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) \virtual reality (VR) device, media player, wearable device, etc. The embodiment of the application does not limit the specific form of the electronic equipment.
In the embodiment of the present application, taking the mobile phone 100 as an example, the hardware structure of the electronic device is introduced through the mobile phone 100. As shown in fig. 3, the mobile phone 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc.
The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), a driver processor, and the like. Wherein the different processing units may be separate devices or may be integrated in one or more processors. The processor 110 may be a neural and command center of the cell phone 100. The processor 110 may generate operation control signals according to the instruction operation code and the timing signals to complete instruction fetching and instruction execution control.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may include a storage program area and a storage data area by executing instructions stored in the internal memory 121.
The storage program area may store, among other things, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, a configuration file of the motor 191, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the handset 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 140 may also supply power to the mobile phone 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. In some embodiments, the power management module 141 and the charge management module 140 may also be provided in the same device.
The wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like. In some embodiments, the antenna 1 and the mobile communication module 150 of the handset 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the handset 100 can communicate with a network and other devices through wireless communication technology.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth network (BT), zigBee (ZigBee), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the mobile phone 100.
The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. For example, the first communication network is a WiFi network, and the second communication network is a bluetooth network. The wireless communication module 160 may include a WiFi module for supporting a WiFi network and a bluetooth module for supporting a bluetooth network. The handset 100 may communicate data and/or signaling over different communication networks via the wireless communication module 160.
The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
The handset 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The sensor module 180 may include sensors such as a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a hall sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. The cell phone 100 may collect various data through the sensor module 180.
The mobile phone 100 implements display functions through a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), miniLED, microLED, micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
The mobile phone 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display 194, an application processor, and the like. The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or video. In some embodiments, the cell phone 100 may include 1 or more cameras 193.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the handset 100. The handset 100 may support 1 or more SIM card interfaces. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device. In other embodiments, the electronic device may also include more or fewer modules than provided in the foregoing embodiments, and different interfaces or a combination of multiple interfaces may be used between the modules in the foregoing embodiments. The hardware structure of the electronic device provided in the embodiment of the present application may also refer to the hardware structure of the mobile phone 100 as shown in the figure. The methods in the following embodiments may be implemented in an electronic device having the above-described hardware configuration.
For convenience of description, a data packet transmitted in a first communication network will be hereinafter referred to as a first data packet, and a data packet transmitted in a second communication network will be hereinafter referred to as a second data packet. In the following, the method provided by the embodiment of the application is described by taking the example that the electronic device is a mobile phone, the first communication network is a WiFi network, and the second communication network is a bluetooth network. The target frequency band shared by the WiFi network and the bluetooth network is the 2.4G frequency band. Both WiFi and bluetooth networks transmit data over the 2.4G frequency band. The handset may time-division multiplex the WiFi network and the bluetooth network to transmit WiFi data and bluetooth data simultaneously. As shown in fig. 4, the method provided by the embodiment of the application includes the following steps:
S401, the mobile phone runs a first application, and a first data packet of the first application is transmitted through a WiFi network.
The first data packet is a data packet received over a WiFi network for running a first application. The first application is an application software installed in the electronic device. For example, the first application is application software such as a game application, a video application, and the like. Since application software is typically user-oriented for interaction with a user, there is a high real-time demand for the rate of data transmission in terms of transmitting the first data packets required to run the first application.
The mobile phone runs a first application, and transmits a first data packet of the first application with a server side (such as an application server of the first application) of the first application on a target frequency band of 2.4 GHz. For example, the mobile phone receives a user operation that a user clicks on a first application. And responding to the user operation, and running the first application by the mobile phone. In the process of running the first application, the mobile phone is used as a client of the first application, and can send the first data packet to a server of the first application through the WiFi network or receive the first data packet transmitted by a server of the first application through the WiFi network.
S402, after the mobile phone starts to transmit the first data packet through the WiFi network, counting the packet receiving interval of the mobile phone for receiving the first data packet through the WiFi network. The packet receiving interval refers to a time interval when the mobile phone receives two adjacent first data packets.
In the process of transmitting the first data packet through the WiFi network, the mobile phone can count the packet receiving interval of receiving the first data packet through the WiFi network within a period of time. Taking the example that the mobile phone receives 4 first data packets through the WiFi network within a period of time, the 4 first data packets are data packet 1, data packet 2, data packet 3 and data packet 4 in sequence. The packet receiving time of the 4 first data packets is t1, t2, t3 and t4 respectively. The first data packet receiving interval counted by the mobile phone in the second preset time length is t2-t1, t3-t2 and t4-t3 respectively.
S403, the mobile phone judges whether the counted packet receiving interval in the second preset time length is in a preset period rule.
The counted packet receiving intervals in the second preset time length are in a preset period rule, and specifically means that: the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold value. That is, the mobile phone executes S403, and may determine whether the difference between the counted packet receiving intervals within the second preset time period is less than a preset difference threshold.
For example, taking the second preset time period as 1 second, the preset difference threshold is 5 milliseconds as an example. The packet receiving intervals of the 4 first data packets received by the mobile phone through the WiFi network within 1 second are t2-t1, t3-t2 and t4-t3 respectively. The mobile phone can calculate the difference between any two packet receiving intervals of t2-t1, t3-t2 and t4-t3, such as the difference between t2-t1 and t3-t2, the difference between t2-t1 and t4-t3 and the difference between t3-t2 and t4-t3. Further, the mobile phone judges whether the difference value of the packet receiving intervals of any two of t2-t1, t3-t2 and t4-t3 is within 5 milliseconds. If the difference value of the packet receiving intervals of any two of t2-t1, t3-t2 and t4-t3 is within 5 milliseconds, the packet receiving intervals of the 4 first data packets are approximately the same, and the data packets have regularity and are in a preset period rule. If the difference between the packet receiving intervals of any two of t2-t1, t3-t2 and t4-t3 is greater than or equal to 5 milliseconds, it can be considered that the packet receiving intervals of the 4 first data packets have certain difference, are not regular, and are not in a preset periodic rule.
Here, the second preset duration and the preset difference threshold may be set according to an actual application scenario or a requirement. For example, the second preset duration may be set to a value of 1 second, 2 seconds, or the like. The preset variance threshold may be set to a value of 5 milliseconds, 10 milliseconds, etc.
In some implementations, bluetooth in the handset may be in an off state for a second predetermined period of time. In this case, the first data packet received by the mobile phone through the WiFi network within the second preset time period is not affected by the bluetooth data transmission. The counted packet receiving interval of the mobile phone in the second preset time length is accurate, and the accuracy of judging whether the packet receiving interval of the first data packet has a preset periodic rule or not by the mobile phone can be improved.
In other implementations, bluetooth in the mobile phone may be in an operating state for a second predetermined period of time. The first data packet received by the mobile phone through the WiFi network in the second preset duration may be affected by bluetooth data transmission, so that the packet receiving time of the first data packet is delayed, and the packet receiving interval acquired by the mobile phone may be larger. In this case, the mobile phone may acquire the delay duration of the first data packet, subtract the delay duration of the first data packet from the calculated packet receiving interval, and determine whether the packet receiving interval of the first data packet has a preset periodic rule after obtaining the packet receiving interval with the delay eliminated. Therefore, the accuracy of judging whether the packet receiving interval of the first data packet has the preset periodic rule or not by the mobile phone can be improved.
After S403, if the counted packet receiving interval within the second preset duration is a preset periodic rule, which indicates that the packet receiving interval of the first data packet has a rough rule, after the mobile phone receives one first data packet through the WiFi network, it is highly likely that the next first data packet is received around one packet receiving interval of the first data packet. In this case, the handset may perform S404. If the counted packet receiving interval in the second preset time period does not accord with the preset cycle rule, the mobile phone can execute S407.
S404, if the mobile phone detects the Bluetooth service after receiving one first data packet, the mobile phone calculates the time difference between the packet receiving time of the one first data packet and the current time.
The mobile phone detects the Bluetooth service. For example, the handset may detect bluetooth traffic in real time in the event bluetooth is initiated. Bluetooth services may refer to data transmission over a bluetooth network. The detected bluetooth traffic described in S404 may refer to the mobile phone detecting a second data packet waiting to be received through the bluetooth network.
In some implementations, the mobile phone can determine whether bluetooth service exists through the working state identifier of bluetooth. For example, in the case that the working state identifier of bluetooth is the first state identifier, the mobile phone confirms that bluetooth service exists.
It can be immediately that the mobile phone is configured with a WiFi module for realizing WiFi network communication and a bluetooth module for realizing bluetooth network communication. The WiFi module and the Bluetooth module can indicate the data transmission condition through the respective working state identifiers, such as the existence of data transmission or the absence of data transmission. The WiFi module and the Bluetooth module can communicate with each other, and the data transmission condition of the other party can be obtained through the working state identification of the other party. For convenience of distinction, the operation state identifier of the wifi i module is referred to herein as a first operation state identifier, and the operation state identifier of the bluetooth module is referred to herein as a second operation state identifier.
For example, in the case where the first operation state identifier is a first state identifier (e.g., "01"), it indicates that the WiFi i module is in an operation state, and the mobile phone has a first data packet waiting to be received through the WiFi network or a first data packet being received through the WiFi network. And under the condition that the first working state identifier is a second state identifier (such as '00'), the WiFi module is in an idle state, and the mobile phone temporarily does not have the first data packet received through the WiFi network. Accordingly, in the case that the second operation state identifier is the third state identifier (e.g. "11"), it indicates that the bluetooth module is in an operation state, and the mobile phone has a second data packet waiting to be received through the bluetooth network or a second data packet being received through the bluetooth network. In the case where the second operating state identifier is a fourth state identifier (e.g., "10"), it indicates that the bluetooth module is in an idle state, and the mobile phone temporarily does not have the second data packet received through the bluetooth network.
If the mobile phone detects the Bluetooth service after receiving a first data packet, the mobile phone can acquire the time difference between the current moment and the packet receiving time of the first data packet. For example, the mobile phone may obtain the packet receiving time of the first data packet in the packet receiving and sending record of the data transmission. Further, the mobile phone calculates the time difference between the packet receiving time of the first data packet and the current time.
S405, the mobile phone judges whether the time difference is larger than a preset scheduling duration.
After obtaining the time difference between the latest received first data packet and the current time, the mobile phone can compare the time difference between the first data packet receiving time and the current time with the preset scheduling time length and judge whether the time difference between the first data packet receiving time and the current time is greater than the preset scheduling time length.
The above mentions that the preset scheduling duration is smaller than the packet receiving interval of the first data packet. In some implementations, in order to schedule the timeslot resources more flexibly and better adapt to multiple data transmission scenarios, the mobile phone may further set a preset scheduling duration according to a packet receiving interval of the first data packet.
For example, when the mobile phone confirms that the counted packet receiving interval in the second preset time period is a preset period rule, the average value of the counted packet receiving intervals in the first preset time period can be calculated to obtain the average packet receiving interval of the first data packet. Further, the mobile phone may set the preset scheduling period to be a product of the average packet receiving interval and a coefficient, where the coefficient is less than 1. Assuming that the average packet receiving interval of the first data packet is 60 ms and the coefficient is 0.6, the mobile phone sets the preset scheduling duration corresponding to the first application to be equal to 36 ms. Or, the mobile phone may set the preset scheduling duration as a difference between the average packet receiving interval of the first data packet and a fixed duration. Assuming that the packet receiving interval of the first data packet is 60 ms and the fixed duration is 20 ms, the preset scheduling duration is equal to 40 ms.
In other implementations, the mobile phone may further set a preset scheduling duration according to a packet receiving interval of the first data packet and an occupied duration of a time slot occupied by the bluetooth service. For example, the preset scheduling duration may be set to be smaller than a difference between an average packet receiving interval of the first data packet and an occupied duration of the bluetooth service occupied slot. Assuming that the time slot occupied by the mobile phone transmitting the bluetooth service once occupies 30 milliseconds, the packet receiving interval of the mobile phone receiving the first data packet is 60 milliseconds. The preset schedule period may be set to 20 milliseconds. In this way, the handset can transmit bluetooth traffic during the idle period between receiving consecutive first data packets.
By setting the preset scheduling time length according to the packet receiving interval of the first data packet, the mobile phone can set the corresponding preset scheduling time length according to different data transmission scenes, so that the duty ratio of WiFi and Bluetooth can be adjusted more flexibly, and the embodiment of the application is suitable for more data transmission scenes.
After S405, if the time difference is greater than the preset scheduling duration, the difference between the current time and the time of receiving the last first data packet from the mobile phone is larger, and the possibility that the mobile phone receives a first data packet again in a short time is small. The period of time from the current time to the time before the arrival of the next first data packet may not be sufficient to complete the bluetooth service transmission. In this case, the handset may perform S406. If the time difference is smaller than or equal to the preset scheduling duration, the difference between the current time and the packet receiving time of the last first data packet received by the mobile phone is smaller, the mobile phone may just receive the first data packet, and the possibility that the mobile phone receives the first data packet again in a short time is smaller. The period from the current time to the time before the arrival of the next first data packet is enough to complete the bluetooth service transmission. In this case, the handset may perform S407.
S406, the mobile phone continues to transmit the first data packet through the WiFi network, and switches to Bluetooth service transmission after receiving the next first data packet or when the delay receiving duration of the Bluetooth service reaches a first preset duration.
If the time difference is greater than the preset scheduling duration, the mobile phone is very likely to receive the next first data packet. In this case, the WiFi module of the mobile phone continues to occupy the time slot and delays the bluetooth service transmission to wait for receiving the next first data packet through the WiFi network. After the mobile phone receives the next first data packet through the WiFi network, the mobile phone can be immediately switched to Bluetooth service transmission.
The switching to bluetooth service transmission can be understood as: the mobile phone receives a second data packet transmitted through the Bluetooth network. Specifically, after the mobile phone receives the next first data packet through the WiFi network, the mobile phone may release the timeslot occupied by the WiFi module, and allocate the timeslot to the bluetooth module. And under the condition that Bluetooth occupies a time slot, the mobile phone receives a second data packet through the Bluetooth network.
For example, as shown in fig. 5, in the process of receiving the first data packet through the WiFi network, the mobile phone is used as a client of WiFi data transmission, and after receiving the data packet 5 (i.e. a first data packet) transmitted through the WiFi network at time t5, bluetooth service is detected. The time difference t6-t5 between the current time t6 and the time t5 is greater than the preset scheduling duration, and the client is likely to be about to receive the next first data packet. In this case, the mobile phone can delay transmitting the bluetooth service, so that the bluetooth service waits. The client receives packet 6 (i.e., the next first packet) at time t 7. After the client finishes receiving the data packet 6, i.e. after t7, the handset switches the time slot of the received data to bluetooth service, and receives the second data packet transmitted through the bluetooth network.
In this way, in the case that the WiFi service and the bluetooth service coexist, the mobile phone can delay receiving the bluetooth service when receiving one first data packet transmitted by the WiFi network, and receive the next upcoming first data packet preferentially through the WiFi network. Therefore, the influence of Bluetooth preemption time slots on WiFi data transmission can be reduced, the real-time requirement of users on WiFi data transmission is met, and the user experience is improved.
In some cases, such as for example, wiFi network fluctuations, the handset may not receive the next first data packet transmitted by the WiFi network within a short time. In order to reduce the delay receiving duration of the bluetooth service, the mobile phone may also switch to bluetooth service transmission when the delay receiving duration of the bluetooth service reaches a first preset duration. It can be understood that the mobile phone switches to bluetooth service transmission after a first preset duration from the current moment of detecting the bluetooth service amount. The first preset duration may be the longest delay receiving duration of the bluetooth service, and may be set according to an actual application scenario or a requirement. For example, the first preset time period may be set to a value of 10 ms or 20 ms or the like.
In some implementations, the mobile phone may start a timer implemented by a software program when the bluetooth service is detected, and time the delayed reception duration of the bluetooth service by the timer. The delay receiving duration may be a time when the mobile phone detects that the bluetooth service starts to delay receiving the bluetooth service. If the delay receiving duration of the bluetooth service reaches the first preset duration, the mobile phone does not receive the next first data packet transmitted by the WiFi network yet under the condition that the delay transmitting time of the bluetooth service is long. At this time, a timer in the mobile phone triggers the mobile phone to switch the time slot of receiving data to bluetooth service, and receives the second data packet transmitted through the bluetooth network. For example, the timer may send a notification to a WiFi module in the handset. After the WiFi module of the mobile phone receives the notification sent by the timer, the WiFi module can change the first working state identifier from the first state identifier to the second state identifier, and indicates that the working state of the WiFi module is changed into an idle state. And under the condition that the WiFi module is in an idle state, the mobile phone is switched to Bluetooth service, and a second data packet transmitted through the Bluetooth network is received on a time slot.
After S406, the handset may perform S408.
S407, the mobile phone immediately switches to Bluetooth service transmission.
After S405, if the time difference between the time of receiving the last first data packet and the current time is less than or equal to the preset scheduling duration, which indicates that the mobile phone is less likely to receive the next first data packet, the mobile phone may switch to bluetooth service transmission immediately without waiting.
Therefore, the mobile phone can receive the second data packet in the time interval of receiving the continuous two first data packets, so that the receiving delay between the Bluetooth data and the WiFi data can be reduced, and the user experience is improved.
For example, as shown in fig. 6, in the process of receiving the first data packet through the WiFi network, the mobile phone is used as a client of WiFi data transmission, and after receiving the data packet 8 (i.e. a first data packet) transmitted through the WiFi network at time t8, bluetooth service is detected. The time difference t9-t8 between the current time t9 and the time t8 is smaller than the preset scheduling duration. At this time, the client is less likely to be about to receive the next first data packet. In this case, the handset immediately switches to bluetooth service and receives the second data packet transmitted through the bluetooth network in a slot.
After S407, the handset may perform S408.
And S408, after receiving a second data packet through the Bluetooth network, the mobile phone switches to WiFi service transmission.
After receiving the second data packet transmitted through the bluetooth network, the mobile phone can immediately release the time slot occupied by bluetooth. If the WiFi service is not finished transmitting, the mobile phone allocates a time slot for WiFi, and continues to receive the second data packet transmitted by the WiFi network in the time slot. I.e. the handset continues to perform WiFi service transmission. For example, as shown in fig. 5 or fig. 6, after the mobile phone switches to the bluetooth service for a period of time, the mobile phone completes the bluetooth service transmission, releases the time slot occupied by bluetooth, and continues to perform WiFi service transmission.
The time spent by the mobile phone for receiving a second data packet through the bluetooth network is generally smaller than the packet receiving interval of the mobile phone for receiving the first data packet, i.e. the occupied time of the bluetooth time slot is smaller than the packet receiving interval of the first data packet. After receiving a second data packet, the mobile phone is likely to not reach the packet receiving time of the next first data packet. The mobile phone immediately switches the WiFi service after receiving a second data packet transmitted by the Bluetooth network, and has little influence on the WiFi service.
After S408, the handset may continue to execute S404.
It can be appreciated that the time taken for the mobile phone to receive a first data packet via the WiFi network is short, i.e. the time taken to receive a first data packet occupies a time slot for a short time, which is negligible. After receiving a first data packet through the WiFi network, the mobile phone may receive a next first data packet after a packet receiving interval of the first data packet. The WiFi module is in an idle state during the period from the time when one first data packet is received to the time when the next first data packet is received.
In some implementations, the duration taken by the handset to receive a second data packet is less than the packet interval of the first data packet. In this way, the mobile phone can receive the second data packet transmitted through the bluetooth network in the period of time when the WiFi module is in the idle state. This minimizes interactions between bluetooth and WiFi services.
Take the example that the first application is a gaming application. The duration taken by the handset to receive a second data packet over the bluetooth network is denoted x1. The packet interval for the handset to receive the first data packet of the gaming application is denoted as x2. x2 is greater than x1. If the mobile phone has bluetooth service while running game application, the mobile phone can insert the second data packet transmitted through the bluetooth network, and receive the second data packet transmitted through the bluetooth network within the packet receiving interval of the first data packet (the time of the mobile phone receiving the first data packet is short and negligible). Because the time spent by the mobile phone to receive a second data packet is about x1, the time spent by the mobile phone to receive the second data packet is smaller than the packet receiving interval x2 of the first data packet. Therefore, the Bluetooth service is transmitted in the idle time period about x2 between the adjacent two first data packets received by the WiFi module, so that the requirement of the Bluetooth service on the time slot can be met. After receiving a second data packet of the bluetooth service (about x1 later), the mobile phone does not reach the time of receiving the next first data packet, and at this time, the mobile phone immediately switches the WiFi service and does not influence the receiving of the next first data packet. Therefore, the influence between the Bluetooth service and the WiFi service can be reduced as much as possible, and the utilization rate of the time slot is improved.
In some embodiments, after the mobile phone starts to transmit the first data packet of the first application through the WiFi network after running the first application each time, S402-S403 may be executed to determine whether the counted packet receiving interval within the second preset duration is a preset periodic rule.
In other embodiments, the mobile phone only needs to execute S402-S403 when the first application is executed for the first time, and determines whether the counted packet receiving interval in the second preset duration is a preset periodic rule. In this embodiment, if the counted packet receiving interval within the second preset time period is a preset period rule, the mobile phone may mark the first identifier for the first application. If the counted packet receiving interval in the second preset time period does not accord with the preset period rule, the mobile phone can mark the second mark for the first application.
In this embodiment, the mobile phone does not need to execute S402-S403 each time the first application is executed, but determines, according to the first identifier or the second identifier of the first application, whether the packet interval of the first application through the WiFi network is a preset periodic rule. That is, after the mobile phone runs the first application, it may be determined whether the first application marks the first identifier or the second identifier. If the first application marks the first identifier, it indicates that the packet receiving interval of the first application through the WiFi network is a preset periodic rule, and the mobile phone may execute S404. If the first application marks the second identifier, it indicates that the packet receiving interval of the first application for transmitting the first data packet through the WiFi network does not conform to the preset period rule, and the mobile phone may execute S407 when the bluetooth service is detected after receiving one first data packet.
Here, the first identifier is different from the second identifier. The first identifier indicates that the packet receiving interval of the currently applied data packet is in a preset periodic rule. The second identifier indicates that the packet receiving interval of the currently applied data packet is not in a preset periodic rule. The first identifier and the second identifier can be set according to actual application scenes or requirements. For example, the first flag may be set to "1" and the second flag may be set to "0". The mobile phone can apply the scheme provided by the embodiment of the application at the beginning of running the first application. Therefore, the mobile phone can adjust the duty ratio of the WiFi service and the Bluetooth service as early as possible, improves the utilization rate of time slot resources of data transmission, and minimizes the interaction of the Bluetooth service transmission and the WiFi service transmission.
In other embodiments, after the mobile phone executes S402-S403 to determine whether the counted packet receiving interval in the second preset duration is a preset period rule, the determination result may be shared with other devices. Thus, when the first application is running, the other device may execute the method flows of S404 to S408 in the embodiment of the present application based on the determination result.
Correspondingly, the mobile phone may also receive the determination result of other devices, and execute the method flows of S404-S408 in the embodiment of the present application based on the determination result.
For example, the server of the first application may send an indication identifier to the mobile phone, where the indication identifier is used to indicate that the first data packet sent by the server is in a preset periodic rule. Or, the server side of the first application may send the packet interval of the first data packet to the mobile phone. After receiving the indication mark or the packet sending interval, the mobile phone can confirm that the packet receiving interval of the first data packet of the first application is in a preset periodic rule. If the mobile phone does not receive the indication mark or the packet sending interval sent by the server side of the first application, the mobile phone can confirm that the packet receiving interval of the first data packet of the first application is not in a preset periodic rule.
In other embodiments, an application list for indicating that the packet receiving interval of the data packet is a preset periodic rule may be pre-stored in the mobile phone. After the mobile phone starts the first application, the mobile phone can search the first application in the pre-stored memory. If the mobile phone searches the first application in the pre-stored application list, the first application shows that the packet receiving interval of the first data packet for transmitting the first application through the WiFi network is in a preset periodic rule. The handset may then execute the method flow of S404-S408. If the mobile phone does not find the first application in the pre-stored application list, which indicates that the packet receiving interval of the first application for transmitting the first data packet through the WiFi network is not a preset period rule, the mobile phone may execute S407.
In this embodiment, in order to reduce the influence of the WiFi network fluctuation or the environment on the packet receiving interval of the first data packet, even if the mobile phone confirms that the packet receiving interval of the first data packet is a preset periodic rule, S402 may be executed, that is, the packet receiving interval of the first data packet received through the WiFi network is counted, so as to obtain a more accurate packet receiving interval of the first data packet.
In the embodiment of the application, under the condition that the WiFi network and the Bluetooth network which share the 2.4G frequency band work simultaneously, the mobile phone can transmit the Bluetooth service at the packet receiving interval of two adjacent first data packets received by the WiFi network by scheduling time slot resources. Therefore, the situation of WiFi network transmission delay caused by the fact that the Bluetooth network occupies a time slot can be reduced, the requirement of users on the real-time performance of data transmission of the first communication network is met, and user experience is improved.
Further embodiments of the present application provide an electronic device comprising: a wireless communication module, a memory, and one or more processors. The wireless communication module, the memory, and the processor are coupled. The wireless communication module is used for supporting the first communication network and the second communication network and transmitting data or signaling of the first communication network and/or the second communication network. The memory has stored therein computer program code comprising computer instructions. The electronic device, when executed by a processor, may perform the functions or steps of the method embodiments described above. Of course, the electronic device may also include other hardware structures such as other antennas for receiving signals. For example, the electronic device further includes a sensor, a display screen, and other hardware structures. The structure of the electronic device may refer to the structure of the mobile phone 100 shown in fig. 3.
The embodiment of the application also provides a chip system which is applied to the electronic equipment. The system-on-chip includes at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., memory). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by the processor, may cause the electronic device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium including computer instructions which, when executed on an electronic device as described above, cause the electronic device to perform the functions or steps of the method embodiments described above.
Embodiments of the present application also provide a computer program product which, when run on a computer, causes the computer to perform the functions or steps of the method embodiments described above.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. The data transmission method is characterized by being applied to electronic equipment, wherein the electronic equipment is provided with the capability of transmitting data through a first communication network and a second communication network, and the first communication network and the second communication network share a target frequency band to transmit data; the electronic device includes a first application; the method comprises the following steps:
running the first application, and transmitting a first data packet of the first application through the first communication network;
acquiring a time difference between a packet receiving time of a last first data packet and a current time when service transmission of the second communication network is detected after the first data packet is transmitted through the first communication network;
if the time difference is greater than the preset scheduling duration, switching to service transmission of the second communication network after the next first data packet is transmitted through the first communication network, or switching to service transmission of the second communication network after the first preset duration from the current moment; the preset scheduling time length is smaller than the packet receiving interval of the first data packet; the packet receiving interval is used for representing a time interval of the electronic device receiving two adjacent first data packets.
2. The method according to claim 1, wherein the method further comprises:
and if the time difference is greater than the preset scheduling duration, switching to service transmission of the second communication network, and receiving a second data packet through the second communication network.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and switching to the service transmission of the first communication network after receiving a second data packet through the second communication network after switching to the service transmission of the second communication network.
4. A method according to any of claims 1-3, characterized in that after said starting of the transmission of said first data packet via said first communication network, before said obtaining the time difference between the time of receipt of the last first data packet and the current time, the method further comprises:
counting the packet receiving interval of a first data packet received through the first communication network within a second preset duration;
judging whether the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold value or not;
the obtaining the time difference between the packet receiving time of the last first data packet and the current time includes:
If the difference of the counted packet receiving intervals in the second preset time period is smaller than the preset difference threshold value, the time difference between the packet receiving time of the last first data packet and the current time is obtained.
5. The method according to claim 4, wherein the method further comprises:
and if the difference of the counted packet receiving intervals in the second preset time length is greater than or equal to the preset difference threshold value, switching to service transmission of the second communication network.
6. The method according to any of claims 1-5, wherein prior to said obtaining a time difference between a time of receipt of a last first data packet and a current time, the method further comprises:
after the first application is operated for the first time and the first data packet is transmitted through the first communication network, counting the packet receiving interval of the first data packet received through the first communication network within a second preset duration;
judging whether the difference of the counted packet receiving intervals in the second preset time period is smaller than a preset difference threshold value or not;
if the difference of the counted packet receiving intervals in the second preset time length is smaller than the preset difference threshold value, marking a first mark for the first application;
The method for obtaining the time difference between the packet receiving time of the last first data packet and the current time comprises the following steps:
and if the first application marks the first identifier, acquiring the time difference between the packet receiving time of the last first data packet and the current time.
7. The method of claim 6, wherein the method further comprises:
if the difference of the counted packet receiving intervals in the second preset time length is greater than or equal to the preset difference threshold value, marking a second mark for the first application;
and switching to the service transmission of the second communication network if the first application marks the second identifier under the condition that the service transmission of the second communication network is detected after the first data packet is transmitted through the first communication network.
8. The method according to any one of claims 4-7, further comprising:
and setting the preset scheduling time length according to the counted packet receiving interval in the second preset time length.
9. The method according to any of claims 1-8, wherein the first communication network is a WiFi network and the second communication network is a bluetooth network.
10. An electronic device, comprising: a memory, a wireless communication module, and a processor; the memory, the wireless communication module, and the processor are coupled; the wireless communication module is used for supporting a first communication network and a second communication network and transmitting data or signaling of the first communication network and/or the second communication network;
wherein the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the method of any of claims 1-9.
11. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-9.
CN202310481730.7A 2023-04-27 Data transmission method, electronic device and storage medium Active CN117135750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310481730.7A CN117135750B (en) 2023-04-27 Data transmission method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310481730.7A CN117135750B (en) 2023-04-27 Data transmission method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN117135750A true CN117135750A (en) 2023-11-28
CN117135750B CN117135750B (en) 2024-07-12

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395328A (en) * 2023-12-06 2024-01-12 吉林大学 Time-frequency scheduling MAC protocol method, device and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090137206A1 (en) * 2007-11-23 2009-05-28 Texas Instruments Incorporated Apparatus for and method of bluetooth and wireless local area network coexistence using a single antenna in a collocated device
US20120257521A1 (en) * 2011-04-11 2012-10-11 Qualcomm, Incorporated Adaptive guard interval for wireless coexistence
CN103430593A (en) * 2011-02-18 2013-12-04 黑莓有限公司 Method and apparatus for avoiding in-device coexistence interference with keeping time update for handover
CN110380755A (en) * 2019-08-30 2019-10-25 四川爱联科技有限公司 A kind of system and its control method of WIFI and Bluetooth coexistence multiplex antenna
US20210212062A1 (en) * 2020-01-02 2021-07-08 Apple Inc. Selective Multi-link Operation in a Wireless Local Area Network
CN114095939A (en) * 2020-08-24 2022-02-25 阿里巴巴集团控股有限公司 Data transmission method and device and readable storage medium
CN115696483A (en) * 2021-07-30 2023-02-03 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090137206A1 (en) * 2007-11-23 2009-05-28 Texas Instruments Incorporated Apparatus for and method of bluetooth and wireless local area network coexistence using a single antenna in a collocated device
CN103430593A (en) * 2011-02-18 2013-12-04 黑莓有限公司 Method and apparatus for avoiding in-device coexistence interference with keeping time update for handover
US20120257521A1 (en) * 2011-04-11 2012-10-11 Qualcomm, Incorporated Adaptive guard interval for wireless coexistence
CN110380755A (en) * 2019-08-30 2019-10-25 四川爱联科技有限公司 A kind of system and its control method of WIFI and Bluetooth coexistence multiplex antenna
US20210212062A1 (en) * 2020-01-02 2021-07-08 Apple Inc. Selective Multi-link Operation in a Wireless Local Area Network
CN114095939A (en) * 2020-08-24 2022-02-25 阿里巴巴集团控股有限公司 Data transmission method and device and readable storage medium
CN115696483A (en) * 2021-07-30 2023-02-03 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘思嘉等: "LTE-U与WiFi在非授权频段的共存方案研究", 重庆邮电大学学报(自然科学版), vol. 29, no. 02, 30 April 2017 (2017-04-30) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395328A (en) * 2023-12-06 2024-01-12 吉林大学 Time-frequency scheduling MAC protocol method, device and equipment
CN117395328B (en) * 2023-12-06 2024-02-27 吉林大学 Time-frequency scheduling MAC protocol method, device and equipment

Similar Documents

Publication Publication Date Title
CN111194057B (en) Resource elimination method and terminal
CN109788559B (en) Bandwidth part BWP switching method of asymmetric spectrum, terminal and network equipment
US11588604B2 (en) Method and apparatus for transmitting information, base station, and user equipment
WO2021098533A1 (en) Connection establishment method, and terminal apparatus
CN111699753A (en) Wake-up signal configuration, wake-up method and device, and storage medium
US11895686B2 (en) Method, device and medium for transmitting information
WO2022063167A1 (en) Information determining method and apparatus, information sending method and apparatus, and device
US20220407637A1 (en) Harq-ack processing method and apparatus, communication device and storage medium
JP2023528613A (en) Wireless communication method and device, terminal and storage medium
EP3836433A1 (en) Monitoring method and apparatus, device, and storage medium
CN116346297A (en) Communication method and device
CN113163487B (en) Resource scheduling method, communication device, network device, and storage medium
CN111050422A (en) Discontinuous reception control method and terminal
US11871449B2 (en) Backoff method and apparatus in transmission process, device, system, and storage medium
US20220361282A1 (en) Method and apparatus for controlling active time, and computer-readable storage medium
CN115118406B (en) Uplink transmission method, device and user equipment
CN113301584B (en) Discontinuous transmission configuration method and user equipment
CN113316954B (en) Indication method, receiving method, device, communication equipment and storage medium
CN111817830B (en) Transmission and reception control method, terminal and network side equipment
CN117135750B (en) Data transmission method, electronic device and storage medium
US20220394811A1 (en) Method and apparatus for determining activation moment of scheduled carrier, and device and medium
CN110351036B (en) Information transmission method, network equipment and terminal
CN117135750A (en) Data transmission method, electronic device and storage medium
CN113228794B (en) Method and device for determining uplink transmission time domain resources, UE (user equipment), network equipment and storage medium
CN113973261B (en) Positioning processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant