Channel occupancy method, apparatus, and storage medium
By adjusting the channel duration ratio based on the status information of electronic devices and optimizing the channel activation time, the latency problem during screen mirroring and internet access is solved, improving channel utilization and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2026-03-27
AI Technical Summary
In the process of screen mirroring and internet access on electronic devices, the latency caused by channel switching in existing technologies is relatively large, resulting in a poor user experience.
By determining the target mode from multiple alternative modes based on the status information of the first device, the duration ratio of the first channel and the second channel is adjusted to optimize the channel's on-time and reduce the probability of channel congestion or idleness.
It reduces the occurrence of channel latency, improves channel utilization, and enhances user experience.
Smart Images

Figure CN115226126B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a channel occupancy method, apparatus and storage medium. Background Technology
[0002] With the rapid development of communication technology, users have increasingly higher requirements for the functions of electronic devices. For example, in scenarios where electronic devices are used for screen mirroring, users may also need to access the internet through the electronic devices.
[0003] For example, in related technologies, internet access and screen mirroring can be achieved by switching between two channels on an electronic device. However, when using this method for internet access and screen mirroring, the latency is relatively large, resulting in a poor user experience. Summary of the Invention
[0004] This disclosure provides a channel occupancy method, apparatus, and storage medium.
[0005] A first aspect of this disclosure provides a channel occupation method, executed by a first device, the method comprising:
[0006] When the first device opens the first channel in a time-division manner to communicate with the second device, and opens the second channel in a time-division manner to communicate with the third device, the target mode is determined from multiple alternative modes based on the status information of the first device; the first channel and the second channel are two channels with the same frequency band but different frequencies;
[0007] Based on the target mode, determine the ratio of the duration during which the first device activates the first channel and the second channel, respectively.
[0008] Optionally, determining the target mode from multiple alternative modes based on the status information of the first device includes at least one of the following:
[0009] If the third device is the screen mirroring device of the first device, the target mode is determined from multiple alternative modes based on the source application of the service data provided by the first device to the third device;
[0010] If the third device is not the screen projection device of the first device, the target mode is determined from multiple alternative modes based on the communication status information of the first device communicating with the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
[0011] Optionally, determining the ratio of the durations during which the first device activates the first channel and the second channel, respectively, according to the target mode, includes:
[0012] Based on the target pattern, determine the duration ratio determination rules;
[0013] The duration ratio is adjusted within the time limit defined by the determining rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0014] Optionally, adjusting the duration ratio within the time limit defined by the determining rule based on the channel utilization of the first channel of the first device and / or the channel utilization of the second channel of the first device includes:
[0015] Determine whether the adjustment conditions are met;
[0016] When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0017] Optionally, determining whether the adjustment conditions are met includes at least one of the following:
[0018] Based on the adjustment cycle and adjustment records, determine whether the current moment is an adjustment moment;
[0019] or,
[0020] If the channel utilization of the first channel and / or the second channel is detected to be outside the preset range, it is determined that the adjustment conditions are met;
[0021] or,
[0022] If the change in the utilization rate of at least one of the first and second channels is detected to be greater than the magnitude threshold, it is determined that the adjustment condition is met.
[0023] Optionally, the adjustment period is a preset value;
[0024] or
[0025] The adjustment period is a preset multiple of the activation period, wherein the duration ratio is the allocation ratio within the activation time window of the first device activating the first channel and the second channel.
[0026] Optionally, the duration ratio is A / B; the alternative modes include:
[0027] In the first mode, A and / or B are adjusted such that the ratio of B to (A+B) is within a first range.
[0028] In the second mode, while A remains unchanged, B is adjusted within a second value range.
[0029] In the third mode, while B remains unchanged, A is adjusted within a third value range.
[0030] Optionally, the step of determining the target mode from multiple alternative modes based on the source application of the service data provided by the first device to the third device includes at least one of the following:
[0031] If the source application is a first type of application, then the target mode is determined to be the first mode;
[0032] If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application;
[0033] If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the second type of application. When the source application is the third type of application, the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
[0034] Optionally, the method further includes:
[0035] When it is determined that the first device needs to switch between the first channel and the second channel based on the duration ratio, the switching duration is determined according to the target switching mode;
[0036] Within the switching duration, it is determined that the first device completes the switching between the first channel and the second channel.
[0037] Optionally, determining the switching duration based on the target switching mode includes:
[0038] When the target switching mode is the first switching mode, the switching duration is determined to be the first duration;
[0039] When the target switching mode is the second switching mode, the switching duration is determined to be the second duration;
[0040] The second duration is shorter than the first duration.
[0041] A second aspect of this disclosure provides a channel occupancy device, executed by a first device, the device comprising:
[0042] The first determining module is used to determine the target mode from multiple alternative modes based on the status information of the first device when the first device opens the first channel in a time-division multiplexing mode to communicate with the second device and opens the second channel in a time-division multiplexing mode to communicate with the third device; the first channel and the second channel are two channels with the same frequency band but different frequencies.
[0043] The second determining module is used to determine the ratio of the duration of the first device activating the first channel and the second channel, respectively, based on the target mode.
[0044] Optionally, the first determining module is used for at least one of the following:
[0045] If the third device is the screen mirroring device of the first device, the target mode is determined from multiple alternative modes based on the source application of the service data provided by the first device to the third device;
[0046] If the third device is not the screen projection device of the first device, the target mode is determined from multiple alternative modes based on the communication status information of the first device communicating with the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
[0047] Optionally, the second determining module includes:
[0048] The determining unit is used to determine the duration ratio determination rule based on the target pattern;
[0049] An adjustment unit is configured to adjust the duration ratio within a time limit defined by the determination rule, based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0050] Optionally, the adjustment unit is used for:
[0051] Determine whether the adjustment conditions are met;
[0052] When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0053] Optionally, the adjustment unit is specifically used for at least one of the following:
[0054] Based on the adjustment cycle and adjustment records, determine whether the current moment is an adjustment moment;
[0055] or,
[0056] If the channel utilization of the first channel and / or the second channel is detected to be outside the preset range, it is determined that the adjustment conditions are met;
[0057] or,
[0058] If the change in the utilization rate of at least one of the first channel and / or the second channel is detected to be greater than the magnitude threshold, it is determined that the adjustment condition is met.
[0059] Optionally, the adjustment period is a preset value;
[0060] or
[0061] The adjustment period is a preset multiple of the activation period, wherein the duration ratio is the allocation ratio within the activation time window of the first device activating the first channel and the second channel.
[0062] Optionally, the duration ratio is A / B; the alternative modes include:
[0063] In the first mode, A and / or B are adjusted such that the ratio of B to (A+B) is within a first range.
[0064] In the second mode, while A remains unchanged, B is adjusted within a second value range.
[0065] In the third mode, while B remains unchanged, A is adjusted within a third value range.
[0066] Optionally, the first determining module is specifically used for at least one of the following:
[0067] If the source application is a first type of application, then the target mode is determined to be the first mode;
[0068] If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application;
[0069] If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the second type of application. When the source application is the third type of application, the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
[0070] Optionally, the device further includes:
[0071] The third determining module is used to determine the switching duration according to the target switching mode when the first device needs to switch between the first channel and the second channel based on the duration ratio.
[0072] The fourth determining module is used to determine, within the switching duration, that the first device has completed the switching between the first channel and the second channel.
[0073] Optionally, the third determining module is used to:
[0074] When the target switching mode is the first switching mode, the switching duration is determined to be the first duration;
[0075] When the target switching mode is the second switching mode, the switching duration is determined to be the second duration;
[0076] The second duration is shorter than the first duration.
[0077] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a computer processor, the computer is able to perform the channel occupancy method as described above.
[0078] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0079] In this embodiment, a target mode is first determined from multiple alternative modes based on the status information of the first device. Then, the duration ratio of the first device's activation of the second channel and the second channel is determined based on the target mode, so that the first device can determine the duration of activation of the first and second channels based on this duration ratio. Since the status information of the first device can reflect the amount of communication data between the first device and the second and third devices, the duration ratio of the first and second channels determined based on the status information of the first device is more in line with the communication needs of the first device, reducing the probability of congestion or long-term idleness of the first and second channels. That is, while reducing the delay phenomenon when the first device communicates with the second and third devices, the utilization rate of the first and second channels is guaranteed. Attached Figure Description
[0080] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0081] Figure 1 This is a schematic diagram illustrating a channel occupancy method according to an exemplary embodiment;
[0082] Figure 2This is a flowchart illustrating a channel occupancy method according to another exemplary embodiment;
[0083] Figure 3 This is a flowchart illustrating a channel occupancy method according to another exemplary embodiment;
[0084] Figure 4 This is a schematic diagram illustrating channel switching according to another exemplary embodiment;
[0085] Figure 5 This is a schematic diagram of the structure of a channel occupancy device according to an exemplary embodiment;
[0086] Figure 6 This is a schematic diagram of the structure of a channel occupancy device according to an exemplary embodiment;
[0087] Figure 7 This is a schematic diagram of the structure of a first device according to another exemplary embodiment. Detailed Implementation
[0088] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses consistent with some aspects of this disclosure as detailed in the appended claims.
[0089] Before explaining the embodiments of this disclosure, the application scenarios of these embodiments will be introduced as follows:
[0090] When a first device communicates with a second device through a first channel and with a third device through a second channel, and the first and second channels are different channels with the same carrier frequency, the first device needs to time-division multiplex the first and second channels to communicate with the second and third devices respectively. That is, at any given time, the first device can only activate one of the first or second channels to communicate with the second or third device.
[0091] For example, refer to Figure 1 When mobile phone 101 is connected to both wireless router 102 and screen projection device 103, mobile phone 101 communicates with wireless router 102 through wireless LAN (Wi-Fi) channel to enable Internet access, and communicates with screen projection device 103 through P2P channel to enable screen projection.
[0092] Because mobile phone 101 needs to activate the Wi-Fi channel and P2P channel at different times, if the Wi-Fi channel is activated for a longer period and the P2P channel for a shorter period, the mobile phone 101 will be unable to send service data to the projection device 103 in a timely manner, resulting in a longer projection delay. If the Wi-Fi channel is activated for a shorter period and the P2P channel for a longer period, the inability to transmit data with the wireless router 102 in a timely manner may cause internet lag.
[0093] Based on this, the channel occupancy method of this disclosure embodiment can be used to determine the ratio of the duration of the mobile phone 101 using the Wi-Fi channel and the duration of the P2P channel, and the duration of the mobile phone 101 using the Wi-Fi channel and the P2P channel can be determined according to the ratio of the duration, so as to reduce the probability of the mobile phone 101 experiencing network lag or the screen projection device experiencing screen projection delay.
[0094] It should be noted that the above are only some exemplary application scenarios provided by the embodiments of this disclosure, and do not constitute a limitation on the application scenarios of the channel occupancy method provided by the embodiments of this disclosure.
[0095] refer to Figure 2 This disclosure provides a channel occupation method, executed by a first device, the method comprising:
[0096] S201: When the first device opens the first channel in a time-division manner to communicate with the second device, and opens the second channel in a time-division manner to communicate with the third device, the target mode is determined from multiple alternative modes according to the status information of the first device; the first channel and the second channel are two channels with the same frequency band but different frequencies;
[0097] S202: Determine the ratio of the duration during which the first device turns on the first channel and the second channel, respectively, according to the target mode.
[0098] The first device here can be a terminal device. For example, the first device can be a mobile phone, tablet computer, laptop computer, wearable electronic device with wireless communication function (smartwatch, smart bracelet, smart glasses), etc., and this disclosure does not limit it.
[0099] The second device can be a wireless access point (AP) device. For example, the second device can be a wireless router, wireless bridge, wireless switch, mobile phone, etc., or other devices that can provide a wireless local area network for the first device. This disclosure does not limit the specific devices in this regard.
[0100] The third device can be various output devices, including: video output devices, image output devices, and / or audio output devices.
[0101] The video output devices include smart TVs, projectors, speakers, etc., but may also be other video, image, or audio output devices. This disclosure does not limit the specific devices used.
[0102] When the second device is a wireless AP device, the first channel through which the second device communicates with the first device is the Wi-Fi channel.
[0103] When the third device communicating with the first device is a video or image output device, the second channel for communication between the third device and the first device is a P2P channel, and the second channel and the first channel are two channels with the same frequency band but different frequencies.
[0104] The status information of the first device may be: any status information reflecting the first device. For example, the status information of the first device may include at least: communication status information and / or communication demand information reflecting the first device's use of the first channel and / or the second channel.
[0105] Different alternative modes correspond to different configuration methods for the activation duration ratio of the first and second channels. The duration ratio determined by different configuration methods can meet the communication needs of the first device using the first channel and / or the second channel under different states. Therefore, in this embodiment of the disclosure, in order to reasonably allocate the activation duration ratio when the first device activates the first and second channels in a time-division manner, a target mode with a certain duration is determined based on the status information of the first device. This ensures that the first channel and / or the second channel are used for communication with a duration ratio that meets the current communication status of the first device, thereby reducing problems such as arbitrary communication congestion.
[0106] In one embodiment, the status information of the first device described above includes at least one of the following:
[0107] The source and application of business data provided by the first device to the third device;
[0108] Communication status information of the first device and the second device communicating through the first channel, wherein the communication status information includes communication frequency, communication data volume and / or single communication duration;
[0109] Communication status information between the first device and the third device through the second channel, wherein the communication status information includes communication frequency, communication data volume and / or duration of a single communication;
[0110] The type of application launched by the first device.
[0111] For example, the source application from which the first device provides business data to the third device can be any application installed on the first device, such as a video playback application, a music playback application, an office application, or a game application.
[0112] Correspondingly, business data can be video data, music data, or file data, etc.
[0113] The amount of communication data between the first device and the second or third device can be the amount of communication data in a single communication between the first device and the second or third device.
[0114] It can also be the total amount of communication data between the first device and the second or third device in multiple communications.
[0115] It can also be the average single communication data volume calculated based on the total communication data volume of multiple communications between the first device and the second or third device.
[0116] The types of applications launched by the first device include Class 1 applications, Class 2 applications, and Class 3 applications.
[0117] The first device can determine whether the application it launches is a first-class application, a second-class application, or a third-class application based on the amount of business data it provides to the third device per unit time.
[0118] For example, if the amount of business data provided by the first device to the third device per unit time is less than the first threshold, then the application launched by the first device is determined to be a first type of application.
[0119] When the amount of business data provided by the first device to the third device per unit time exceeds the second threshold, the application launched by the first device is determined to be a second type of application.
[0120] When the amount of business data provided by the first device to the third device per unit time is between the first threshold and the second threshold, equal to the first threshold or equal to the second threshold, the application launched by the first device is determined to be a third type of application.
[0121] The first threshold is less than the second threshold.
[0122] The above are merely examples listing several possible status information of the first device and do not constitute a limitation on the status information of the first device in the embodiments of this disclosure.
[0123] In this embodiment, a target mode is first determined from multiple alternative modes based on the status information of the first device. Then, the duration ratio of the first device's activation of the second channel and the second channel is determined based on the target mode, so that the first device can determine the duration of activation of the first and second channels based on this duration ratio. Since the status information of the first device can reflect the amount of communication data between the first device and the second and third devices, the duration ratio of the first and second channels determined based on the status information of the first device is more in line with the communication needs of the first device, reducing the probability of congestion or long-term idleness of the first and second channels. That is, while reducing the delay phenomenon when the first device communicates with the second and third devices, the channel utilization rate of the first and second channels is guaranteed.
[0124] In one embodiment, when the status information of the first device is the source application of the service data provided by the first device to the third device, and the third device is the screen projection device of the first device, the target mode can be determined from multiple alternative modes according to the source application of the service data provided by the first device to the third device.
[0125] For example, based on the source application of the service data provided by the first device to the third device, a target mode is determined from a plurality of alternative modes, including at least one of the following:
[0126] If the source application is a first type of application, then the target mode is determined to be the first mode;
[0127] If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application;
[0128] If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the first type of application, and the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
[0129] The second type of application can be a media playback application, such as a video playback application or a music playback application, or other media playback applications. This disclosure does not limit the specific applications in this regard.
[0130] The third category of applications can be game applications.
[0131] For example, the above-mentioned game applications can be single-player game applications or online game applications, and this disclosure does not limit them.
[0132] For example, competitive game apps, puzzle game apps, or music game apps.
[0133] The first category of applications includes all applications other than media playback applications and game applications.
[0134] For example, after determining that the first device has established a communication connection with the second and third devices, the target mode can be set to the first mode by default.
[0135] After configuring the initial duration ratio using the first mode, the target mode can be redefined based on the status information of the electronic device's simultaneous activation of the first and second channels according to the initial duration ratio. The target mode at this point can be any one of the first to third modes.
[0136] For example, after configuring the initial duration ratio, the type of application launched by the first device based on the user trigger is detected. If the detected application launched by the first device is a media playback application, the system switches from the first mode to the second mode. If the detected application launched by the first device is a game application, the system switches from the first mode to the third mode.
[0137] In other embodiments, after determining that the first device has established a communication connection with the second and third devices, the target mode can also be determined directly based on the historical mode in which the first device uses the first channel and / or the second channel most frequently.
[0138] In addition, after the first device establishes a communication connection with the second and third devices, the type of application launched by the first device based on user triggering can be detected first, and then the target mode can be determined from multiple alternative modes based on the type of application launched by the first device.
[0139] If the application detected to be launched on the first device is an office application, then the target mode is determined to be the first mode.
[0140] If the application launched by the first device is detected to be a media playback application, then the target mode is determined to be the second mode.
[0141] If the application launched by the first device is detected to be a game application, then the target mode is determined to be the third mode.
[0142] In another embodiment, if the third device is not the projection device of the first device, the target mode can be determined from multiple alternative modes based on the communication status information of the channels between the first device and the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
[0143] For example, the first device may pre-store a table showing the correspondence between communication frequency, communication data volume and / or single communication duration and alternative modes.
[0144] The communication frequency, communication data volume, and / or single communication duration of the first device communicating with the second and third devices can be obtained. Then, the target mode is determined from the correspondence table between communication data volume and alternative modes based on the communication frequency, communication data volume, and / or single communication duration of the first device communicating with the second device.
[0145] After determining the target mode, the duration ratio of the first device activating the first channel and the second channel can be determined based on the target mode using the following method:
[0146] In one embodiment, after determining the duration ratio determination rule according to the target mode, the duration ratio can be adjusted directly within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0147] As can be seen from the above introduction, the alternative modes include the first mode, the second mode, and the third mode.
[0148] For example, for ease of explanation, the ratio of the duration for which the first device turns on the first channel and the second channel is respectively represented by A / B.
[0149] Where A / B is indivisible, and both A and B are positive integers.
[0150] When the target mode determined from the alternative modes is the first mode, A and / or B are adjusted according to the channel utilization of the first channel of the first device and / or the channel utilization of the second channel of the first device, and the ratio of B to (A+B) is within the first value range.
[0151] The first value range can be set according to the characteristics of the first type of application corresponding to the first mode.
[0152] As described above, the first category of applications includes applications other than games and media playback applications. When the first device is running a first-category application, it needs to send the necessary data for screen mirroring to the third device, while also maintaining its own internet access functionality. Therefore, the first value range can be set to a smaller value, that is, reducing the difference between the first channel's activation duration and the second channel's activation duration to balance the first device's screen mirroring and internet access functions.
[0153] For example, the first value range can be set to 1 / 2 to 5 / 8.
[0154] Additionally, when the application launched by the first device is a first-class application, such as an office application, the business data that the first device needs to send to the third device per unit time is mainly file data, and the data volume is relatively small. Therefore, the duration for which the first device opens the first channel and the second channel can both be set to a small value.
[0155] For example, the activation duration of the first channel can be set to 30ms, and the activation duration of the second channel can be set to 50ms. That is, the first device can activate the first channel for 30ms, then activate the second channel for 50ms, and then activate the first channel again for 30ms.
[0156] By shortening the duration for the first device to activate the first and second channels at a time, the number of switching times between the first and second channels per unit time can be increased. This not only improves the timeliness of the first device sending service data, but also ensures the timeliness of the first device obtaining network data from the first channel, reducing the probability of screen projection delay and internet access delay for the first device.
[0157] In addition, in the first mode, it is also possible to determine whether the primary task of the first device at any given moment is browsing the Internet or screen mirroring, based on the type of application launched by the first device.
[0158] When it is determined that the primary task of the first device at the current moment is screen projection, A can be kept unchanged, that is, the opening duration of the first channel of the first device can be kept unchanged. B can be adjusted according to the channel utilization of the first channel and / or the channel utilization of the second channel, that is, the opening duration of the second channel can be adjusted to improve the timeliness of the first device sending service data to the third device and reduce the probability of the third device sending delay due to the first device's inability to send service data to the third device in a timely manner. However, it must be ensured that the ratio of B to (A+B) is within the first value range.
[0159] The channel utilization rates of the first and second channels can be calculated using the following formula (1):
[0160]
[0161] Where Tx is the data transmission duration within a single channel opening duration, Tr is the data reception duration within a single channel opening duration, Ta is the single channel opening duration, and Tb is the channel busy duration within a single channel opening duration.
[0162] The aforementioned single channel activation duration refers to either the activation duration of the first channel or the activation duration of the second channel.
[0163] For example, the channel utilization of the second channel can be calculated in the manner described above. Then, the threshold range of the channel utilization of the second channel is determined, and the opening duration of the second channel is adjusted according to the adjustment method corresponding to the threshold range, thereby achieving the goal of adjusting the duration ratio A / B.
[0164] The adjustment method for the threshold range is as follows:
[0165] The first threshold range is: 0% < channel utilization < 60%; the corresponding adjustment method is: reduce the third duration based on the last time the channel was opened.
[0166] The third duration can be set according to requirements, for example, 5ms or 10ms.
[0167] Since the bandwidth of the first and second channels is fixed, it can be seen from formula (1) that when (Ta-Tb) is constant, the shorter the transmission time (Tx+Tr) of the first and second channels, the lower the utilization rate of the first and second channels. At this time, the channel utilization rate can be improved by shortening the opening time of the first or second channel, that is, by reducing Ta in formula (1).
[0168] The second threshold range is: channel utilization = 60%, and the corresponding adjustment method is: do not adjust the opening duration of the channel.
[0169] When the channel utilization rate of the first or second channel is 60%, it means that the channel utilization rate of the first or second channel is at its best at the current moment. At this time, the opening duration of the first or second channel does not need to be adjusted.
[0170] The third threshold range is: 60% < channel utilization ≤ 75%. The corresponding adjustment method is: do not adjust the channel opening duration, or add a fourth duration based on the previous channel opening duration.
[0171] The fourth duration can also be set as needed, for example, 2ms, 5ms or 10ms.
[0172] The fourth duration and the third duration may be the same or different, and this disclosure does not limit this.
[0173] When the channel utilization of the first or second channel is greater than 60% but not greater than 75%, it indicates that the channel utilization of the first or second channel is slightly high. When transmitting data through the first or second channel, the data may not be fully transmitted due to the short channel opening time, resulting in delay. Therefore, the data congestion of the first or second channel can be alleviated by appropriately increasing the opening time of the first or second channel, thereby reducing the data transmission delay of the channel.
[0174] In addition, when the utilization rate of the first or second channel is greater than 60% and less than or equal to 75%, it means that the channel utilization rate of the first or second channel is only slightly high. Even if there is a delay, the delay is small. Therefore, the duration ratio of the first and second channels does not need to be adjusted.
[0175] The fourth threshold range is: channel utilization > 75%; the corresponding adjustment method is: adjust the channel's activation duration to the maximum value of the time limit range specified by the corresponding rule.
[0176] When the channel utilization rate of the first or second channel is greater than 75%, it indicates that the channel utilization rate of the first or second channel is very high, which in turn indicates that the amount of data transmitted through the first or second channel is large, resulting in significant latency. Therefore, channel congestion can be alleviated and latency reduced when transmitting data through the first or second channel by adjusting the activation duration of the first or second channel to the maximum value of the time limit range specified by the corresponding rule.
[0177] For example, assuming the first channel's activation duration is 30ms and the second channel's last activation duration was 40ms, with the first value ranging from 1 / 2 to 5 / 8, the corresponding adjustment range for the second channel is 30ms to 50ms.
[0178] If the calculated channel utilization of the second channel is less than 60% and the third duration is 10ms, then the activation duration of the second channel will be adjusted to 30ms.
[0179] If the calculated channel utilization rate of the second channel is 60%, then the activation duration of the second channel will not be adjusted.
[0180] If the calculated channel utilization rate of the second channel is greater than 60% and not greater than 70%, and the fourth duration is 5ms, then the activation duration of the second channel will be adjusted to 45ms.
[0181] If the calculated channel utilization of the second channel is greater than 75%, then the activation duration of the second channel will be adjusted to 50ms.
[0182] As can be seen from the above formula (1), the larger the amount of data transmitted by the first or second channel within a single channel opening time, that is, the larger (Tr+Tx) is, the greater the utilization rate of the channel, but the greater the delay is.
[0183] Correspondingly, the smaller the amount of data passing through the first or second channel within a single channel opening duration, that is, the smaller (Tr+Tx), the lower the channel utilization rate. Although the delay is also lower, it will result in a waste of the channel.
[0184] In this embodiment of the disclosure, the channel opening duration of the first channel and the second channel is adjusted by adjusting the ratio of the duration of the first channel and the second channel, so as to reduce the probability of delay in the first channel and the second channel, while also ensuring the channel utilization rate.
[0185] When it is determined that the primary task of the first device at the current moment is to access the Internet, the duration of the second channel can be kept unchanged. The duration of the first channel can be adjusted according to the channel utilization of the first channel and / or the utilization of the second channel to improve the timeliness of the first device in obtaining data from the network and reduce the probability of the first device experiencing Internet lag or disconnection.
[0186] The specific implementation method of maintaining the second channel's on-time unchanged and adjusting the first channel's on-time based on the channel utilization of the first channel and / or the second channel can refer to the above implementation method, and will not be repeated here in this disclosure embodiment.
[0187] In addition, in the first mode, the activation duration of the first channel and the second channel can be adjusted simultaneously as needed, and the difference between the adjusted A and B is within the first value range. This embodiment does not limit this.
[0188] The implementation method of simultaneously adjusting the activation duration of the first channel and the second channel can also refer to the above implementation method, and will not be repeated here in the embodiments of this disclosure.
[0189] When the target mode determined from the alternative modes is the second mode, keep A unchanged, and adjust B according to the channel utilization of the first channel of the first device and / or the channel utilization of the second channel of the first device within the second value range.
[0190] For example, the second value range can be set according to the characteristics of the second type of application corresponding to the second mode.
[0191] As can be seen from the above introduction, the second type of application is mainly media playback application. When the third device is the screen mirroring device of the first device, the amount of business data that the first device needs to provide to the third device per unit time is relatively large.
[0192] Therefore, the value of B in the duration ratio A / B can be increased.
[0193] For example, the second value range can be set to 5:11 to 5:13.
[0194] In addition, since each channel switch consumes a certain amount of time, and data cannot be exchanged during the channel switch, the time ratio of the first channel to the second channel can be set to a larger value. By increasing the duration for the first device to open the first and second channels each time, the number of channel switches can be reduced, thereby increasing the amount of data communicated between the first device and the second and third devices per unit time, and reducing the probability of screen projection delay due to the first device's inability to send service data to the third device in a timely manner.
[0195] For example, the activation duration of the first channel is set to 50ms, and the activation duration of the second channel is set to 110ms to 130ms.
[0196] In addition, when the third device is the projection device of the first device, the main task of the first device is still to send service data to the third device. Therefore, A can be kept unchanged, that is, the opening duration of the first channel of the first device can be kept unchanged. Based on the channel utilization of the first channel and / or the channel utilization of the second channel, B can be adjusted, that is, the opening duration of the second channel can be adjusted within the second value range, so as to improve the timeliness of the first device sending service data to the third device and reduce the probability of the third device sending delay due to the first device's inability to send service data to the third device in a timely manner.
[0197] For example, the channel utilization of the second channel can be calculated in the above manner. Then, the threshold range of the channel utilization of the second channel is determined, and the opening duration of the second channel is adjusted according to the adjustment method corresponding to the threshold range to adjust the duration ratio A / B.
[0198] For example, assuming the first channel's activation duration is 50ms, the second channel's last activation duration is 120ms, and the second value range is 5:11 to 5:13, the corresponding second channel's duration range is 110ms to 130ms.
[0199] If the calculated channel utilization of the second channel is less than 60% and the third duration is 10ms, then the activation duration of the second channel will be adjusted to 110ms.
[0200] If the calculated channel utilization rate of the second channel is 60%, then the activation duration of the second channel will not be adjusted.
[0201] If the calculated channel utilization rate of the second channel is greater than 60% and not less than 75%, and the fourth duration is 5ms, then the activation duration of the second channel will be adjusted to 115ms.
[0202] If the calculated channel utilization of the second channel is greater than 75%, then the activation duration of the second channel will be adjusted to 130ms.
[0203] When the target mode determined from the alternative modes is the third mode, keep B unchanged, and adjust A within the third value range according to the channel utilization of the first channel of the first device and / or the channel utilization of the second channel of the first device.
[0204] For example, the third value range can be set according to the characteristics of the third type of application corresponding to the third mode.
[0205] As can be seen from the above introduction, the third type of application is a game application. The amount of business data that the first device needs to provide to the third device per unit time is less than the amount of business data that the second type of application needs to provide to the third device per unit time, but greater than the amount of business data that the first type of application needs to provide to the third device per unit time.
[0206] Therefore, when setting the third value range, it is necessary to take into account the balance between the first and second channels, as well as the amount of communication data between the first device and the second and third devices.
[0207] For example, the third value range is set to A / B as 1 / 3 to 5 / 9.
[0208] In addition, the third type of application has a greater need for timely internet access compared to the first and second types of applications. Failure to obtain network data in a timely manner may cause the game to disconnect.
[0209] To ensure timely internet access, the duration for which the first device keeps the second channel open can be kept constant. The duration for which the first channel is open can be adjusted within a third value range based on the utilization rate of the first and / or second channels, thereby improving the timeliness of the first device in obtaining game data from the first channel and reducing the probability of game lag or disconnection.
[0210] The specific implementation method for adjusting the duration of the first channel within the third value range based on the channel utilization rate of the first channel and / or the utilization rate of the second channel can refer to the above implementation method, and will not be repeated here in the embodiments of this disclosure.
[0211] In another embodiment, before adjusting the duration ratio of the first channel and the second channel within the range defined by the rules based on the utilization rate of the first channel of the first device and / or the utilization rate of the second channel of the second device, it can be determined whether the adjustment conditions are met.
[0212] When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the utilization rate of the first channel of the first device and / or the utilization rate of the second channel of the first device.
[0213] When the adjustment conditions are not met, the duration ratio of the first channel and the second channel will not be adjusted.
[0214] For example, determining whether the adjustment conditions are met includes at least one of the following:
[0215] Based on the adjustment cycle and adjustment records, determine whether the current moment is an adjustment moment;
[0216] If the channel utilization of the first channel and / or the second channel is detected to be outside the preset range, it is determined that the adjustment conditions are met;
[0217] If the change in utilization of at least one of the first channel and / or the second channel is detected to be greater than the magnitude threshold, it is determined that the adjustment condition is met.
[0218] For example, the adjustment period is a preset value;
[0219] or
[0220] The adjustment period is a preset multiple of the activation period.
[0221] When the adjustment period is a preset value, the preset value can be set according to actual needs, such as 20ms, 40ms, 60ms, 80ms, 100ms, or 200ms. This disclosure does not limit this.
[0222] When the adjustment period is a preset multiple of the activation period, the multiple of the activation period used as the adjustment period can be set according to actual needs, and this embodiment does not limit this.
[0223] In addition, the activation period refers to the sum of the duration for which the first device activates the first channel and the second channel at a time.
[0224] For example, if the first device activates the first channel for 30ms and then activates the second channel for 50ms, the activation period is 80ms.
[0225] After obtaining the adjustment cycle and adjustment record in the current mode, the first device can determine whether the current time is the adjustment time based on the adjustment cycle and adjustment record, and then determine whether the adjustment conditions are met.
[0226] For example, assuming the adjustment period determined by the above method is 200ms, and the time before the last adjustment of the duration ratio of the first channel and the second channel determined by the adjustment record is 150ms ago, it means that the current time is not the adjustment time, and it is determined that the adjustment conditions are not met.
[0227] If the last adjustment of the duration ratio of the first and second channels was made 200ms ago, then the current time is the adjustment time and the adjustment conditions are met.
[0228] For example, after obtaining the channel utilization of the first channel or the second channel, it can be determined whether the channel utilization of the first channel or the second channel is outside a preset range.
[0229] If the channel utilization of the first or second channel is outside the preset range, for example, if the channel utilization of the first or second channel is greater than 75% or less than 60%, then the adjustment conditions can be determined to be met.
[0230] If the channel utilization of the first or second channel is within the preset range, then the adjustment conditions are not met.
[0231] For example, the channel utilization of the first channel and / or the second channel in two consecutive transactions can also be obtained, and then it can be determined whether the difference between the channel utilization of the first channel and / or the second channel in two consecutive transactions is greater than an amplitude threshold.
[0232] When the difference between two consecutive channel utilization values of the first channel and / or the second channel is greater than the amplitude threshold, it indicates that the channel utilization value of the first channel or the second channel has a large change, which meets the adjustment conditions.
[0233] When the difference between two consecutive channel utilization values of the first channel and / or the second channel is less than or equal to the amplitude threshold, it indicates that the channel utilization value of the first channel or the second channel changes by a small amount and does not meet the adjustment conditions.
[0234] After determining that the adjustment conditions are met through the above implementation method, the duration ratio of the first channel and the second channel is adjusted within the time limit defined by the determination rule based on the utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0235] The specific implementation method for adjusting the duration ratio of the first channel and the second channel within the time limit defined by the determination rule based on the utilization rate of the first channel and / or the utilization rate of the second channel of the first device can refer to the above implementation method, and will not be repeated here in the embodiments of this disclosure.
[0236] refer to Figure 3 The channel occupancy method of this disclosure embodiment further includes:
[0237] S301: When it is determined that the first device needs to switch between the first channel and the second channel based on the duration ratio, the switching duration is determined according to the target switching mode;
[0238] S302: Within the switching duration, it is determined that the first device has completed the switching between the first channel and the second channel.
[0239] The target switching mode includes a first switching mode and a second switching mode.
[0240] When the target switching mode is the first switching mode, the switching duration is determined to be the first duration;
[0241] When the target switching mode is the second switching mode, the switching duration is determined to be the second duration;
[0242] The second duration is shorter than the first duration.
[0243] For example, when the switching mode is the first switching mode, the specific implementation process of the first device switching from the first channel to the second channel is as follows:
[0244] The first device sends a first prompt message to the second device, which prompts the second device to stop sending data frames to the first device through the first channel.
[0245] The first device starts timing at the same time as sending the first prompt message, and switches to the second channel after sending the first prompt message for a first duration;
[0246] The first device sends a second prompt message to the third device, which is used to prompt the third device that the first device has enabled the second channel;
[0247] The first device receives the response information sent by the third device based on the second prompt information;
[0248] Based on the response information, the first device sends service data to the third device via the second channel;
[0249] After the first device sends service data to the third device through the second channel for the second channel is open for a certain period of time, it sends a third prompt message to the third device. The third prompt message is used to prompt the third device that the first device will stop providing service data to the third device.
[0250] After sending the third prompt message for a first duration, the first device switches the channel to the first channel.
[0251] The first device can repeat the above process to switch between the first channel and the second channel multiple times.
[0252] For example, when the first device is a mobile phone, the second device is a wireless router, and the third device is a screen mirroring device, the communication channel between the first device and the second device is the Wi-Fi channel, and the communication channel between the first device and the third device is the P2P channel.
[0253] The specific process of a mobile phone switching from a Wi-Fi channel to a P2P channel is as follows:
[0254] The mobile phone sends a data frame with NullData PS=1 to the wireless router via the Wi-Fi channel, causing the wireless router to stop sending data to the mobile phone based on the data frame with NullData PS=1.
[0255] After the mobile phone sends a data frame with NullData PS=1 to the wireless router for the first duration, it switches from the Wi-Fi channel to the P2P channel and sends a data frame with NullData PS=0 to the screen projection device through the P2P channel.
[0256] The mobile phone receives the response information returned by the screen mirroring device based on the data frame with NullData PS=0;
[0257] Based on this response information, the mobile phone sends the necessary business data for screen projection to the screen projection device;
[0258] After the mobile phone opens the P2P channel for the preset channel opening time, it sends a data frame with NullData PS=1 to the screen projection device so that the screen projection device knows that the mobile phone will stop sending service data to the third device.
[0259] After the mobile phone sends a data frame with NullData PS=1 for the first duration, it turns on the Wi-Fi channel again and sends a data frame with NullData PS=0 to the wireless router through the Wi-Fi channel to prompt the wireless router to continue sending data to the mobile phone.
[0260] The mobile phone receives data sent by the wireless router.
[0261] When the target switching mode is the second switching mode, the implementation method of the first device switching from the first channel to the second channel or from the second channel to the first channel can refer to the above implementation method, and will not be repeated here in the embodiments of this disclosure.
[0262] It should be noted that when the target switching mode is the second switching mode, when the first device switches from the first channel to the second channel or from the second channel to the first channel, the first device switches to the second channel after sending the first prompt message for a second duration; the first device switches to the first channel after sending the third prompt message for a second duration.
[0263] The second duration can be a preset value, such as 2ms.
[0264] Since the second duration is shorter than the first duration, in the second handover mode, the handover time required for the first device to switch from the first channel to the second channel or from the second channel to the first channel is shorter, thus improving the channel utilization of the first and second channels.
[0265] In one embodiment, reference Figure 4 The handover process of the first device switching from the first channel to the second channel is as follows:
[0266] a: The timeout for sending NullData PS=1 is shortened to a maximum of 2ms;
[0267] b: The current channel dwell timeout of the device. If a takes up 2ms, then b is ignored.
[0268] c: PHY switching time, approximately 1ms;
[0269] Channel utilization rate = (Total channel usage time T x Total channel usage time + Total channel usage time R x Total channel usage time) / (Total channel sampling time – Channel busy time)
[0270] Under the premise of keeping the time-division ratio unchanged, increasing the time-division period reduces the number of handover groups per unit time, reduces handover costs, improves channel utilization (from the perspective of time-division loss), increases total data throughput, and reduces latency on the side with increased time-division; decreasing the time-division period increases the number of handover groups per unit time, increases handover costs, reduces channel utilization, reduces total data throughput, and increases latency on the side with decreased time-division.
[0271] With the time-division period remaining constant, increasing the time-division of the Wi-Fi channel reduces Wi-Fi latency and increases Wi-Fi throughput; increasing the time-division of the P2P channel reduces P2P latency and increases P2P throughput. To meet the requirements of high throughput and low latency as much as possible, the channel utilization rate of the P2P end should be kept at around 60%, as excessively high channel utilization will lead to increased latency.
[0272] Assuming the current transmission service requires constant bandwidth, the actual handover time is 15ms.
[0273] Group A: 30:70 (100ms per group), actually usable 15:55, 10 switch times / s
[0274] The minimum usable P2P connection within 1 second is 55 * 10 = 550 ms
[0275] The P2P ratio of 700 * 60% = 420ms - TRX indicates that the idle-time TRX is performing well and no changes are needed.
[0276] The P2P latency of 700 * 75% = 525ms - TRX represents a longer latency period due to retransmissions and increased channel delay.
[0277] Group B: 30:90 (120ms per group), actually usable 15:75, 8.33 switch times / s
[0278] The minimum usable P2P connection within 1 second is 75 * 8.33 = 624.75ms.
[0279] P2P 750*60%=450ms - Compared to the above ratio, increasing the proportion of P2P improves latency by reducing channel utilization (increasing the total channel sampling time).
[0280] Time-division dynamic adjustment based on channel utilization: Channel utilization is updated every 200ms.
[0281] A: If the channel utilization rate is less than 60%, and the current channel time-sharing interval allows for a reduction in time-sharing time, reduce the time-sharing time by 10ms. If it cannot be reduced, maintain the current channel time-sharing.
[0282] B: If the channel utilization rate is greater than 60% and less than 75%, add 10ms of time-sharing time if the time-sharing ratio interval allows for adding time-sharing time based on the current channel.
[0283] C: If the channel utilization rate is greater than 75%, and the time-sharing interval allows for the addition of time-sharing time based on the current channel, the time-sharing time will be increased to the maximum allowed time-sharing time in the current channel interval.
[0284] Based on the aforementioned channel switching period optimization and channel utilization statistics, and according to the foreground application type, three time-sharing intervals are defined: Mode 1, Mode 2, and Mode 3. After a mobile phone connects to a wireless router via Wi-Fi and then projects its screen to a projection device via P2P, the three low-latency processes are as follows:
[0285] S401: After the mobile phone enters the screen mirroring mode, the second channel switching mode described above in this embodiment can be used only when the wireless router and the screen mirroring device are on the same frequency band but have different frequencies.
[0286] S402: The phone starts the foreground application monitoring module and enables the first mode by default;
[0287] S403: In the first communication mode, the mobile phone sets the time-sharing ratio of the Wi-Fi channel and the P2P channel to 30:50-30:80.
[0288] S404: If the foreground application listening module detects a foreground application switching event, it determines whether the detected event is from a video playback application or a game application.
[0289] S405: If the application is identified as a video playback application, the phone switches to the second mode and sets the time-sharing ratio of the Wi-Fi channel and the P2P channel to 50:110-50:130.
[0290] S406: If the application is identified as a game, the phone switches to the third mode and sets the time-sharing ratio of the Wi-Fi channel and the P2P channel to 30:90-50:90.
[0291] S407: After the switch is complete, continue listening for foreground switch events.
[0292] Please refer to Figure 5 This disclosure provides a channel occupancy device, which includes:
[0293] The first determining module 501 is used to determine the target mode from multiple alternative modes based on the status information of the first device when the first device opens the first channel in a time-division multiplexing mode to communicate with the second device and opens the second channel in a time-division multiplexing mode to communicate with the third device; the first channel and the second channel are two channels with the same frequency band but different frequencies.
[0294] The second determining module 502 is used to determine the ratio of the duration of the first device activating the first channel and the second channel respectively, based on the target mode.
[0295] Optionally, the first determining module 501 is used for at least one of the following:
[0296] If the third device is the screen mirroring device of the first device, the target mode is determined from multiple alternative modes based on the source application of the service data provided by the first device to the third device;
[0297] If the third device is not the screen projection device of the first device, the target mode is determined from multiple alternative modes based on the communication status information of the first device communicating with the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
[0298] Optionally, the second determining module 502 includes:
[0299] The determining unit is used to determine the duration ratio determination rule based on the target pattern;
[0300] An adjustment unit is configured to adjust the duration ratio within a time limit defined by the determination rule, based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0301] Optionally, the adjustment unit is used for:
[0302] Determine whether the adjustment conditions are met;
[0303] When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0304] Optionally, the adjustment unit is specifically used for at least one of the following:
[0305] Based on the adjustment cycle and adjustment records, determine whether the current moment is an adjustment moment;
[0306] If the channel utilization of the first channel and / or the second channel is detected to be outside the preset range, it is determined that the adjustment conditions are met;
[0307] If the change in the utilization rate of at least one of the first channel and / or the second channel is detected to be greater than the magnitude threshold, it is determined that the adjustment condition is met.
[0308] Optionally, the adjustment period is a preset value;
[0309] or
[0310] The adjustment period is a preset multiple of the activation period, wherein the duration ratio is the allocation ratio within the activation time window of the first device activating the first channel and the second channel.
[0311] Optionally, the duration ratio is A / B; the alternative modes include:
[0312] In the first mode, A and / or B are adjusted such that the ratio of B to (A+B) is within a first range.
[0313] In the second mode, while A remains unchanged, B is adjusted within a second value range.
[0314] In the third mode, while B remains unchanged, A is adjusted within a third value range.
[0315] Optionally, the first determining module 501 is specifically used for at least one of the following:
[0316] If the source application is a first type of application, then the target mode is determined to be the first mode;
[0317] If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application;
[0318] If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the second type of application. When the source application is the third type of application, the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
[0319] Optionally, refer to Figure 6 The device further includes:
[0320] The third determining module 601 is used to determine the switching duration according to the target switching mode when the first device needs to switch between the first channel and the second channel based on the duration ratio.
[0321] The fourth determining module 602 is used to determine, within the switching duration, that the first device has completed the switching between the first channel and the second channel.
[0322] Optionally, the third determining module 601 is used to:
[0323] When the target switching mode is the first switching mode, the switching duration is determined to be the first duration;
[0324] When the target switching mode is the second switching mode, the switching duration is determined to be the second duration;
[0325] The second duration is shorter than the first duration.
[0326] refer to Figure 7 In this embodiment of the application, a first device 700 is provided, comprising:
[0327] Memory 704 is used to store processor-executable instructions;
[0328] Processor 720 is connected to memory 704;
[0329] The processor 720 is configured to execute the channel occupancy method provided by any of the aforementioned technical solutions.
[0330] A block diagram illustrating a first device 700 according to an exemplary embodiment. For example, the first device 700 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc.
[0331] refer to Figure 7The first 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.
[0332] Processing component 702 typically controls the overall operation of the first device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0333] Memory 704 is configured to store various types of data to support the operation of the first device 700. Examples of such data include instructions for any application or method operating on the first device 700, contact data, phonebook data, messages, pictures, videos, etc. 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 storage, flash memory, magnetic disk, or optical disk.
[0334] The power component 706 provides power to various components of the first device 700. The power component 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the first device 700.
[0335] Multimedia component 708 includes a screen that provides an output interface between the first 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the first device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0336] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when the first device 700 is in an operating mode, such as a call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0337] 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, home buttons, volume buttons, power buttons, and lock buttons.
[0338] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of the first device 700. For example, sensor assembly 714 may detect the on / off state of the first device 700, the relative positioning of components such as the display and keypad of the first device 700, changes in position of the first device 700 or a component of the first device 700, the presence or absence of user contact with the first device 700, the orientation or acceleration / deceleration of the first device 700, and temperature changes of the first device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0339] Communication component 716 is configured to facilitate wired or wireless communication between the first device 700 and other devices. The first device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0340] In an exemplary embodiment, the first 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 methods described above.
[0341] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of the first device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0342] This disclosure provides a non-transitory computer-readable storage medium that, when the instructions in the storage medium are executed by a computer's processor, enables the computer to perform the channel occupancy method described in one or more of the foregoing technical solutions.
[0343] When the processor executes the instruction, it is capable of performing at least the following steps:
[0344] When the first device opens the first channel in a time-division manner to communicate with the second device, and opens the second channel in a time-division manner to communicate with the third device, the target mode is determined from multiple alternative modes based on the status information of the first device; the first channel and the second channel are two channels with the same frequency band but different frequencies;
[0345] Based on the target mode, determine the ratio of the duration during which the first device activates the first channel and the second channel, respectively.
[0346] Optionally, determining the target mode from multiple alternative modes based on the status information of the first device includes at least one of the following:
[0347] If the third device is the screen mirroring device of the first device, the target mode is determined from multiple alternative modes based on the source application of the service data provided by the first device to the third device;
[0348] If the third device is not the screen projection device of the first device, the target mode is determined from multiple alternative modes based on the communication status information of the first device communicating with the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
[0349] Optionally, determining the ratio of the durations during which the first device activates the first channel and the second channel, respectively, according to the target mode, includes:
[0350] Based on the target pattern, determine the duration ratio determination rules;
[0351] The duration ratio is adjusted within the time limit defined by the determining rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0352] Optionally, adjusting the duration ratio within the time limit defined by the determining rule based on the channel utilization of the first channel of the first device and / or the channel utilization of the second channel of the first device includes:
[0353] Determine whether the adjustment conditions are met;
[0354] When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
[0355] Optionally, determining whether the adjustment conditions are met includes at least one of the following:
[0356] Based on the adjustment cycle and adjustment records, determine whether the current moment is an adjustment moment;
[0357] If the channel utilization of the first channel and / or the second channel is detected to be outside the preset range, it is determined that the adjustment conditions are met;
[0358] If the change in the utilization rate of at least one of the first and second channels is detected to be greater than the magnitude threshold, it is determined that the adjustment condition is met.
[0359] Optionally, the adjustment period is a preset value;
[0360] or
[0361] The adjustment period is a preset multiple of the activation period, wherein the duration ratio is the allocation ratio within the activation time window of the first device activating the first channel and the second channel.
[0362] Optionally, the duration ratio is A / B; the alternative modes include:
[0363] In the first mode, A and / or B are adjusted such that the ratio of B to (A+B) is within a first range.
[0364] In the second mode, while A remains unchanged, B is adjusted within a second value range.
[0365] In the third mode, while B remains unchanged, A is adjusted within a third value range.
[0366] Optionally, the step of determining the target mode from multiple alternative modes based on the source application of the service data provided by the first device to the third device includes at least one of the following:
[0367] If the source application is a first type of application, then the target mode is determined to be the first mode;
[0368] If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application;
[0369] If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the second type of application. When the source application is the third type of application, the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
[0370] Optionally, the method further includes:
[0371] When it is determined that the first device needs to switch between the first channel and the second channel based on the duration ratio, the switching duration is determined according to the target switching mode;
[0372] Within the switching duration, it is determined that the first device completes the switching between the first channel and the second channel.
[0373] Optionally, determining the switching duration based on the target switching mode includes:
[0374] When the target switching mode is the first switching mode, the switching duration is determined to be the first duration;
[0375] When the target switching mode is the second switching mode, the switching duration is determined to be the second duration;
[0376] The second duration is shorter than the first duration.
[0377] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0378] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A channel occupancy method, characterized in that, Performed by a first device, the method includes: When the first device opens the first channel in a time-division manner to communicate with the second device, and opens the second channel in a time-division manner to communicate with the third device, the target mode is determined from multiple alternative modes based on the status information of the first device; the first channel and the second channel are two channels with the same frequency band but different frequencies; Based on the target mode, determine the time ratio of the first device to activate the first channel and the second channel in a time-sharing manner; The step of determining the time ratio of the first device's time-sharing activation of the first channel and the second channel according to the target mode includes: Based on the target mode, a duration ratio determination rule is determined, wherein the duration ratio determination rule is different when the target mode is different among the multiple alternative modes, and the time limit range defined by the different duration ratio determination rules is different. The duration ratio is adjusted within the time limit defined by the determining rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
2. The method according to claim 1, characterized in that, The step of determining the target mode from multiple candidate modes based on the status information of the first device includes at least one of the following: If the third device is the screen mirroring device of the first device, the target mode is determined from multiple alternative modes based on the source application of the service data provided by the first device to the third device; If the third device is not the screen projection device of the first device, the target mode is determined from multiple alternative modes based on the communication status information of the first device communicating with the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
3. The method according to claim 1, characterized in that, The step of adjusting the duration ratio within the time limit defined by the determined rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device includes: Determine whether the adjustment conditions are met; When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
4. The method according to claim 3, characterized in that, Determining whether the adjustment conditions are met includes at least one of the following: Based on the adjustment cycle and adjustment records, determine whether the current moment is an adjustment moment; If the channel utilization of the first channel and / or the second channel is detected to be outside the preset range, it is determined that the adjustment conditions are met; If the change in the utilization rate of at least one of the first and second channels is detected to be greater than the magnitude threshold, it is determined that the adjustment condition is met.
5. The method according to claim 4, characterized in that, The adjustment period is a preset value; or The adjustment period is a preset multiple of the activation period, wherein the activation period is the sum of the activation durations of the first device activating the first channel and the second channel at a time.
6. The method according to claim 2, characterized in that, The duration ratio is A / B, where A and B are both positive integers and A / B is indivisible; the alternative modes include: In the first mode, the activation duration of the first channel and the activation duration of the second channel are adjusted, and the ratio of B to (A+B) is within a first value range. In the second mode, while keeping the activation duration of the first channel unchanged, the activation duration of the second channel is adjusted within a second value range. In the third mode, while keeping the activation duration of the second channel unchanged, the activation duration of the first channel is adjusted within a third value range.
7. The method according to claim 6, characterized in that, The method of determining a target mode from multiple alternative modes based on the source application of the service data provided by the first device to the third device includes at least one of the following: If the source application is a first type of application, then the target mode is determined to be the first mode; If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application; If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the first type of application, and the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
8. The method according to claim 1, characterized in that, The method further includes: When it is determined from the duration ratio that the first device needs to switch between the first channel and the second channel, the switching duration is determined according to the target switching mode; Within the switching duration, it is determined that the first device completes the switching between the first channel and the second channel.
9. The method according to claim 8, characterized in that, The step of determining the switching duration based on the target switching mode includes: When the target switching mode is the first switching mode, the switching duration is determined to be the first duration; When the target switching mode is the second switching mode, the switching duration is determined to be the second duration; The second duration is shorter than the first duration.
10. A channel occupancy device, characterized in that, Performed by a first device, the apparatus includes: The first determining module is used to determine the target mode from multiple alternative modes based on the status information of the first device when the first device opens the first channel in a time-division multiplexing mode to communicate with the second device and opens the second channel in a time-division multiplexing mode to communicate with the third device; the first channel and the second channel are two channels with the same frequency band but different frequencies. The second determining module is used to determine the time ratio of the first device to activate the first channel and the second channel in a time-sharing manner according to the target mode; The second determining module includes: The determining unit is configured to determine a duration ratio determination rule based on the target mode; wherein the duration ratio determination rule is different when the target mode is different among the multiple alternative modes, and the time limit range defined by the different duration ratio determination rules is different; An adjustment unit is configured to adjust the duration ratio within a time limit defined by the determination rule, based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
11. The apparatus according to claim 10, characterized in that, The first determining module is used for at least one of the following: If the third device is the screen mirroring device of the first device, the target mode is determined from multiple alternative modes based on the source application of the service data provided by the first device to the third device; If the third device is not the screen projection device of the first device, the target mode is determined from multiple alternative modes based on the communication status information of the first device communicating with the second and third devices respectively; wherein, the communication status information includes: communication frequency, communication data volume and / or single communication duration.
12. The apparatus according to claim 11, characterized in that, The adjustment unit is used for: Determine whether the adjustment conditions are met; When the adjustment conditions are met, the duration ratio is adjusted within the time limit defined by the determination rule based on the channel utilization rate of the first channel of the first device and / or the channel utilization rate of the second channel of the first device.
13. The apparatus according to claim 11, characterized in that, The duration ratio is A / B, where A and B are both positive integers and A / B is indivisible; the alternative modes include: In the first mode, the on-time of the first channel and / or the on-time of the second channel are adjusted, and the ratio of B to (A+B) is within a first value range. In the second mode, while keeping the activation duration of the first channel unchanged, the activation duration of the second channel is adjusted within a second value range. In the third mode, while keeping the activation duration of the second channel unchanged, the activation duration of the first channel is adjusted within a third value range.
14. The apparatus according to claim 13, characterized in that, The first determining module is specifically used for at least one of the following: If the source application is a first type of application, then the target mode is determined to be the first mode; If the source application is a second type of application, then the target mode is determined to be the second mode; wherein, when the source application is a second type of application, the amount of data provided to the third device per unit time is greater than when the source application is a first type of application; If the source application is a third type of application, then the target mode is determined to be the third mode. When the source application is the third type of application, the amount of data provided to the third device per unit time is greater than when the source application is the first type of application, and the amount of data provided to the third device per unit time is smaller than when the source application is the second type of application.
15. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of a computer, the computer is able to perform the channel occupancy method provided in any one of claims 1 to 9.
Citation Information
Patent Citations
Time slice configuration method and electronic equipment
CN114598414A