Communication method and device, electronic equipment and storage medium
By adjusting the downlink traffic activation time in the WiFi STA and WiFi P2P modes of electronic devices, the downlink traffic activation time is solved, and the service delay and link instability caused by excessive downlink traffic in the concurrent state of single channel are achieved, and a more stable wireless screen projection or interconnection function is achieved.
Patent Information
- Application Number
- CN202311514958.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
AI Technical Summary
When electronic devices are in WiFi STA and WiFi P2P modes, in the concurrent state of the same frequency single channel, excessive downlink traffic will lead to service delay and link instability of wireless screen projection or interconnected services.
By adjusting the duration of the first communication channel and the second communication channel in the downstream traffic activation state, the downstream traffic of the first device is reduced, and excessive downstream traffic is avoided that excessive downstream traffic will cause an impact on wireless screen projection or interconnection services. The specific method includes obtaining the link tolerance of the target service and adjusting the activation time according to the downlink traffic proportion.
It reduces service delay, improves the stability of the service link, and ensures the implementation of wireless screen projection or interconnection functions.
Smart Images

Figure CN120018316A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a communication method, device, electronic device and storage medium. Background Art
[0002] An electronic device can be in WiFi STA (Wireless Fidelity Station) mode and WiFi P2P (Wireless Fidelity Peer to Peer) mode at the same time. When the electronic device is in these two modes, it receives image data through the channel of WiFi STA mode, displays the screen using the received image data, and sends the image data to another connected electronic device through the channel of Wi-Fi P2P mode, so that the other electronic device displays the screen according to the image data, thereby realizing wireless screen projection or interconnection function. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a communication method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a communication method is provided.
[0005] Establishing a first communication connection with a second device and establishing a second communication connection with a third device, wherein a channel used by the first communication connection is a first communication channel and a channel used by the second communication connection is a second communication channel;
[0006] When the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state, adjusting a first activation duration of the first communication channel, and / or adjusting a second activation duration of the second communication channel;
[0007] The first activation duration is the duration during which the first communication channel is in a downlink traffic activation state, and the second activation duration is the duration during which the second communication channel is in a downlink traffic activation state.
[0008] In some embodiments, when the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state, adjusting the first activation duration of the first communication channel, and / or adjusting the second activation duration of the second communication channel, includes:
[0009] When the first communication channel and the second communication channel are in the same-frequency single-channel concurrent state, obtaining a link tolerance corresponding to a target service, the target service being a service currently performed based on the first communication connection, and the link tolerance being used to characterize a maximum downlink flow that does not affect the target service;
[0010] Based on the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted.
[0011] In some embodiments, obtaining the link tolerance corresponding to the target service includes:
[0012] Obtaining a service tag corresponding to the target service;
[0013] The link tolerance corresponding to the service label is queried.
[0014] In some embodiments, adjusting the first activation duration and / or adjusting the second activation duration based on the link tolerance includes:
[0015] Acquire downlink traffic of the first device, where the downlink traffic includes first downlink traffic based on the first communication channel and second downlink traffic based on the second communication channel;
[0016] When the downlink traffic is greater than the maximum downlink traffic represented by the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted.
[0017] In some embodiments, when the downlink traffic is greater than the maximum downlink traffic represented by the link tolerance, adjusting the first activation duration, and / or adjusting the second activation duration, includes:
[0018] When the downlink traffic is greater than the maximum downlink traffic, and the proportion of the first downlink traffic in the downlink traffic is greater than a preset proportion, reducing the first activation duration to obtain a third activation duration; and / or,
[0019] When the downlink traffic is greater than the maximum downlink traffic, and the proportion of the second downlink traffic in the downlink traffic is greater than the preset proportion, the second activation duration is reduced to obtain a fourth activation duration.
[0020] In some embodiments, adjusting the first activation duration and / or adjusting the second activation duration based on the link tolerance includes:
[0021] Obtaining a third activation duration and a fourth activation duration corresponding to the link tolerance;
[0022] The first activation duration is adjusted to the third activation duration, and / or the second activation duration is adjusted to the fourth activation duration.
[0023] In some embodiments, the method further comprises:
[0024] Based on the third activation duration, sending first notification information to the second device at a first time point, and sending second notification information to the second device at a second time point;
[0025] Among them, the first notification information is used to instruct the second device to stop sending data to the first device; the second notification information is used to indicate that the second device is allowed to send data to the second device; the duration between the second time point and the first time point is the inactive duration corresponding to the third activation duration.
[0026] In some embodiments, the method further comprises:
[0027] Based on the fourth activation duration, sending third notification information to the third device at a third time point, and sending fourth notification information to the third device at a fourth time point;
[0028] Among them, the third notification information is used to instruct the third device to stop sending data to the first device; the fourth notification information is used to indicate that the third device is allowed to send data to the first device; the duration between the fourth time point and the third time point is the inactive duration corresponding to the fourth activation duration.
[0029] According to a second aspect of an embodiment of the present disclosure, a communication device is provided.
[0030] a connection establishing module, configured to establish a first communication connection with a second device and a second communication connection with a third device, wherein a channel used by the first communication connection is a first communication channel and a channel used by the second communication connection is a second communication channel;
[0031] an activation duration adjustment module, configured to adjust a first activation duration of the first communication channel and / or adjust a second activation duration of the second communication channel when the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state;
[0032] The first activation duration is the duration during which the first communication channel is in a downlink traffic activation state, and the second activation duration is the duration during which the second communication channel is in a downlink traffic activation state.
[0033] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0034] processor;
[0035] a memory for storing processor-executable instructions;
[0036] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.
[0037] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.
[0038] The above method of the present disclosure has the following beneficial effects:
[0039] In the method provided by the embodiment of the present disclosure, the first device establishes a first communication connection with the second device, and establishes a second communication connection with the third device. The channel used for the first communication connection is the first communication channel, and the channel used for the second communication connection is the second communication channel; when the first communication channel and the second communication channel are in the same-frequency single-channel concurrent state, the first activation duration of the first communication channel is adjusted, and / or the second activation duration of the second communication channel is adjusted. In the same-frequency single-channel concurrent state, the downlink traffic of the first device can be reduced by adjusting the duration that the first communication channel and the second communication channel are in the downlink traffic activation state, avoiding excessive downlink traffic, causing a large downlink traffic impact on the wireless screen projection service or the interconnection service, thereby reducing service delays, improving service link stability, and ensuring the realization of wireless screen projection or interconnection functions.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0042] Figure 1 is a schematic diagram showing an application scenario according to an exemplary embodiment;
[0043] Figure 2 is a flow chart of a communication method according to an exemplary embodiment;
[0044] Figure 3 is a flow chart of a communication method according to an exemplary embodiment;
[0045] Figure 4 is a flow chart of a communication method according to an exemplary embodiment;
[0046] Figure 5 is a flow chart of a communication method according to an exemplary embodiment;
[0047] Figure 6 is a block diagram of a communication device according to an exemplary embodiment;
[0048] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0050] The method provided by the embodiment of the present disclosure is applied to wireless screen projection scenarios, interconnection scenarios or other scenarios involving the interaction of multiple devices. The application scenario of the embodiment of the present disclosure includes a first device, a second device and a third device, and the first device is connected to the second device and the third device respectively. Of course, the second device and the third device can also be connected. Among them, the first device can connect to the network and can project screens to other devices. For example, the first device can be a mobile phone, a tablet computer, a laptop computer and other devices; the second device can be a device that can connect to the network and can receive screen projections from other devices. For example, the second device can be a laptop computer, a tablet computer, a smart TV, a smart screen and other devices; the third device is a wireless access point (Access Point, AP), for example, the third device can be a router or other device.
[0051] In the wireless screen projection scenario, the first device acts as a GC (Group Client), the second device acts as a GO (Group Owner), and the second device 102 acts like a wireless access point in the WiFi P2P mode. The first device connects to the GO in the WiFi P2P mode similarly to the site device connecting to the wireless access point in the WiFi STA mode.
[0052] In the disclosed embodiment, the first device can be in WiFi STA mode and WiFi P2P mode at the same time. WiFi STA mode refers to a mode in which an electronic device connects to a wireless access point to access the Internet. WiFi P2P mode refers to a mode in which an electronic device establishes a direct connection channel through a WiFi P2P connection. The first device establishes a WiFi P2P connection with the second device, and the first device connects to a third device to access the Internet.
[0053] In one example, see Figure 1 , Figure 1It is a schematic diagram of an application scenario according to an exemplary embodiment, wherein the application scenario includes a first device 101, a second device 102 and a third device 103, wherein the first device 101 is a mobile phone, the second device 102 is a computer, and the third device 103 is a router.
[0054] In the wireless screen projection scenario, if the wireless screen projection function adopts the P2P protocol, the first device 101 responds to the screen projection operation to the second device 102 and creates a P2P channel (also called a P2P channel) directly connected to the second device 102. The P2P channel is the downlink channel of the first device 101. The first device 101 sends data to the second device 102 through the P2P channel to realize wireless screen projection. For example, see Figure 1 After the user starts the screen projection operation, a P2P channel 36 is created between the first device 101 and the second device 102.
[0055] In the interconnection scenario, when the user wants to operate the first device 101 and the second device 102 in coordination, the first device 101 responds to the user's interconnection operation, starts the interconnection function, and creates a P2P channel directly connected to the second device 102. Then, the first device 101 and the second device 102 can share various types of data such as image data, operation instructions, and data traffic through the P2P channel to achieve interconnection. Exemplarily, a P2P channel 36 is established between the first device 101 and the second device 102.
[0056] Based on the above-mentioned wireless screen projection scenario and interconnection scenario, it can be known that in the wireless screen projection and interconnection scenario, in order to realize the wireless screen projection or interconnection function, the first device 101 needs to work in the STA channel (also called STA channel) and the P2P channel. When the first device 101 is performing the screen projection function or the interconnection function, it is necessary to limit the single-channel downlink data transmission of the STA channel and the P2P channel.
[0057] The first device 101 and the second device 102 are connected to the third device 103 through the same frequency and the same channel respectively. For example, the first device 101 is connected to the third device 103 through the 5G frequency band 36 channel, and the second device 102 is connected to the third device 103 through the 5G frequency band 36 channel. In the screen projection scenario or interconnection scenario, when the first device 101 and the second device 102 establish a WiFi P2P connection, the site channel used as the GO in the first device 101 and the second device 102 is preferentially used as the channel for the WiFi P2P connection. Figure 1 In the application scenario, the second device 102 acts as a GO, and the first device 101 and the second device 102 establish a P2P connection based on the 5G frequency band 36 channel.
[0058] In the related art, the unrestricted allocation method based on the traffic size of the STA channel and the P2P channel pre-configured by the first device 101 is only applicable to some common business scenarios without special requirements, such as the business scenario in which the first device 101 uses a browser to browse web pages, the business scenario in which drawing software is used to draw pictures, etc. However, when the first device 101 is in some special business scenarios with high downlink traffic, for example, the first device 101 watches videos, receives large files, and other scenarios with high downlink traffic, it is very easy for the display screen of the second device 102 to be delayed and stuck. The reason is that the time slice of the downlink traffic allocated by the first device 101 to the STA channel and the P2P channel is too large, resulting in the first device 101 spending most of its time receiving data through the STA channel or the P2P channel, and it takes a long time to send data to the second device 102 through the P2P channel, which causes the screen displayed by the second device 102 to be obviously out of sync with the screen displayed by the first device 101, resulting in the phenomenon of screen stuck, thereby affecting the interconnection service or wireless screen projection service between the first device and the second device.
[0059] In response to the above-mentioned problems, the embodiments of the present disclosure provide a communication method, which can avoid excessive downlink traffic and cause a large downlink traffic impact on wireless screen projection services or interconnection services, thereby reducing service delays, improving service link stability, and ensuring the realization of wireless screen projection or interconnection functions.
[0060] Figure 2 is a flow chart of a communication method according to an exemplary embodiment, which is executed by a first device, see Figure 2 , the method comprises the following steps:
[0061] Step S201, establish a first communication connection with a second device, and establish a second communication connection with a third device, the channel used by the first communication connection is a first communication channel, and the channel used by the second communication connection is a second communication channel.
[0062] Among them, the first communication connection can be a WiFi P2P connection, and the first device and the second device can perform wireless screen projection or interconnection through the established first communication connection; the second communication connection can be a short-range communication connection, for example, the second communication connection is a WiFi connection. In the embodiment of the present disclosure, there is no restriction on the order of establishing the first communication connection and establishing the second communication connection. The first communication channel and the second communication channel can be the same channel or different channels. The first communication channel is used for the interaction between the first device and the second device, and the second communication channel is used for the interaction between the first device and the third device.
[0063] Step S202: when the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state, adjusting a first activation duration of the first communication channel and / or adjusting a second activation duration of the second communication channel.
[0064] The Single Channel Concurrency (SCC) state means that the first device operates in different modes on the same channel in the same frequency band. When the first communication channel and the second communication channel are in the SCC state, it means that the first communication channel and the second communication channel are the same. For example, Figure 1 As shown, both the P2P channel and the STA channel are 36 channels.
[0065] The first activation duration is the duration during which the first communication channel is in the downlink traffic activation state. When the first communication channel is in the downlink traffic activation state, the second device is allowed to send data to the first device based on the first communication channel, that is, the second device is allowed to send data to the first device based on the first communication channel during the first activation duration; the second activation duration is the duration during which the second communication channel is in the downlink traffic activation state. When the second communication channel is in the downlink traffic activation state, the third device is allowed to send data to the first device based on the second communication channel, that is, the third device is allowed to send data to the first device based on the second communication channel during the second activation duration. In the disclosed embodiment, when in the SCC state, in order to avoid excessive downlink traffic and cause a large downlink traffic impact on the wireless screen projection service or the interconnection service, the first activation duration and / or the second activation duration can be adjusted, which is equivalent to adjusting the downlink traffic sent by the second device and the third device to the first device.
[0066] According to the method provided by the embodiment of the present disclosure, when the first device is in a same-frequency single-channel concurrent state, the downlink traffic of the first device can be reduced by adjusting the time duration that the first communication channel and the second communication channel are in a downlink traffic activation state, so as to avoid excessive downlink traffic and cause a large downlink traffic impact on the wireless screen projection service or the interconnection service, thereby reducing service latency, improving service link stability, and ensuring the realization of wireless screen projection or interconnection functions.
[0067] Figure 3 is a flow chart of a communication method according to an exemplary embodiment, which is executed by a first device, see Figure 3 , the method comprises the following steps:
[0068] Step S301, establish a first communication connection with a second device, and establish a second communication connection with a third device, the channel used by the first communication connection is a first communication channel, and the channel used by the second communication connection is a second communication channel.
[0069] In some embodiments, when the first device starts the wireless screen projection function or the interconnection function, a first communication connection is established with the second device, and a second communication connection is established with the third device.
[0070] Step S302: when the first communication channel and the second communication channel are in a same-frequency single-channel concurrent state, a link tolerance corresponding to a target service is obtained.
[0071] The target service is the service currently being performed based on the first communication connection. For example, the target service may be a video playback service, a sliding operation service, a switching service, or the like during wireless screen projection. Link tolerance is used to characterize the maximum downlink traffic that does not affect the target service. The link tolerance is a preset parameter. Optionally, the link tolerance is the maximum downlink traffic, or the link tolerance is a parameter representing the maximum downlink traffic. The maximum downlink traffic is a preset value. For example, the maximum downlink traffic is 50Mbps, 100Mbps, or other values.
[0072] In some embodiments, a service tag corresponding to the target service is obtained, and a link tolerance corresponding to the service tag is queried, wherein the service tag is used to characterize the target service, each link tolerance has a corresponding service tag, and the same link tolerance may correspond to at least one service tag.
[0073] Optionally, the link tolerance is predetermined based on the minimum throughput, maximum delay and jitter rate corresponding to the service.
[0074] It should be noted that in the embodiment of the present disclosure, the link tolerance corresponding to the service label can be queried as an example. In another embodiment, there may be a situation where the link tolerance corresponding to the service label cannot be queried. This situation indicates that the current target service will not be affected by the downlink traffic, and therefore, there is no need to perform subsequent operations to adjust the activation duration.
[0075] Step S303: adjusting the first activation duration and / or adjusting the second activation duration based on the link tolerance.
[0076] For the adjustment method of the first duration and the second activation duration, see the following Figure 4 The embodiments shown will not be described in detail here.
[0077] It should be noted that the embodiment of the present disclosure adjusts the activation duration of the downlink traffic, and the adjustment of the activation duration of the downlink traffic does not affect the sending of the uplink traffic by the first device based on the first communication channel and based on the second communication channel.
[0078] According to the method provided by the embodiment of the present disclosure, the first device obtains the link tolerance corresponding to the target service in the concurrent state of the same-frequency single channel, adjusts the activation duration based on the link tolerance, and reduces the downlink traffic of the first device by adjusting the duration that the first communication channel and the second communication channel are in the downlink traffic activation state, thereby avoiding excessive downlink traffic and causing a large downlink traffic impact on the wireless screen projection service or the interconnection service, thereby reducing service delay, improving service link stability, and ensuring the realization of wireless screen projection or interconnection functions.
[0079] Figure 4 is a flow chart of a communication method according to an exemplary embodiment, which is executed by a first device, see Figure 4 , the method comprises the following steps:
[0080] Step S401: Acquire downlink traffic of a first device, where the downlink traffic includes first downlink traffic based on a first communication channel and second downlink traffic based on a second communication channel.
[0081] Among them, the downlink traffic is the sum of the first downlink traffic and the second downlink traffic, the first downlink traffic is the traffic of data sent by the second device to the first device based on the first communication channel, and the second downlink traffic is the traffic of data sent by the third device to the first device based on the second communication channel.
[0082] In the disclosed embodiment, when the downlink traffic is greater than the maximum downlink traffic represented by the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted. The downlink traffic is greater than the maximum downlink traffic, indicating that the current downlink traffic will affect the normal execution of the target service, and therefore, the activation duration needs to be adjusted. The step of adjusting the first activation duration is referred to in step S402, and the step of adjusting the second activation duration is referred to in step S404.
[0083] Step S402: when the downlink traffic is greater than the maximum downlink traffic, and the proportion of the first downlink traffic in the downlink traffic is greater than a preset proportion, the first activation duration is reduced to obtain a third activation duration.
[0084] The preset ratio is a preset value, for example, the preset ratio is 30%, 40% or other values. The proportion of the first downlink traffic in the downlink traffic is greater than the preset ratio, indicating that the current first downlink traffic is large. In order to avoid the first downlink traffic affecting the normal execution of the target service, it is necessary to reduce the first downlink traffic, that is, reduce the first activation duration, and reduce the duration allowed to send the downlink traffic.
[0085] In some embodiments, reducing the first activation duration includes: multiplying the first activation duration by a preset value to obtain a third activation duration, where the preset value is a value less than 1, for example, the preset value is 1 / 2, 2 / 3, 3 / 4, etc. Optionally, the corresponding preset value is determined according to a proportion of the first downlink traffic in the downlink traffic, and the proportion is inversely proportional to the preset value, that is, the larger the proportion, the smaller the preset value, and the smaller the proportion, the larger the preset value.
[0086] It should be noted that when the proportion of the first downlink traffic in the downlink traffic is not greater than the preset proportion, it means that although the downlink traffic is relatively large, the first downlink traffic is relatively small. At this time, the second downlink traffic mainly affects the target business. Therefore, there is no need to reduce the first activation duration.
[0087] For example, the maximum downstream traffic is 50Mbps, the first downstream traffic is 5Mbps, and the second downstream traffic is 48Mbps, that is, the current downstream traffic is 53Mbps, which is greater than the maximum downstream traffic. At this time, the first downstream traffic accounts for less than 30% of the downstream traffic. Therefore, the first activation duration is not adjusted. For another example, the maximum downstream traffic is 50Mbps, the first downstream traffic is 18Mbps, and the second downstream traffic is 37Mbps, that is, the current downstream traffic is 55Mbps, which is greater than the maximum downstream traffic. At this time, the first downstream traffic accounts for more than 30% of the downstream traffic. Therefore, the first activation duration is reduced, such as reducing the first activation duration to 1 / 2 of the original duration, that is, the third activation duration is half of the first activation duration.
[0088] Step S403: Based on the third activation duration, first notification information is sent to the second device at a first time point, and second notification information is sent to the second device at a second time point.
[0089] The above step S402 is for the first device, the first device adjusts the first activation duration to the third activation duration, but for the second device, the second device does not know that the activation duration has been adjusted, therefore, the first device sends a first notification message to the second device at a first time point based on the third activation duration, and sends a second notification message to the second device at a second time point. The first notification message is used to instruct the second device to stop sending data to the first device; the second notification message is used to indicate that the second device is allowed to send data to the second device; the interval between the second time point and the first time point is the inactive duration corresponding to the third activation duration, and the second device is not allowed to send data to the first device based on the first communication channel during the inactive duration.
[0090] For example, the first device sends a QoS Null Data / Null Data (PS=1) notification to the second device based on the P2P channel. After receiving the QoS Null Data / Null Data (PS=1) notification, the second device stops sending data to the first device (i.e., the first device exits the downlink traffic activation state of the P2P channel) until the first device sends a QoS Null Data / Null Data (PS=0) notification to the second device based on the P2P channel. After receiving the QoS Null Data / Null Data (PS=0) notification, the second device continues to send data to the first device (i.e., the first device enters the downlink traffic activation state of the P2P channel). It should be noted that when the first device exits the downlink traffic activation state of the P2P channel, it can still send data to the third device based on the P2P channel, i.e., the uplink traffic activation state of the P2P channel is not affected.
[0091] In some embodiments, considering that the first activation duration is adjusted to avoid downlink traffic affecting the execution of the target service, and the execution of the target service may involve uplink traffic between the first device and the second device, therefore, based on the third activation duration and the uplink traffic activation duration based on the first communication channel, a first notification message can be sent to the second device at a first time point, and a second notification message can be sent to the second device at a second time point, so that the time period between the first time point and the second time point overlaps as much as possible with the time period corresponding to the uplink traffic activation duration, thereby reducing the probability of self-interference.
[0092] It should be noted that the sum of the third activation duration and the corresponding inactivation duration is a fixed period. The longer the third activation duration is, the shorter the corresponding inactivation duration is, and the shorter the third activation duration is, the longer the corresponding inactivation duration is.
[0093] Step S404: when the downlink traffic is greater than the maximum downlink traffic, and the proportion of the second downlink traffic in the downlink traffic is greater than a preset proportion, the second activation duration is reduced to obtain a fourth activation duration.
[0094] The preset ratio is a preset value, for example, 30%, 40% or other values. The proportion of the second downlink traffic in the downlink traffic is greater than the preset ratio, indicating that the current second downlink traffic is large. In order to avoid the second downlink traffic affecting the normal execution of the target service, it is necessary to reduce the second downlink traffic, that is, reduce the second activation duration, and reduce the duration allowed to send the downlink traffic.
[0095] In some embodiments, reducing the second activation duration includes: multiplying the second activation duration by a preset value to obtain a fourth activation duration, where the preset value is a value less than 1, for example, the preset value is 1 / 2, 2 / 3, 3 / 4, etc. Optionally, the corresponding preset value is determined according to the proportion of the second downlink traffic in the downlink traffic, and the proportion is inversely proportional to the preset value, that is, the larger the proportion, the smaller the preset value, and the smaller the proportion, the larger the preset value.
[0096] It should be noted that when the proportion of the second downlink traffic in the downlink traffic is not greater than the preset proportion, it means that although the downlink traffic is relatively large, the second downlink traffic is relatively small. At this time, the first downlink traffic mainly affects the target business. Therefore, there is no need to reduce the second activation duration.
[0097] For example, the maximum downstream traffic is 50Mbps, the first downstream traffic is 5Mbps, and the second downstream traffic is 48Mbps, that is, the current downstream traffic is 53Mbps, which is greater than the maximum downstream traffic. At this time, the second downstream traffic accounts for more than 30% of the downstream traffic. Therefore, the second activation duration is reduced, such as reducing the second activation duration to 3 / 4 of the original, that is, the third activation duration is 3 / 4 of the second activation duration. For another example, the maximum downstream traffic is 50Mbps, the first downstream traffic is 49Mbps, and the second downstream traffic is 10Mbps, that is, the current downstream traffic is 59, which is greater than the maximum downstream traffic. At this time, the second downstream traffic accounts for less than 30% of the downstream traffic. Therefore, the second activation duration is not adjusted.
[0098] Step S405: Based on the fourth activation duration, third notification information is sent to the third device at a third time point, and fourth notification information is sent to the third device at a fourth time point.
[0099] The above step S404 is for the first device, the first device adjusts the second activation duration to the fourth activation duration, but for the third device, the third device does not know that the activation duration has been adjusted, therefore, the first device sends a third notification message to the third device at a third time point based on the fourth activation duration, and sends a fourth notification message to the third device at a fourth time point. Among them, the third notification message is used to instruct the third device to stop sending data to the first device; the fourth notification message is used to indicate that the third device is allowed to send data to the first device; the interval between the fourth time point and the third time point is the inactive duration corresponding to the fourth activation duration, and the third device is not allowed to send data to the first device based on the second communication channel during the inactive duration.
[0100] Optionally, the time period between the fourth time point and the third time point and the time period between the second time point and the first time point do not affect each other, and the two time periods may overlap, partially overlap, or not overlap.
[0101] For example, the first device sends a QoSNull Data / Null Data (PS=1) notification to the third device based on the STA channel. After receiving the QoSNull Data / Null Data (PS=1) notification, the third device stops sending data to the first device (i.e., the first device exits the downlink traffic activation state of the STA channel) until the first device sends a QoSNull Data / Null Data (PS=0) notification to the third device based on the STA channel. After receiving the QoSNull Data / Null Data (PS=0) notification, the third device continues to send data to the first device (i.e., the first device enters the downlink traffic activation state of the STA channel). It should be noted that when the first device exits the downlink traffic activation state of the STA channel, it can still send data to the third device based on the STA channel, i.e., the uplink traffic activation state of the STA channel is not affected.
[0102] It should be noted that the sum of the fourth activation duration and the corresponding inactivation duration is a fixed period. The longer the fourth activation duration is, the shorter the corresponding inactivation duration is, and the shorter the fourth activation duration is, the longer the corresponding inactivation duration is.
[0103] In another embodiment, when the downlink traffic is not greater than the maximum downlink traffic, it indicates that the current downlink traffic has not yet caused an impact on the target service and will not affect the normal operation of the target service. Therefore, there is no need to adjust the first activation duration and the second activation duration.
[0104] In addition, it should be noted that the embodiment of the present disclosure only takes the reduction of the first activation duration and the second activation duration as an example. In another embodiment, after the first activation duration is reduced to the third activation duration and the second activation duration is reduced to the fourth activation duration, when the downlink traffic of the first device is less than the maximum downlink traffic corresponding to the target service, or the target service is switched to a service that does not limit the downlink traffic, the third activation duration can be restored to the first activation duration, and the fourth activation duration can be restored to the second activation duration.
[0105] According to the method provided by the embodiment of the present disclosure, the first device adjusts the first activation duration and the second activation duration according to the maximum downlink traffic corresponding to the target service, and can determine whether the corresponding activation duration needs to be adjusted according to the proportion of the first downlink traffic and the second downlink traffic in the downlink traffic. By adjusting the time that the first communication channel and / or the second communication channel is in the downlink traffic activation state, the downlink traffic of the first device is reduced to avoid excessive downlink traffic, which causes a large downlink traffic impact on the wireless screen projection service or the interconnection service, thereby reducing service delay, improving service link stability, and ensuring the realization of wireless screen projection or interconnection functions.
[0106] In addition, it should be noted that the above steps S402 and S404 are only one way to adjust the activation duration. In another embodiment, a corresponding third activation duration and a fourth activation duration may be set for each link tolerance. When the activation duration needs to be adjusted, the third activation duration and the fourth activation duration corresponding to the link tolerance are obtained; the first activation duration is adjusted to the third activation duration, and / or the second activation duration is adjusted to the fourth activation duration.
[0107] Figure 5 is a flow chart of a communication method according to an exemplary embodiment, which is executed by a first device, see Figure 5 , the method comprises the following steps:
[0108] Step S501: Establish a first communication connection with a second device, and establish a second communication connection with a third device.
[0109] Step S502: Determine whether the first communication channel and the second communication channel are in a same-frequency single-channel transmission state.
[0110] When the same-frequency single-channel concurrent state is in progress, step S503 is executed. When the same-frequency single-channel concurrent state is not in progress, the process ends.
[0111] Step S503: Match a corresponding flow restriction model according to the target service, where the flow restriction model includes link tolerances corresponding to a plurality of services.
[0112] Step S504, when the traffic limiting model includes the link tolerance corresponding to the target service, a downlink traffic configuration matching the link tolerance is issued, and based on the activation duration configured by the downlink traffic configuration, the downlink traffic of the first communication channel and / or the second communication channel is limited.
[0113] The downlink traffic configuration is used to configure the activation duration of the first communication channel and the second communication channel. For example, the downlink traffic configuration may be the adjustment method of the activation duration in the above steps S402 and S404, or the downlink traffic configuration may directly include the third activation duration and the fourth activation duration corresponding to the link tolerance. The configured activation duration includes the third activation duration and / or the fourth activation duration.
[0114] Step S505: When the traffic restriction model does not include the link tolerance corresponding to the target service, a default configuration is adopted, and the downlink traffic of the first communication channel and the second communication channel is not restricted.
[0115] The default configuration is the default activation duration of the downlink traffic. Adopting the default configuration means that there is no need to adjust the first activation duration and the second activation duration.
[0116] Figure 6is a block diagram of a communication device according to an exemplary embodiment, which is configured in a first device, see Figure 6 , the device comprises:
[0117] The connection establishment module 601 is configured to establish a first communication connection with the second device and a second communication connection with the third device, wherein the channel used by the first communication connection is the first communication channel and the channel used by the second communication connection is the second communication channel;
[0118] The activation duration adjustment module 602 is configured to adjust the first activation duration of the first communication channel and / or adjust the second activation duration of the second communication channel when the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state;
[0119] The first activation duration is the duration during which the first communication channel is in the downlink traffic activation state, and the second activation duration is the duration during which the second communication channel is in the downlink traffic activation state.
[0120] In some embodiments, the activation duration adjustment module 602 is configured to:
[0121] When the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state, obtaining a link tolerance corresponding to a target service, where the target service is a service currently performed based on the first communication connection, and the link tolerance is used to characterize a maximum downlink flow that does not affect the target service;
[0122] Based on the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted.
[0123] In some embodiments, the activation duration adjustment module 602 is configured to:
[0124] Get the business tag corresponding to the target business;
[0125] Query the link tolerance corresponding to the service label.
[0126] In some embodiments, the activation duration adjustment module 602 is configured to:
[0127] Acquire downlink traffic of the first device, where the downlink traffic includes first downlink traffic based on the first communication channel and second downlink traffic based on the second communication channel;
[0128] When the downlink traffic is greater than the maximum downlink traffic represented by the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted.
[0129] In some embodiments, the activation duration adjustment module 602 is configured to:
[0130] When the downlink traffic is greater than the maximum downlink traffic, and the proportion of the first downlink traffic in the downlink traffic is greater than a preset proportion, reducing the first activation duration to obtain a third activation duration; and / or,
[0131] When the downlink traffic is greater than the maximum downlink traffic, and the proportion of the second downlink traffic in the downlink traffic is greater than a preset proportion, the second activation duration is reduced to obtain a fourth activation duration.
[0132] In some embodiments, the activation duration adjustment module 602 is configured to:
[0133] Obtain a third activation duration and a fourth activation duration corresponding to the link tolerance;
[0134] The first activation duration is adjusted to a third activation duration, and / or the second activation duration is adjusted to a fourth activation duration.
[0135] In some embodiments, the apparatus further comprises:
[0136] a downlink traffic limiting module, configured to send first notification information to the second device at a first time point and send second notification information to the second device at a second time point based on a third activation duration;
[0137] Among them, the first notification information is used to instruct the second device to stop sending data to the first device; the second notification information is used to indicate that the second device is allowed to send data to the second device; the duration between the second time point and the first time point is the inactive duration corresponding to the third activation duration.
[0138] In some embodiments, the apparatus further comprises:
[0139] A downlink traffic limiting module is configured to send a third notification message to a third device at a third time point based on a fourth activation duration, and send a fourth notification message to the third device at a fourth time point;
[0140] Among them, the third notification information is used to instruct the third device to stop sending data to the first device; the fourth notification information is used to indicate that the third device is allowed to send data to the first device; the duration between the fourth time point and the third time point is the inactive duration corresponding to the fourth activation duration.
[0141] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0142] An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the communication method in the above embodiment.
[0143] Figure 7 is a block diagram of an electronic device 700 according to an exemplary embodiment.
[0144] Reference Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0145] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0146] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0147] The power supply component 706 provides power to various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0148] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0149] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0150] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0151] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0152] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0153] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0154] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0155] The embodiments of the present disclosure also provide a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the communication method in the above embodiments.
[0156] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0157] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A communication method, applied to a first device, characterized in that: The method comprises: Establishing a first communication connection with a second device and establishing a second communication connection with a third device, wherein a channel used by the first communication connection is a first communication channel and a channel used by the second communication connection is a second communication channel; When the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state, adjusting a first activation duration of the first communication channel, and / or adjusting a second activation duration of the second communication channel; The first activation duration is the duration during which the first communication channel is in a downlink traffic activation state, and the second activation duration is the duration during which the second communication channel is in a downlink traffic activation state.
2. The method according to claim 1, characterized in that When the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state, adjusting a first activation duration of the first communication channel, and / or adjusting a second activation duration of the second communication channel, comprises: When the first communication channel and the second communication channel are in the same-frequency single-channel concurrent state, obtaining a link tolerance corresponding to a target service, the target service being a service currently performed based on the first communication connection, and the link tolerance being used to characterize a maximum downlink flow that does not affect the target service; Based on the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted.
3. The method according to claim 2, characterized in that The obtaining of the link tolerance corresponding to the target service includes: Obtaining a service tag corresponding to the target service; The link tolerance corresponding to the service label is queried.
4. The method according to claim 2, characterized in that: The adjusting the first activation duration based on the link tolerance and / or adjusting the second activation duration includes: Acquire downlink traffic of the first device, where the downlink traffic includes first downlink traffic based on the first communication channel and second downlink traffic based on the second communication channel; When the downlink traffic is greater than the maximum downlink traffic represented by the link tolerance, the first activation duration is adjusted, and / or the second activation duration is adjusted.
5. The method according to claim 4, characterized in that When the downlink traffic is greater than the maximum downlink traffic represented by the link tolerance, adjusting the first activation duration, and / or adjusting the second activation duration, comprises: When the downlink traffic is greater than the maximum downlink traffic, and the proportion of the first downlink traffic in the downlink traffic is greater than a preset proportion, reducing the first activation duration to obtain a third activation duration; and / or, When the downlink traffic is greater than the maximum downlink traffic, and the proportion of the second downlink traffic in the downlink traffic is greater than the preset proportion, the second activation duration is reduced to obtain a fourth activation duration.
6. The method according to claim 4, characterized in that The adjusting the first activation duration based on the link tolerance and / or adjusting the second activation duration includes: Obtaining a third activation duration and a fourth activation duration corresponding to the link tolerance; The first activation duration is adjusted to the third activation duration, and / or the second activation duration is adjusted to the fourth activation duration.
7. The method according to claim 5 or 6, characterized in that: The method further comprises: Based on the third activation duration, sending first notification information to the second device at a first time point, and sending second notification information to the second device at a second time point; Among them, the first notification information is used to instruct the second device to stop sending data to the first device; the second notification information is used to indicate that the second device is allowed to send data to the second device; the duration between the second time point and the first time point is the inactive duration corresponding to the third activation duration.
8. The method according to claim 5 or 6, characterized in that: The method further comprises: Based on the fourth activation duration, sending third notification information to the third device at a third time point, and sending fourth notification information to the third device at a fourth time point; Among them, the third notification information is used to instruct the third device to stop sending data to the first device; the fourth notification information is used to indicate that the third device is allowed to send data to the first device; the duration between the fourth time point and the third time point is the inactive duration corresponding to the fourth activation duration.
9. A communication device, characterized in that: The device comprises: a connection establishing module, configured to establish a first communication connection with a second device and a second communication connection with a third device, wherein a channel used by the first communication connection is a first communication channel and a channel used by the second communication connection is a second communication channel; an activation duration adjustment module, configured to adjust a first activation duration of the first communication channel and / or adjust a second activation duration of the second communication channel when the first communication channel and the second communication channel are in a co-frequency single-channel concurrent state; The first activation duration is the duration during which the first communication channel is in a downlink traffic activation state, and the second activation duration is the duration during which the second communication channel is in a downlink traffic activation state.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 8.