Communication resource scheduling method and electronic device
By temporarily switching channels in electronic devices and evaluating communication rates multiple times, the problem of inaccurate communication performance after channel switching is solved, more accurate channel performance evaluation and service data transmission is achieved, service lag is reduced, and user experience is improved.
Patent Information
- Application Number
- CN202110869494.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-04-28
- Filing Date
- 2021-07-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-07-30
AI Technical Summary
In electronic devices, when switching channel, the communication performance of the channel to be switched cannot be accurately characterized by the one-time detection result, resulting in an increase in the delay in service data transmission and deteriorating the user experience.
By switching channels temporarily multiple times and evaluating the communication rate of the channel after each handover, the communication performance of the channel is more accurately predicted. At the same time, the rate of service data generation is adjusted according to the overhead of the switching channel to reduce service lag.
It effectively reduces the lag in services on electronic devices, improves user experience, and more accurately determines channel performance through multiple evaluations, optimizing the channel switching process.
Smart Images

Figure CN115250492B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 28, 2021, with application number 2021104657949 and application name “Communication Resource Scheduling Method and Electronic Device”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of electronic technology, and in particular to a communication resource scheduling method and an electronic device. Background Art
[0003] With the development of communication technology and the popularization of smart devices, the era of artificial intelligence & internet of things (AIoT) is coming. Benefiting from the improvement of the distributed interconnection capability of the operating system, the interconnection of smart wearable devices, smart home devices, mobile terminals and other devices has been initially realized.
[0004] Electronic devices such as smart wearable devices, smart home devices, and mobile terminals can already interconnect with each other through wireless networks. However, electronic devices need to compete with other electronic devices for limited communication resources. When the competition fails, the data waiting to be sent needs to be stored locally and sent out after the next successful competition. The failure of electronic devices to compete for communication resources directly leads to service jams on the devices, affecting the user experience.
[0005] In order to reduce the impact of service jams on electronic devices and the user experience, a feasible approach is: when an electronic device uses the communication resources of channel 1 for data interaction, and the current communication performance of channel 1 cannot meet the needs of the electronic device, the electronic device actively switches to channel 2. When switching channels, the electronic device needs to sacrifice a part of the communication resources to send a detection frame to determine whether the communication performance of channel 2 can meet the needs of the service on the electronic device. The electronic device determines whether to switch to other channels based on the detection results of the detection frame.
[0006] However, considering the time-varying nature of the channel, the result of a single detection cannot accurately represent the communication performance of the channel to be switched. If the decision to switch to channel 2 is based on the result of this detection, but the communication performance of channel 2 is worse than that of channel 1, the delay of service data transmission is increased, which deteriorates the user experience. Summary of the invention
[0007] The embodiment of the present application provides a communication resource scheduling method, which includes: before the electronic device switches the channel, the service on the electronic device adjusts the rate at which the service generates data according to the overhead of the switching channel; when the electronic device switches the channel, the temporary channel change operation is performed multiple times, and the communication rate of the channel is evaluated in each temporary channel change operation, thereby more accurately predicting the communication performance of the channel to be switched. This method reduces the jamming of the service on the electronic device when the electronic device switches the channel, and improves the user experience.
[0008] In a first aspect, the present application provides a communication resource scheduling method, the method comprising: a first electronic device switches from a first channel to a second channel for the Kth time, where K is a positive integer; the first electronic device stays on the second channel for the Kth time, and the first electronic device determines that the communication performance of the second channel is the Kth performance; after the first electronic device stays on the second channel for the Kth time, the first electronic device switches back to the first channel; the first electronic device switches from the first channel to the second channel for the K+1th time; after the first electronic device stays on the second channel for the K+1th time, the first electronic device determines that the communication performance of the second channel is the K+1th performance; after the first electronic device determines that the communication performance of the second channel is better than the communication performance of the first channel based on the communication performance of the second channel obtained for at least two of the previous K+1 times, the first electronic device stays in the second channel, or the first electronic device switches back to the first channel and then switches to the second channel.
[0009] In the above embodiment, the electronic device implements progressive channel switching through multiple temporary channel changes, and evaluates the communication performance of the channel at each temporary channel change, and determines to switch to the second channel based on the results of multiple evaluations. Considering the time-varying nature of the communication performance of the channel, this method helps to more accurately evaluate the communication performance of the second channel. In addition, when the temporary channel changes, data is still transmitted, which reduces the delay caused by channel switching and improves the user experience.
[0010] In combination with some embodiments of the first aspect, in some embodiments, when the Kth performance is greater than the communication performance of the first channel, the K+1th time length is greater than or equal to the Kth time length; when the Kth performance is less than the communication performance of the first channel, the K+1th time length is less than or equal to the Kth time length.
[0011] In the above embodiment, the electronic device determines the dwell time on the second channel at the next temporary channel change according to the evaluation result of the second channel during the temporary channel change operation. Obviously, if the communication performance of the second channel is better than that of the first channel, increasing the dwell time can increase the data transmission rate of the service / application on the electronic device; if the communication performance of the second channel is worse than that of the first channel, reducing the dwell time can reduce the jamming of the service / application on the electronic device.
[0012] In combination with some embodiments of the first aspect, in some embodiments, the communication performance of the first channel is determined before the first electronic device switches from the first channel to the second channel for the Kth time; or, the communication performance of the first channel is determined before the first electronic device switches from the first channel to the second channel for the K+1th time.
[0013] In the above embodiments, taking into account the time-varying nature of channel communication performance, the timing for determining the communication performance of the first channel may be determined before switching to the second channel, or may be determined before switching from the second channel to the first channel, which helps to more accurately determine the communication performance of the first channel and improve the robustness of switching channels.
[0014] In combination with some embodiments of the first aspect, in some embodiments, before an electronic device switches from a first channel to a second channel for the Kth time, it also includes: a first application is running on the first electronic device, and the first application is configured with one or more communication performance parameter thresholds; the first electronic device determines that the communication performance of the first channel is lower than any one of the one or more communication performance parameter thresholds.
[0015] In the above embodiments, the application running on the electronic device configures one or more communication performance parameter thresholds, or the application running on the electronic device configures one or more communication performance parameter thresholds for a service, or the electronic device configures one or more communication performance parameter thresholds for the application / service, and when the communication performance of the first channel is lower than one or more communication performance parameter thresholds, the electronic device can start switching channels.
[0016] In combination with some embodiments of the first aspect, in some embodiments, before the first electronic device determines that the communication performance of the first channel is lower than any one of the one or more communication performance parameter thresholds, it also includes: the first electronic device adjusts the rate at which the first application generates data based on the communication performance of the first channel and the communication performance parameter threshold.
[0017] In the above embodiment, the electronic device can adjust the rate at which the application / service generates data based on the communication performance of the first channel, reduce the lag of the application / service, and thus improve the user experience.
[0018] In combination with some embodiments of the first aspect, in some embodiments, before the first electronic device switches from the first channel to the second channel for the Kth time, it also includes: a first application is running on the first electronic device; the first electronic device adjusts the rate at which the first application generates data based on the Kth duration and the overhead of the channel switching operation.
[0019] In the above embodiment, when the electronic device changes the temporary channel, it adjusts the rate at which the first application generates data by combining the dwell time and the overhead of the channel switching operation, which helps to reduce the lag during the temporary channel change and improve the robustness of the application / service data transmission.
[0020] In combination with some embodiments of the first aspect, in some embodiments, the first electronic device adjusts the rate at which the first application generates data based on the Kth duration and the overhead of the channel switching operation, specifically including: the first electronic device determines a Kth prediction value, which is the communication rate of the first application on the second channel; the first electronic device adjusts the rate at which the first application generates data based on the Kth prediction value, the Kth duration and the overhead of the channel switching operation.
[0021] In the above embodiment, when the electronic device changes the temporary channel, it adjusts the rate at which the first application generates data by combining the dwell time and the overhead of the channel switching operation, which helps to reduce the lag during the temporary channel change and improve the robustness of the application / service data transmission.
[0022] In combination with some embodiments of the first aspect, in some embodiments, the first electronic device determines the Kth prediction value, specifically including: before the first electronic device switches from the first channel to the second channel, the first electronic device determines the Kth prediction value through a short-range communication service, and the short-range communication service includes one or more of Bluetooth, Apple Wireless Direct Connection AWDL, ZigBee, and HiLink.
[0023] In the above embodiment, the electronic device can query other electronic devices on the second channel through the short-range communication service to determine the communication performance of the second channel, or monitor the broadcast channel specified in the short-range communication service to determine the communication performance of the second channel, and predict the rate at which the application / service transmits data on the second channel based on the communication performance, thereby improving the robustness of the application / service data transmission.
[0024] In combination with some embodiments of the first aspect, in some embodiments, the first electronic device determines the Kth prediction value, specifically including: if K is greater than 1, the first electronic device determines the Kth prediction value based on the K-1th performance.
[0025] In the above embodiment, the electronic device can predict the rate at which the application / service transmits data on the second channel during the current temporary channel change based on the evaluation result of the communication performance of the second channel during the last temporary channel change, thereby improving the robustness of the application / service data transmission.
[0026] In combination with some embodiments of the first aspect, in some embodiments, the first electronic device determines the Kth prediction value, which specifically includes: the first electronic device determines that the Kth prediction value is equal to 0.
[0027] In the above embodiment, taking into account the time-varying nature of the channel communication performance, the worst-case scenario can be prepared, that is, it is predicted that the rate at which the application / service transmits data on the second channel during this temporary channel change is 0, thereby ensuring that under any circumstances, the rate at which the application / service generates data based on the 0 rate will not cause the application / service to become stuck.
[0028] In combination with some embodiments of the first aspect, in some embodiments, after the first electronic device determines that the communication performance of the second channel is better than the communication performance of the first channel based on the communication performance of the second channel obtained for at least two of the previous K+1 times, the first electronic device stays in the second channel, or the first electronic device switches back to the first channel and then switches to the second channel, specifically including: when the K+1th performance is greater than the communication performance of the first channel, the first electronic device determines the K+2th time length, and the K+2th time length is greater than the K+1th time length; after the first electronic device determines that the K+2th time length is greater than the upper limit of the residence time, the first electronic device stays in the second channel, or the first electronic device switches back to the first channel and then switches to the second channel.
[0029] In the above embodiment, when the dwell time calculated for the next temporary channel change is greater than the dwell time upper limit, the electronic device determines that the communication performance of the second channel is better than the communication performance of the first channel. The judgment method is relatively simple, reducing the complexity of implementation.
[0030] In a second aspect, the present application provides another communication resource scheduling method, the method comprising: a first application is running on a first electronic device, and the first electronic device performs data interaction on a first channel; the first electronic device sends data of the first application at a first rate; before the first electronic device switches from the first channel to a second channel, the first electronic device determines a second rate; the first electronic device sends the data of the first application on the first channel and the second channel at the second rate, the first rate being different from the second rate; and the first electronic device switches back to the first channel.
[0031] In the above embodiment, in a single temporary channel change, the electronic device sends an application / service at a different data rate on the first channel and sends an application / service at a different data rate on the second channel. In a single temporary channel change, before the electronic device switches channels, the upper-layer application / service knows that the lower layer is going to switch to a channel, and actively cooperates to adjust the rate at which data is generated, which helps to reduce the freeze of the application / service.
[0032] In combination with some embodiments of the second aspect, in some embodiments, before the first electronic device sends data of the first application at a first rate, it also includes: at a first moment, the electronic device determines the communication performance of the first channel from a first moment to a second moment based on the communication performance of the first channel in one or more time slices before the first moment, and the second moment is after the first moment; the first electronic device determines a third rate based on the communication performance of the first channel from the first moment to the second moment; from the first moment to the second moment, the electronic device sends the data of the first application at the third rate, and the third rate is different from the first rate.
[0033] In the above embodiment, the electronic device can predict the communication performance of the first channel in the future and adjust the rate at which the application generates data based on the predicted value, which helps to reduce the time-varying channel communication performance that causes application / service jams.
[0034] In combination with some embodiments of the second aspect, in some embodiments, before the first electronic device switches from the first channel to the second channel, the first electronic device determines the second rate, specifically including: before the first electronic device switches from the first channel to the second channel, the first electronic device determines the second rate based on the communication performance of the first channel and the residence time of the first electronic device on the second channel.
[0035] In the above embodiment, the electronic device can determine the rate at which the application / service on the electronic device sends data on the second channel based on the residence time and the communication performance of the first channel, and adjust the rate at which the application / service generates data based on the rate, which helps to reduce the lag of the application / service when switching channels.
[0036] In combination with some embodiments of the second aspect, in some embodiments, before the first electronic device switches from the first channel to the second channel, the first electronic device determines the second rate, specifically including: before the first electronic device switches from the first channel to the second channel, the first electronic device determines the communication performance of the second channel through a short-range communication service, and the short-range communication service includes one or more of Bluetooth, Apple Wireless Direct Connection AWDL, ZigBee, and HiLink; the first electronic device determines the second rate based on the communication performance of the first channel, the communication performance of the second channel, and the residence time on the second channel.
[0037] In the above embodiment, the electronic device inquires the electronic device on the second channel through the short-distance service, and then determines the communication performance of the second channel; or the electronic device monitors the broadcast channel specified by the short-distance service, and then determines the communication performance of the second channel. After determining the communication performance of the second channel, the electronic device can more accurately predict the communication rate of the application / service on the second channel, and then determine a more accurate rate at which the application / service generates data, reducing the jamming of the application / service when switching channels.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store a computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: switching from a first channel to a second channel for the Kth time, where K is a positive integer; staying on the second channel for the Kth time, and determining that the communication performance of the second channel is the Kth performance; after staying on the second channel for the Kth time, switching back to the first channel; switching from the first channel to the second channel for the K+1th time; after staying on the second channel for the K+1th time, determining that the communication performance of the second channel is the K+1th performance; after determining that the communication performance of the second channel is better than the communication performance of the first channel based on the communication performance of the second channel obtained for at least two of the previous K+1 times, staying in the second channel, or switching back to the first channel and then switching to the second channel.
[0039] In combination with some embodiments of the third aspect, in some embodiments, when the Kth performance is greater than the communication performance of the first channel, the K+1th time length is greater than or equal to the Kth time length; when the Kth performance is less than the communication performance of the first channel, the K+1th time length is less than or equal to the Kth time length.
[0040] In combination with some embodiments of the third aspect, in some embodiments, the communication performance of the first channel is determined before the Kth switching from the first channel to the second channel; or, the communication performance of the first channel is determined before the K+1th switching from the first channel to the second channel.
[0041] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: running a first application, the first application being configured with one or more communication performance parameter thresholds; determining that the communication performance of the first channel is lower than any one of the one or more communication performance parameter thresholds.
[0042] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: adjusting the rate at which the first application generates data based on the communication performance of the first channel and the communication performance parameter threshold.
[0043] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: running a first application; adjusting the rate at which the first application generates data based on the Kth duration and the overhead of the channel switching operation.
[0044] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are specifically used to call the computer instructions to cause the electronic device to execute: determine the Kth prediction value, which is the communication rate of the first application on the second channel; adjust the rate at which the first application generates data based on the Kth prediction value, the Kth duration, and the overhead of the channel switching operation.
[0045] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are specifically used to call the computer instructions to enable the electronic device to execute: before switching from the first channel to the second channel, determine the Kth prediction value through a short-range communication service, and the short-range communication service includes one or more of Bluetooth, Apple Wireless Direct Connection AWDL, ZigBee, and HiLink.
[0046] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are specifically used to call the computer instruction to cause the electronic device to execute: if K is greater than 1, determine the Kth prediction value based on the K-1th performance.
[0047] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are specifically used to call the computer instruction to cause the electronic device to execute: determine that the Kth prediction value is equal to 0.
[0048] In combination with some embodiments of the third aspect, in some embodiments, the one or more processors are specifically used to call the computer instructions to cause the electronic device to execute: when the K+1 performance is greater than the communication performance of the first channel, determine the K+2th time duration, and the K+2th time duration is greater than the K+1th time duration; after determining that the K+2th time duration is greater than the upper limit of the residence time, stay in the second channel, or switch back to the first channel and then switch to the second channel.
[0049] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: a first application is running on a first electronic device, and data is exchanged on a first channel; data of the first application is sent at a first rate; before switching from the first channel to a second channel, a second rate is determined; the data of the first application is sent on the first channel and the second channel at the second rate, the first rate being different from the second rate; and switching back to the first channel.
[0050] In combination with some embodiments of the fourth aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: at a first moment, the electronic device determines the communication performance of the first channel from a first moment to a second moment based on the communication performance of the first channel in one or more time slices before the first moment, and the second moment is after the first moment; determines a third rate based on the communication performance of the first channel from the first moment to the second moment; and from the first moment to the second moment, the electronic device sends data of the first application at the third rate, and the third rate is different from the first rate.
[0051] In combination with some embodiments of the fourth aspect, in some embodiments, the one or more processors are specifically used to call the computer instructions to cause the electronic device to execute: before switching from the first channel to the second channel, determine the second rate based on the communication performance of the first channel and the residence time on the second channel.
[0052] In combination with some embodiments of the fourth aspect, in some embodiments, the one or more processors are specifically used to call the computer instructions to enable the electronic device to execute: before switching from the first channel to the second channel, determine the communication performance of the second channel through a short-range communication service, the short-range communication service including one or more of Bluetooth, Apple Wireless Direct Connection AWDL, ZigBee, and HiLink; determine the second rate based on the communication performance of the first channel, the communication performance of the second channel, and the residence time on the second channel.
[0053] In the fifth aspect, an embodiment of the present application provides a chip, which is applied to an electronic device, and the chip includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes the method described in the first aspect, the second aspect, and any possible implementation method of the first aspect and the second aspect.
[0054] In a sixth aspect, an embodiment of the present application provides a computer program product comprising instructions. When the above-mentioned computer program product runs on an electronic device, the above-mentioned electronic device executes the method described in the first aspect, the second aspect, and any possible implementation method of the first aspect and the second aspect.
[0055] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions. When the above instructions are executed on an electronic device, the above electronic device executes the method described in the first aspect, the second aspect, and any possible implementation method of the first aspect and the second aspect.
[0056] It is understandable that the electronic devices provided in the third and fourth aspects, the chip provided in the fifth aspect, the computer program product provided in the sixth aspect, and the computer storage medium provided in the seventh aspect are all used to execute the methods provided in the embodiments of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is an exemplary schematic diagram of the business involved in this application;
[0058] Figure 2 This is an exemplary schematic diagram of a scenario in which a service adjusts the communication rate in an embodiment of the present application;
[0059] Figure 3 An exemplary schematic diagram of an electronic device predicting a physical layer communication rate in an embodiment of the present application;
[0060] Figure 4 An exemplary schematic diagram of an electronic device performing a temporary channel change operation in an embodiment of the present application;
[0061] Figure 5 An exemplary schematic diagram of predicting the physical layer communication rate of a service when a temporary channel is changed in an embodiment of the present application;
[0062] Figure 6 This is an exemplary schematic diagram of the channel switching method involved in the present application;
[0063] Figure 7 An exemplary schematic diagram of a usage scenario of the communication resource scheduling method provided by this application;
[0064] Figure 8 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;
[0065] Fig. 9 Another structural schematic diagram of the electronic device 100 provided in an embodiment of the present application;
[0066] Fig.10 A schematic block diagram of a software structure of the electronic device 100 in an embodiment of the present application;
[0067] Fig.11 is another schematic block diagram of the software structure of the electronic device 100 in the embodiment of the present application;
[0068] Fig.12 An exemplary schematic diagram of the communication resource scheduling method provided in this application;
[0069] Fig.13 An exemplary schematic diagram of an electronic device predicting a physical layer communication rate before performing a temporary channel change operation provided by an embodiment of the present application;
[0070] Fig.14 An exemplary schematic diagram of the relationship between the communication rates of different channels provided by the service judgment of the embodiment of the present application;
[0071] Fig.15 An exemplary schematic diagram of an electronic device provided in an embodiment of the present application staying in the B channel;
[0072] Fig.16 An exemplary schematic diagram of a channel switching scenario of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "the", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.
[0074] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0075] For ease of understanding, the following first introduces the relevant terms and concepts involved in the embodiments of the present application. The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.
[0076] (1) Wireless Channel
[0077] A wireless channel is a channel that uses wireless signals as a transmission carrier to transmit data. Frequency and bandwidth can be used to describe a wireless channel, and they together determine the frequency range of signals transmitted on the channel. In a P2P scenario, the available frequency bands of wireless channels include: Industrial Scientific and Medical (ISM) bands and unlicensed bands.
[0078] The communication performance of a wireless channel may include channel delay, communication rate, etc. Channel delay is the time it takes for the wireless channel to transmit data from one end to the other; communication rate is the number of information bits correctly transmitted by the wireless channel per unit time.
[0079] In the Open System Interconnection (OSI) model, wireless channels are located at the physical layer.
[0080] It is worth noting that the communication performance of the wireless channel is time-varying, that is, it is impossible to accurately determine the communication performance of the wireless channel within a certain period of time in the future.
[0081] (2) Communication rate requirements
[0082] The communication rate may be the ratio of the amount of data transmitted by the service to the transmission time. The communication rate may also be referred to as the throughput of the service, where the throughput is the ratio of the amount of data transmitted by the physical layer to the transmission time. The amount of data of the service may be the actual amount of data of the service; or the amount of data of the service may be the sum of the actual amount of data of the service and the overhead. The service may be an application / service session running on an electronic device.
[0083] The communication rate requirement is one or more thresholds configured by the service for the communication rate parameter according to the service requirement. The communication rate requirement may be pre-configured for the service. The service may adjust the rate at which the service generates data according to the communication rate and the communication rate requirement.
[0084] It is understandable that the business adjusts the rate at which the business generates data based on the relationship between the communication rate and the communication rate requirement, so that the rate at which the business generates data is less than or equal to the communication rate, reducing the backlog of business data locally, thereby reducing business jams and improving user experience.
[0085] It is worth noting that the communication rate does not indicate the physical layer negotiation rate.
[0086] Combine the following Figure 1 The content shown is an exemplary introduction to the communication rate requirements.
[0087] Figure 1 This is an exemplary diagram of the business involved in this application.
[0088] like Figure 1 As shown, the user projects the online video content being played on the mobile phone onto the projector through the router. The projection service may be a video application that plays the video, or the projection service may be a projection service session created by the video application.
[0089] exist Figure 1 In the content shown, the format of the video played on the mobile phone is: 1080P, 60 frames. The electronic device can configure at least one communication rate requirement for the projection service, as shown in Table 1 below.
[0090] Table 1 is an exemplary schematic table of the communication rate requirements involved in this application.
[0091]
[0092] As shown in Table 1, Figure 1 In the scenario shown, the communication rate requirement is the minimum physical layer communication rate required when the projection service on the mobile phone transmits videos with different bit rates and frame rates. Figure 1 The scenario shown is the rate at which video data is transmitted on a channel established by a router for projection services.
[0093] For example, when the format of the video transmitted by the projection service on the mobile phone is: 30FPS, 480P, and the communication rate of the service is 180kbps, the communication rate of the wireless channel carrying the projection service data interaction should be greater than 180kbps. For example, when the format of the transmitted video is: 30FPS, 480P, the communication rate requirement can be configured to be 200kbps.
[0094] If the communication rate of the wireless channel is less than 200kbps, the data of the projection service cannot be sent to the projector in time, and the user will feel a lag; on the contrary, if the communication rate of the wireless channel is greater than or equal to 200kbps, the data of the projection service can be sent to the projector in time, and the user will not feel a lag.
[0095] In the embodiment of the present application, when developing an application program / service session, a software developer may configure at least one communication rate requirement for the application program / service session.
[0096] Figure 2 This is an exemplary schematic diagram of a scenario in which the communication rate of a service is adjusted in an embodiment of the present application.
[0097] like Figure 2As shown, the projection service on the mobile phone periodically predicts the communication rate of the wireless channel, and the format of the video transmitted by the projection service on the mobile phone is 1080P, 60FPS. Before 1.3 seconds, the mobile phone predicts that the communication rate of the wireless channel from 1.3 seconds to 1.4 seconds is 700kbps; at 1.3 seconds, the mobile phone adjusts the format of the video transmitted by the projection service to 720P, 60FPS. After 1.4 seconds and before 2.1 seconds, the mobile phone predicts that the communication rate of the wireless channel from 2.1 seconds to 2.3 seconds is 2048kbps. At 2.1 seconds, the mobile phone adjusts the format of the video transmitted by the projection service to 1080P, 60FPS.
[0098] It is understandable that by predicting the communication rate of the physical layer and combining it with the communication rate requirements of the service, the service can adjust the communication rate of the service according to the predicted communication rate of the physical layer to improve the user experience. The concepts of terms such as the communication rate of the physical layer can refer to the text description in (3) Predicting the communication rate of the physical layer in the explanation of terms, which will not be repeated here.
[0099] (3) Predicting the physical layer communication rate
[0100] The physical layer communication rate is the data throughput rate of the electronic device sending the service. For example, when the electronic device accesses the Internet through the WiFi of the router, for a certain service running on the electronic device, the physical layer communication rate is the amount of data / time that the electronic device sends the service through the WiFi of the router. Alternatively, when the electronic device supports functions such as multi-network aggregation or WiFi+4G simultaneous residence, the physical layer communication rate is the total amount of data / time that the electronic device sends the service on multiple paths. The data volume of the service may include control data or may not include control data.
[0101] In an embodiment of the present application, the electronic device can determine the physical layer communication rate of the service in the next time slice based on the effective throughput (good put) of the service in the past one or more time slices, the load of the channel where the service is located, the data frame delay and other information. Among them, the time lengths of the past one or more time slices used to estimate the physical layer communication rate in the next time slice can be the same or different.
[0102] Below Figure 3 Taking the content shown as an example, the specific introduction service predicts the physical layer communication rate of the service in the next time slice based on the effective throughput in the past three time slices.
[0103] For the sake of convenience, the following text uses 2.4G channel to refer to a channel in the 2.4G frequency band provided by the router; 5G channel refers to a channel in the 5G frequency band provided by the router; 5G high-frequency channel refers to the channel in the 5.2Ghz low-frequency band provided by the router, such as the channels numbered 36, 40, 44, 52, 60, 64 in the WiFi protocol, etc.; 5G low-frequency channel refers to the channel in the 5.8Ghz high-frequency band provided by the router, such as the channels numbered 149, 153, 157, 161, 165, etc. in the WiFi protocol.
[0104] Figure 3 An exemplary schematic diagram of predicting the physical layer communication rate of an electronic device in an embodiment of the present application.
[0105] like Figure 3 As shown, the service on the electronic device exchanges data on a channel in the 2.4G frequency band provided by the router. At 1.9 seconds, the service on the electronic device needs to predict the physical layer communication rate. The service can use the three time slices before 1.9 seconds to predict the physical layer communication rate after 1.9 seconds, that is, predict the communication rate of the service on the 2.4G channel. Among them, the length of the time slice can be selected as 500 milliseconds, that is, time slice 1: 0.4 seconds to 0.9 seconds, time slice 2: 0.9 seconds to 1.4 seconds, time slice 3: 1.4 seconds to 1.9 seconds.
[0106] The service can count the effective throughput in three time slices, which are: 800KB transmitted in time slice 1, 840KB transmitted in time slice 2, and 850KB transmitted in time slice 3. The service determines the physical layer communication rates in time slice 1, time slice 2, and time slice 3 to be 1600kbps, 1680kbps, and 1700kbps, respectively, based on the duration of the time slices and the effective throughput of the service in the time slices. Based on the physical layer communication rates in the past three time slices, the service can predict that the physical layer communication rate from 1.9 seconds to 2.4 seconds is 1660kbps through function fitting, neural networks, or deep learning.
[0107] (4) Temporary channel change
[0108] In the embodiment of the present application, the electronic device performing a temporary channel change operation refers to a process in which the electronic device switches from channel A to channel B, stays on channel B for a period of time, and then returns to channel A.
[0109] In an embodiment of the present application, the electronic device on channel A determines whether to stay in channel A or switch to channel B after performing multiple temporary channel change operations.
[0110] During the time the electronic device stays on the B channel, the electronic device will perform a channel evaluation operation. Here, the channel evaluation is an operation performed when the electronic device stays on the switched channel, and is used to determine the data transmission rate of the service on the switched channel. And within the residence time T, the electronic device will perform data interaction and channel evaluation simultaneously. After the electronic device performs a temporary channel change, it will determine the communication rate of the service on the switched channel.
[0111] For example, if the electronic device switches from channel A to channel B, the residence time is 400 milliseconds, and the data frame transmitted in 300 milliseconds is 600 kb, then the channel evaluation result of the electronic device for channel B is 600 kb / 0.3 seconds = 2000 kbps.
[0112] If the communication rate of the service on the B channel is greater than α times the communication rate of the A channel, then the next time it stays on the B channel, it will stay on the B channel for a longer time T2, where T2 ≥ T1; if the communication rate of the service on the B channel is less than α times the communication rate of the A channel before switching, then the next time it stays on the B channel, it will stay on the B channel for a shorter time T2, where T2 < T1. Here, α is a positive number greater than or equal to 1. For example, α can be equal to 1. That is, each time the electronic device performs a temporary channel change process, the residence time on the B channel can be different.
[0113] When the service determines that the updated residence time is greater than or equal to the residence time upper bound, the service can notify the electronic device to stay on the B channel and end the channel switching; when the service determines that the updated residence time is less than or equal to the residence time lower bound, the service can notify the electronic device to stay on the A channel and end the channel switching. Or, when the number of times the electronic device switches channels exceeds the number threshold, it can determine whether to stay on the B channel or the A channel by synthesizing the results of multiple channel evaluations.
[0114] In some embodiments of the present application, when the electronic device performs a temporary channel change operation, it can determine the communication rate of the service on the switched channel.
[0115] The following takes Figure 4 the content shown as an example to specifically introduce the process of the electronic device performing a temporary channel change operation.
[0116] Figure 4 This is an exemplary schematic diagram of the electronic device performing a temporary channel change operation in an embodiment of the present application.
[0117] As Figure 4As shown, from 0.4 seconds to 0.9 seconds, the electronic device performs data interaction on a channel in the 2.4G frequency band provided by the router. At 0.9 seconds, the electronic device starts to perform the first temporary channel change operation. At 1 second, the electronic device simultaneously performs data interaction and channel evaluation on a channel in the 5G frequency band provided by the router. At 1.3 seconds, the electronic device ends its first stay on the 5G channel, and the communication rate of the service on the 5G channel is 700kbps, which is greater than the communication rate of the service on the 2.4G channel, 400kbps. At 1.4 seconds, the electronic device returns to the 2.4G channel. At 1.4 seconds, the first temporary channel change operation ends.
[0118] At 1.8 seconds, the electronic device begins to perform the second temporary channel change operation. At 2 seconds, the electronic device performs data interaction and channel evaluation on the 5G channel at the same time. The communication rate of the service on the 5G channel is 650kbps, which is greater than the communication rate of the 2.4G channel, which is 550kbps. At 2.5 seconds, the electronic device ends its second stay on the 5G channel. That is, at 2.5 seconds, the second temporary channel change operation ends.
[0119] Since the results of the two channel detections both show that the communication rate of the 5G channel is greater than the communication rate of the 2.4G channel, the electronic devices can completely switch to the 5G channel for data interaction.
[0120] exist Figure 4 In the content shown, the first residence time of the electronic device in the 5G channel is 0.3 seconds, and the second residence time is 0.6 seconds. Before performing a temporary channel change operation, the electronic device may not be able to know in advance the communication rate of the service on the channel after switching. In order to avoid the low communication rate of the channel after switching, causing the service to freeze and affect the user experience. Therefore, before performing a temporary channel change operation, the electronic device can adjust the rate at which the service generates data in combination with the communication rate requirements of the service and the predicted physical layer communication rate.
[0121] For example, when the communication rate of the channel before switching is TP1, the switching channel delay is cost, the dwell time is T1, and when the electronic device completes a temporary channel change operation within the time TS, the predicted physical layer communication rate TP3 = k*TP1, where k is a positive number. For example, k = (TS-T1-1-cost*2) / TS. The service can adjust the rate at which the service generates data based on the predicted physical layer communication rate.
[0122] Furthermore, when the electronic device performs the temporary channel change operation for the Lth time, the service can predict the communication rate of the service on the channel after switching based on the results of the channel evaluation in the first to L-1 temporary channel change operations. Wherein, L is an integer greater than 1. Based on the communication rate of the service predicted on the channel after switching and the communication rate of the service on the channel before switching, the communication rate of the physical layer can be predicted more accurately.
[0123] For example, when the communication rate of the channel where the electronic device is located is TP1, the communication rate of the channel where the electronic device resides is predicted to be TP2, the channel switching delay is cost, the residence time is T1, and when the electronic device completes a channel residence operation within the time TS, the predicted physical layer communication rate TP3 = k1*TP1+k2*TP2, where k1 and k2 are both positive numbers. For example, k1 = (TS-T1-1-cost*2) / TS, k2 = T1 / TS.
[0124] For details on how the service adjusts the rate at which the service generates data based on the predicted physical layer communication rate, please refer to the text description in (2) Communication rate requirement in the term explanation, which will not be repeated here.
[0125] Below Figure 5 Taking the content shown as an example, a method for an electronic device to predict the communication rate of the physical layer before performing a temporary channel change operation is specifically introduced.
[0126] Figure 5 This is an exemplary schematic diagram of predicting the physical layer communication rate of a service when a temporary channel is changed in an embodiment of the present application.
[0127] like Figure 5 As shown, the electronic device determines at 0.4 seconds that the first temporary channel change operation will be performed in the future, and at 0.4 seconds the service and / or physical layer on the electronic device determines to start the first temporary channel change operation at 0.9 seconds, and the residence time in the 5G channel is 0.3 seconds, and the delay of a single channel switching is 0.1 seconds.
[0128] Combined with the contents shown in Table 1, from 0 seconds to 0.4 seconds, the format of the video transmitted by the projection service is: 480P, 60FPS. At 0.4 seconds, the electronic device predicts that the physical layer communication rate from 0.4 seconds to 1.4 seconds is 400kbps*(1-(0.1*2+0.3))*1=200kbps. Combined with the expected physical layer communication rate and the communication rate requirement of the projection service, the electronic device can reduce the format of the video transmitted by the projection service to reduce the communication rate of the projection service. That is, the electronic device reduces the projection service video format to: 480P, 30FPS.
[0129] exist Figure 5In the content shown, if the communication rate of the service on the 5G channel is greater than or equal to 400kbps, the service can run normally and the user experience is not affected; if the communication rate of the service on the 5G channel is lower than 400kbps but greater than or equal to 200kbps, the service can run normally and the user experience is not affected; if the communication rate of the service on the 5G channel is lower than 200kbps, the user experience is slightly affected because the service has pre-reduced the rate at which data is generated.
[0130] It is understandable that for the service, considering that the channel switching operation will inevitably bring about fluctuations in the physical layer communication rate, by reducing the rate at which the service generates data in advance and reducing the demand for the physical layer communication rate, the user experience of the service can still be guaranteed when the physical layer communication rate fluctuates.
[0131] It is worth noting that when the electronic device performs the temporary channel change operation for the last time, it may not return to channel A, but may choose to stay in channel A or switch to channel B based on the results of channel evaluation in multiple temporary channel change operations.
[0132] Next, a channel switching method related to the present application is briefly introduced below. The method uses non-data frames to detect the communication performance of the channel to be switched, thereby reducing the dwell time on the channel to be switched. The electronic device determines whether to switch the channel based on a single detection result of the non-data frame.
[0133] Figure 6 This is an exemplary schematic diagram of the channel switching method involved in the present application.
[0134] like Figure 6 As shown, the electronic device starts switching channels at 0.9 seconds, switches to the 5G channel at 1 second, and starts sending detection frames such as Null Data Packet (NDP) frames to determine the communication rate of the 5G channel. It starts returning to the 2.4G channel at 1.3 seconds and returns to the 2.4G channel at 1.4 seconds.
[0135] It is understandable that, considering that the electronic device is unknown about the communication performance of the channel to be switched, it is beneficial to select detection frames that do not carry data as much as possible and reduce the duration of sending detection frames on the channel to be switched, taking the worst-case scenario into consideration.
[0136] However, according to Figure 6From the content shown, we can know that for the service, from 0.9 seconds to 1.4 seconds, the service cannot interact with data, and there is a serious freeze, which affects the user experience. Secondly, because the physical layer performs the channel switching operation without informing the upper-layer service, the upper-layer service will inevitably freeze when the network is disconnected, which may prompt the user of service crashes, abnormal errors, etc., affecting the user experience. Thirdly, considering the time-varying nature of the physical layer communication rate, only detecting the communication rate of the 5G channel once, the detection result this time cannot fully represent the communication rate of the service on the 5G channel. When the electronic device switches from the 2.4G channel to the 5G channel, the communication rate of the service on the 5G channel may be lower than the communication rate on the 2.4G channel, which affects the normal operation of the service and thus affects the user experience.
[0137] In response to the above-mentioned problems, the present application provides a communication resource scheduling method and electronic device.
[0138] Figure 7 An exemplary schematic diagram of a usage scenario of the communication resource scheduling method provided in the present application.
[0139] like Figure 7 As shown, at 0.6 seconds, the electronic device negotiates with the business and the physical layer to determine whether to perform a temporary channel change operation. When the electronic device determines to start the temporary channel change operation at 0.9 seconds, the electronic device predicts the physical layer transmission rate from 0.9 seconds to 1.4 seconds, and dynamically adjusts the rate at which the data generated by the business on the electronic device is generated according to the physical layer transmission rate. At 1 second, the electronic device switches to the 5G channel and performs channel evaluation on the 5G channel while transmitting the data generated by the business on the 5G channel. By calculating the effective throughput and residence time of the business on the 5G channel, the communication rate of the business on the 5G channel can be determined. At 1.4 seconds, the electronic device returns to the 2.4G channel. That is, at 1.4 seconds, the first temporary channel change operation of the electronic device ends.
[0140] Since the communication rate of the service on the 5G channel (500kbps) is greater than the communication rate of the service on the 2.4G channel (400kbps), the electronic device will increase the next residence time on the 5G channel when performing the next temporary channel change operation. After repeating the above operation several times, the electronic device finally determines to switch from the 2.4G channel to the 5G channel.
[0141] First, the communication resource scheduling method provided by the present application performs data interaction and channel evaluation on the switched 5G channel at the same time, which improves the utilization rate of communication resources and helps to improve the user experience. Secondly, before each temporary channel change operation is performed, the service on the electronic device will negotiate with the physical layer to determine whether to switch the channel or negotiate to determine whether to switch the channel and the time to switch the channel, so that the service can adjust the rate at which data is generated, avoiding service jams caused by the low communication rate of the switched 5G channel, thereby improving the user experience. Thirdly, by performing temporary channel change operations multiple times, the communication rate of the service on the 5G channel can be more accurately evaluated, which helps to improve the stability of the service and thus improve the user experience.
[0142] Next, the electronic device provided by this application is introduced below:
[0143] The electronic device in the embodiment of the present application may be a mobile electronic device or a PC, which is not limited here.
[0144] For example, Figure 8 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application.
[0145] The embodiment is described in detail below by taking the electronic device 100 as an example. It should be understood that the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0146] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194 and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0147] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0148] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0149] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0150] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0151] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0152] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transmission between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0153] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0154] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0155] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
[0156] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0157] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0158] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0159] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0160] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0161] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0162] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0163] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0164] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0165] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0166] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0167] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0168] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0169] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0170] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0171] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.
[0172] Non-volatile memory may include disk storage devices and flash memory.
[0173] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[0174] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0175] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0176] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0177] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0178] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0179] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0180] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0181] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0182] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0183] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0184] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0185] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0186] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications.
[0187] In the embodiment of the present application, the processor 110 can call the computer instructions stored in the internal memory 121 to enable the electronic device 100 to execute the communication resource scheduling method in the embodiment of the present application.
[0188] For example, Fig. 9 Another structural schematic diagram of the electronic device 100 provided in an embodiment of the present application.
[0189] like Fig. 9 As shown, the electronic device 100 includes:
[0190] An input device 201, an output device 202, a processor 203 and a memory 204 (wherein the number of the processor 203 in the electronic device 100 can be one or more, Fig. 9 In some embodiments of the present application, the input device 201, the output device 202, the processor 203 and the memory 204 may be connected via a bus or other means, wherein: Fig. 9 The example of connecting through bus is taken in the following.
[0191] The processor 203 calls the operation instructions stored in the memory 204 to enable the electronic device 100 to execute the communication resource scheduling method in the embodiment of the present application.
[0192] For example, Fig.10 It is a schematic block diagram of the software structure of the electronic device 100 in the embodiment of the present application.
[0193] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, application framework layer, system library, and kernel layer.
[0194] The application layer can include a series of application packages.
[0195] like Fig.10 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications (also referred to as applications). Any application may be a service in the embodiment of the present application. Moreover, any application may be configured with a communication rate requirement.
[0196] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0197] like Fig.10 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a local profile assistant (LPA), and the like.
[0198] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0199] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0200] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0201] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0202] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0203] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications from applications running in the background, or a notification that appears on the screen in the form of a dialogue interface. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0204] The application framework layer may also include a wireless transmission service for providing configurable and differentiated wireless communication capabilities for applications of different application layers or service sessions initiated by applications.
[0205] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
[0206] The core library consists of two parts: one part is the function that the Java language needs to call, and the other part is the core library.
[0207] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0208] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0209] Corresponding to the wireless transmission service, the system library also includes a wireless transmission service library, and the wireless transmission service library is configured with the implementation method of the communication resource scheduling method provided by this application. Specifically, the wireless transmission service can provide a method to configure one or more communication rate requirements of the service; the wireless transmission service provides a method to predict the physical layer communication rate; the wireless transmission service can provide a method to evaluate the physical layer communication rate after the channel switches, etc., which is not limited here.
[0210] The surface manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0211] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0212] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0213] A 2D graphics engine is a drawing engine for 2D drawings.
[0214] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and virtual card driver.
[0215] The kernel layer may also include a network card driver for carrying data interaction, including: performing channel switching operations, sending / receiving service data, evaluating / predicting the physical layer communication rate, etc.
[0216] It is worth noting that when developing applications, developers configure the methods in the wireless transmission service library so that when the application uses the wireless transmission service, it can directly interact with the network card driver at the kernel layer and implement the communication resource scheduling method provided in this application.
[0217] For example, the application can interact with the network card driver of the kernel layer to obtain the communication rate of the application on the current channel. When the application determines that the communication rate is lower than the maximum communication rate requirement, it can negotiate with the network card driver to determine the timing of switching channels and the residence time on the channel after switching. Alternatively, the application sends a request to switch channels to the network card driver, and after the network card driver determines the timing of switching channels and the residence time on the channel after switching, it informs the application of the timing of switching channels and the residence time on the channel after switching. After determining the timing of switching channels and the residence time on the channel after switching, the application can timely adjust the rate at which the application produces data.
[0218] For example, Fig.11 Schematic diagram of another software structure of the electronic device 100 in the embodiment of the present application.
[0219] In some embodiments, the system is divided into four layers, namely, application layer, framework layer, system service layer, and kernel layer from top to bottom.
[0220] The application layer includes system applications and third-party non-system applications.
[0221] The framework layer provides multi-language user program frameworks and capability frameworks such as JAVA / C / C++ / JS for the application layer applications, as well as multi-language framework APIs open to the outside world for various software and hardware services.
[0222] The system service layer includes: system basic capability subsystem set, basic software service subsystem set, enhanced software service subsystem set, and hardware service subsystem set.
[0223] Among them, the system basic capability subsystem set supports the operation, scheduling, migration and other operations of the operating system on multiple devices. The system basic capability subsystem set may include: distributed soft bus, distributed data management, distributed task scheduling, common basic subsystem, etc. The system service layer and the framework layer jointly implement the multi-mode input subsystem, the graphics subsystem, etc. The communication resource collaboration method provided in this application may be located in the distributed soft bus.
[0224] Among them, the basic software service subsystem set provides public and general software services for the operating system, which may include: event notification subsystem, multimedia subsystem, etc.
[0225] Among them, the enhanced software service subsystem set provides differentiated software services for different devices and may include: IOT proprietary business subsystem.
[0226] Among them, the hardware service subsystem set provides hardware services for the operating system and may include: IOT proprietary hardware service subsystem.
[0227] It is worth noting that, according to the deployment environment of different device forms, the above-mentioned system basic capability subsystem set, basic software service subsystem set, enhanced software service subsystem set, and hardware service subsystem set can be re-divided according to other functional granularities.
[0228] The kernel layer includes the kernel abstraction layer and the driver subsystem. The kernel abstraction layer includes multiple kernels and provides basic kernel capabilities to the upper layer by shielding the differences between multiple kernels, such as thread / process management, memory management, file system, network management, etc. The driver subsystem provides software developers with unified peripheral access capabilities and a driver development and management framework.
[0229] When configuring the communication resource scheduling method provided in this application, software developers can configure relevant parameters in the distributed soft bus, driver subsystem, IOT proprietary business subsystem or IOT proprietary hardware service subsystem. Furthermore, the application in the application layer can implement the communication resource scheduling method provided in this application. Among them, the configuration of relevant parameters may include: negotiating with the application to configure the communication rate requirement, configuring the residence time T, and the update method of the residence time T, etc.
[0230] It is worth noting that, depending on the operating system and possible future upgrades, the software structure of the electronic device can be divided in other ways based on the operating system.
[0231] Finally, the communication resource scheduling method provided by this application is introduced below:
[0232] Fig.12 An exemplary schematic diagram of the communication resource scheduling method provided in this application.
[0233] Understandably, Fig.12 One or more steps in the method are optional, and one or more steps can be selected to form a new embodiment, which is also within the protection scope of the present application.
[0234] When an electronic device on channel A wants to switch to channel B, it performs temporary channel change operations multiple times, and then performs channel evaluation on channel B multiple times to more accurately determine the communication performance of channel B. In addition, based on the result of the channel evaluation in the Mth temporary channel change operation, the length of time the electronic device stays on channel B for the M+1th time can be dynamically adjusted, which is beneficial to reducing service jams when switching channels.
[0235] like Fig.12 As shown, the communication resource scheduling method provided by the present application includes:
[0236] S1201: In response to establishment of the service, the electronic device starts transmitting data of the service on the A channel.
[0237] In the embodiment of the present application, the service is configured with at least one communication rate requirement.
[0238] In some embodiments of the present application, the electronic device may configure a communication rate requirement for a service that does not have a communication rate requirement configured. For example, different types of communication rate requirements may be configured for different types of services.
[0239] The concepts of terms such as service and channel can be found in the descriptions of (1) wireless channel and (2) communication rate requirements in the term explanation, and will not be repeated here.
[0240] Execute step S1202.
[0241] S1202: The service predicts the physical layer communication rate.
[0242] Specifically, when the electronic device starts transmitting service data on channel A, the service on the electronic device can periodically predict the physical layer communication rate, that is, predict the communication rate of the service on channel A. Alternatively, when the service is stuck, the physical layer communication rate can be asynchronously predicted.
[0243] There are many ways for the business to determine whether a jam occurs, which are not limited here. For example, the business can determine whether a jam occurs based on the amount of locally cached data, or the business can determine whether a jam occurs based on the frequency of receiving confirmation messages.
[0244] For the content of electronic device predicting physical layer communication rate, please refer to the text description in (3) Predicting physical layer communication rate in the term explanation, which will not be repeated here.
[0245] Execute step S1203.
[0246] S1203: The electronic device determines whether the predicted physical layer communication rate is less than the minimum communication rate requirement.
[0247] Specifically, when the service on the electronic device is configured with at least two communication rate requirements, the service can determine the size relationship between the predicted physical layer communication rate and the maximum communication rate requirement. When the predicted physical layer communication rate is greater than or equal to the maximum communication rate requirement of the service, step S1204 is executed; when the predicted physical layer communication rate is less than the maximum communication rate requirement of the service, step S1205 is executed.
[0248] When the service on the electronic device is configured with only one communication rate requirement, the service can determine the relationship between the predicted physical layer communication rate and the communication rate requirement. When the predicted physical layer communication rate is greater than or equal to the communication rate requirement, step S1204 is executed; when the predicted physical layer communication rate is less than the communication rate requirement, step S1205 is executed.
[0249] Optionally, in some embodiments of the present application, when the service of the electronic device is configured with at least two communication rate requirements, when the predicted physical layer communication rate is less than the minimum communication rate requirement of the service, step S1213 is executed, that is, the electronic device directly switches to the B channel.
[0250] Optionally, in some embodiments of the present application, after executing step S1202 and before executing step S1203, the electronic device may adjust the rate at which the service generates data according to the predicted physical layer communication rate. The method for adjusting the rate at which the service generates data according to the predicted physical layer communication rate can be referred to the text description in the term explanation (2) communication rate requirement, which will not be repeated here.
[0251] Optionally, in some embodiments of the present application, in step S1201, if the service is not configured with a communication rate requirement, the electronic device can determine whether to switch channels according to the communication protocol followed during communication without executing steps S1202 and S1203. When the electronic device decides to switch channels, step S1205 is executed.
[0252] S1204: The electronic device stays in channel A.
[0253] It can be understood that since the communication rate of the service on the electronic device on channel A is greater than or equal to the maximum communication rate requirement of the service, the service data can be sent out from the electronic device in a timely manner, the user experience is good, and there is no need to switch channels.
[0254] S1205: The service predicts the physical layer communication rate, and adjusts the rate at which the service generates data according to the physical layer communication rate.
[0255] Specifically, when the service determines that the predicted physical layer communication rate is less than the maximum communication rate requirement, the service can notify the electronic device to prepare to switch to channel B. When preparing to switch to channel B for the first time, the service will determine the dwell time T on channel B and the channel switching delay. Based on the above parameters, the service can predict the physical layer communication rate from the beginning of this channel dwell to the end of this channel switching.
[0256] Optionally, in some embodiments of the present application, the service may determine the time when the temporary channel change operation starts before executing the temporary channel change operation.
[0257] After the business predicts the physical layer communication rate, the rate at which the business generates data can be adjusted according to the communication rate requirements of the business.
[0258] Below Fig.13 Taking the content shown as an example, the process of an electronic device predicting the physical layer communication rate before performing a temporary channel change is exemplarily introduced.
[0259] Fig.13 An exemplary schematic diagram of an electronic device predicting a physical layer communication rate before performing a temporary channel change operation provided in an embodiment of the present application.
[0260] like Fig.13 As shown in (A), at 1.9 seconds, the service and / or physical layer determines to start the first temporary channel change operation at 2.1 seconds, and ends the first temporary channel change operation at 2.2 seconds. The electronic device can count the physical layer communication rates in time slices 1, 2, and 3 to predict the communication rate of the electronic device on channel A in time slice 4.
[0261] After the electronic device predicts that the communication rate of the service on channel A from 1.9 seconds to 2.4 seconds is 420 Kbps, it can further predict: the physical layer communication rate perceived by the service when the electronic device is on channel B.
[0262] like Fig.13 As shown in (B), the service cannot send data from 1.9 seconds to 2.0 seconds and from 2.2 seconds to 2.3 seconds; the service can send data from 2.0 seconds to 2.2 seconds and from 2.3 seconds to 2.4 seconds.
[0263] It can be considered that the transmission rate of the service on the B channel is X kbps from the 2.0th second to the 2.2th second. When the service considers X=0, it predicts that the communication rate of the physical layer from 1.9 seconds to 2.4 seconds is 420 / 0.5*(0.5-0.1*2-0.2)=84kbps; or the service can consider that X=420kbps from 2.0 seconds to 2.2 seconds, and the transmission rate of the service on the B channel is the same as the transmission rate on the A channel, that is, it predicts that the physical layer communication rate from 1.9 seconds to 2.4 seconds is 420 / 0.5*(0.5-0.1*2)=252kbps; or the electronic device can query the electronic device on the B channel through the short-range communication service to predict the transmission rate of the service on the B channel, such as predicting that the transmission rate of the service on the B channel is X=700kbps, that is, it predicts that the physical layer communication rate from 1.9 seconds to 2.4 seconds is (420*0.5*0.1+700*0.2) / 0.5=322kbps. Among them, short-range communication services may include Bluetooth, Apple Wireless Direct Link (AWDL), ZigBee, HiLink, and the like.
[0264] It can be understood that the service predicts the physical layer communication rate and adjusts the rate at which the service generates data according to the predicted physical layer communication rate, thereby avoiding the situation where a large amount of data generated by the service is accumulated in the local cache and cannot be transmitted in time due to the communication rate X of the service on the B channel being too low, thereby improving the user experience.
[0265] Optionally, in some embodiments of the present application, when the electronic device performs a temporary channel change operation, the service may not predict the physical layer communication rate; or, after predicting the physical layer communication rate, the electronic device may not adjust the rate at which the service generates data and may still generate data at the original rate.
[0266] S1206: Switch to the B channel for the first time, stay on the B channel for T time, and determine the communication rate of the service on the B channel.
[0267] Specifically, after the electronic device switches to the B channel for the first time, it stays on the B channel for T time according to the dwell time T determined in step S1205. During the dwell time T, the service transmits the data generated by the service on the B channel. While transmitting the data, the service performs a channel assessment on the B channel to determine the communication rate of the service on the B channel. That is, the electronic device performs the temporary channel change operation for the first time.
[0268] The concepts of channel assessment and temporary channel change can be found in the description of temporary channel change in (4) in the term explanation, and will not be repeated here.
[0269] S1207: Determine whether I is less than N.
[0270] Specifically, the electronic device determines the size relationship between I and N. N is the upper limit threshold of the number of channel switching times and is a positive integer greater than or equal to 2 pre-configured by the service. When I is less than N, step S1208 is executed; when I is greater than or equal to N, step S1215 is executed.
[0271] It is understandable that S1207 and S1215 are optional steps, and the electronic device may execute S1208 after executing S1206. This is because, in some cases, there is a certain difference between the communication rate of the service on the A channel and the communication rate of the service on the B channel on the electronic device, and N may not be configured, and whether to switch channels may be determined through step S1211 or step S1212.
[0272] S1208: Determine whether the communication rate of the service on the B channel is greater than or equal to the communication rate on the A channel.
[0273] Specifically, in step S1206, after the service has determined its own communication rate on channel B, when the service determines that the communication rate on channel B is greater than or equal to the communication rate on channel A, step S1209 is executed; when the service determines that the communication rate on channel B is less than the communication rate on channel A, step S1210 is executed.
[0274] In an embodiment of the present application, the service can determine the communication rate of the service on the B channel and the communication rate of the service on the A channel at the end of the temporary channel change operation, or after the end of the temporary channel change operation, or before the next temporary channel change operation.
[0275] Specifically, Fig.14 Taking the content shown as an example, the timing of the business execution step S1208 is specifically introduced.
[0276] Fig.14 An exemplary schematic diagram of the relationship between communication rates on different channels for business judgment provided in an embodiment of the present application.
[0277] like Fig.14As shown, the service can judge the size of the communication rate of the service on the B channel and the communication rate of the service on the A channel at any of the two occasions. Before the electronic device switches back from the B channel to the A channel, that is, within 1.7 seconds to 1.8 seconds, it can judge that the communication rate of 410kbps on the B channel is greater than the communication rate of 400kbps on the A channel; or, considering the time-varying nature of the channel communication performance, the service can judge that the communication rate of 410kbps on the B channel is less than the communication rate of 420kbps on the A channel after the electronic device switches back to the A channel, that is, within 1.8 seconds to 2.3 seconds.
[0278] It is understandable that, considering the time-varying nature of channel communication performance, when the communication rates of services on channel A and channel B are not much different, the services' judgment of the communication rates of services on channel B and on channel A at different times may lead to opposite results. The services can choose the appropriate time to judge the difference between the communication rates of services on channel B and on channel A.
[0279] S1209: Increase the dwell time T.
[0280] Specifically, after the service executes step S1208, ie, after determining that the communication rate of the service on the B channel is greater than the communication rate of the service on the A channel, the dwell time T for the next switch to the B channel may be increased.
[0281] There are many ways to increase the residence time T, which are not limited here.
[0282] For example, T I =βT I-1 , where β is a real number greater than 1, T I is the dwell time of the electronic device switching to the B channel for the first time. β may be a constant preconfigured for the service, or β may be a variable related to the communication rate of the service on the B channel and the A channel, for example, β may be the ratio of the communication rate of the service on the B channel to the communication rate of the service on the A channel.
[0283] It can be understood that, for this service, since the communication rate of the service on the B channel is greater than the communication rate of the service on the A channel, increasing the residence time T of the electronic device on the B channel in the next temporary channel change operation is beneficial for more effective and accurate evaluation of the communication rate of the service on the B channel, and is also beneficial for the service to transmit data better and faster.
[0284] S1210: Reduce the dwell time T.
[0285] Specifically, after the service executes step S1208, ie, after determining that the communication rate of the service on the B channel is lower than the communication rate of the service on the A channel, the dwell time T for the next switch to the B channel can be reduced.
[0286] Similar to step S1209, there are many ways to reduce the dwell time T, which are not limited here. The way to reduce the dwell time T can refer to the text description in step S1209, which will not be repeated here.
[0287] It can be understood that for this service, since the communication rate of the service on channel B is lower than the communication rate of the service on channel A, reducing the residence time T of the electronic device on channel B during the temporary channel change operation can reduce the time for the service to transmit data on a channel with worse communication performance.
[0288] S1211: The business determines whether T is greater than or equal to the upper limit of the residence time.
[0289] Specifically, after the service increases the residence time T, it will determine whether the increased residence time T is greater than or equal to the upper limit of the residence time. The upper limit of the residence time is a parameter pre-configured by the service. When the increased residence time T is greater than or equal to the upper limit of the residence time, step S1213 is executed. When the increased residence time T is less than the upper limit of the residence time, step S1205 is executed.
[0290] S1212: The business determines that T is less than or equal to the lower limit of the residence time.
[0291] Specifically, after reducing the residence time T, the service will determine whether the reduced residence time T is less than or equal to the residence time lower limit. The residence time lower limit is a parameter pre-configured by the service. When the increased residence time T is greater than or equal to the residence time lower limit, step S1214 is executed. When the increased residence time T is greater than the residence time upper limit, step S1205 is executed.
[0292] S1213: The electronic device stays in the B channel.
[0293] Specifically, since the dwell time T is greater than or equal to the upper limit of the dwell time, the service considers that the transmission rate of the service on the B channel is higher than the transmission rate of the service on the A channel, so the electronic device can stay in the B channel.
[0294] Combine the following Fig.15 The content shown specifically introduces two ways for electronic devices to stay in the B channel.
[0295] Fig.15 An exemplary schematic diagram of an electronic device provided in an embodiment of the present application remaining in the B channel.
[0296] like Fig.15As shown in (A), the electronic device determines that the transmission rate of the service on the B channel is higher than the transmission rate of the service on the A channel from 2.7 seconds to 3.1 seconds, and increases the dwell time T. Since the increased dwell time T is greater than the upper limit of the dwell time, at 3.2 seconds, after the electronic device switches from the A channel to the B channel, the electronic device stays in the B channel.
[0297] like Fig.15 As shown in (B), since the electronic device knows the next time it switches to the B channel and the dwell time T between 1.3 seconds and 1.9 seconds, that is, the electronic device determines to switch from the B channel to the A channel at 2.6 seconds, and it can be determined at 2.6 seconds that the transmission rate of the service on the B channel is higher than the transmission rate of the service on the A channel. And at 2.6 seconds, the service increases the dwell time T, and it is determined that the dwell time T is greater than the upper limit of the dwell time, so at 2.6 seconds, the electronic device stays in the B channel.
[0298] contrast Fig.15 From the contents shown in (A) and (B), it can be known that due to the different timings of executing steps S1208, S1209, S1210, S1211, and S1212, the electronic device stays in the B channel in different ways.
[0299] S1214: The electronic device remains in channel A.
[0300] Specifically, since the dwell time T is less than the lower limit of the dwell time, the service considers that the transmission rate of the service on the A channel is higher than the transmission rate of the service on the B channel, so the electronic device can stay in the A channel.
[0301] It is worth noting that in some embodiments of the present application, when the electronic device is implementing the communication resource scheduling method provided in the embodiments of the present application, when the electronic device is not configured with an upper limit and / or a lower limit of the residence time, that is, step S1211, step S1212, step S1213, and step S1214 are not executed, step S1209 and step S1210 are optional steps, and the electronic device needs to at least determine whether to stay in channel A or channel B by executing step 1207 and step S1215.
[0302] S1215: The electronic device determines whether to stay in the B channel or the A channel according to the communication rates of the services on the B channel and the A channel.
[0303] Specifically, since the residence time T is between the upper limit of the residence time and the lower limit of the residence time after N temporary channel change operations, that is, the service cannot directly determine that the service is more suitable for transmitting data on channel A or channel B, the service can determine whether the electronic device stays in channel B or channel A based on the performance of the service on channel A and channel B during the N temporary channel change operations.
[0304] For example, when N=3, the service can count three temporary channel change operations and determine that the communication rate of the service on channel B is greater than the communication rate on channel A twice, and determine that the electronic device stays in channel B; or the service can calculate that during three temporary channel change operations, the average communication rate of the service on channel B is greater than the average communication rate of channel A, and determine that the electronic device stays in channel B; or during the service calculation of three temporary channel change operations, when the average communication rate of the service on channel B is not much different from the average communication rate of the service on channel A, it can choose to stay in the channel with a smaller communication rate variance, that is, the channel with smaller fluctuation in the channel communication performance of the electronic device, based on the variance of the communication rates of the service on channels A and B.
[0305] The following takes the contents shown in Table 2 as an example to specifically introduce the process of an electronic device determining whether to stay in the B channel or the A channel according to the communication rates of the services on the B channel and the A channel.
[0306] Table 2 is a schematic diagram of the communication rates of the services provided in the embodiments of the present application on the A channel and the B channel.
[0307]
[0308] As shown in Table 2, the average communication rate of services on channel A is lower than the average communication rate of services on channel B; however, the standard deviation of the communication rate of services on channel A is lower than the standard deviation of the communication rate of services on channel B. Therefore, services can choose to stay in channel A with a higher average communication rate, or choose to stay in channel B with a smaller communication rate fluctuation, according to the needs of the services themselves or the pre-configured selection mode.
[0309] It is worth noting that, since the electronic device stays on channel A and channel B for different times each time it performs a temporary channel change operation, the average value and standard deviation of the channel communication rate can be obtained by weighting according to the time.
[0310] Optionally, in some embodiments of the present application, when N is configured as 1 by the service in step S1207, that is, the service only performs a temporary channel change operation, it is determined whether the electronic device carrying the service remains on channel A or switches to channel B for data interaction. In this case, the service can only execute steps S1201, S1206, S1207, and S1215 to implement the communication resource scheduling method provided by the present application.
[0311] Optionally, in some embodiments of the present application, the service on the electronic device may not be configured with a communication rate requirement, and the communication resource scheduling method provided in the embodiment of the present application is implemented by executing steps S1205, S1206, S1208, S1209, S1210, S1211, S1212, S1213, and S1214. In the execution of step S1205, the electronic device may adjust the rate at which the service generates data, or may not adjust the rate at which the service generates data.
[0312] Optionally, in some embodiments of the present application, the electronic device may not configure the upper and lower limits of the residence time for the service, that is, it may not execute steps S1209, S1210, S1211, S1213, S1212, and S1214, but instead determines whether to stay in channel A or channel B through steps S1207 and S1215.
[0313] Combine the following Fig.16 Taking the content shown as an example, the communication resource scheduling method provided by the present application is exemplarily introduced.
[0314] Fig.16 An exemplary schematic diagram of a channel switching scenario of an electronic device provided in an embodiment of the present application.
[0315] Combined with Table 1 and Figure 1 In the video, the electronic device is projecting the real-time video screen to the projector through the router. Before 1.3 seconds, the electronic device accesses the 5G low-frequency channel of the router and starts the projection service of the video application to send the video data to the projector through the 5G low-frequency channel. In addition, the communication rate of the service on the 5G low-frequency channel is 1200kbps, and the format of the transmitted video is: 1080P, 60FPS.
[0316] Corresponding to step S1203 and step S1204, before 1.3 seconds, the service periodically predicts the communication rate of the physical layer and determines that the communication rate of the physical layer is 1200 kbps. Since the predicted communication rate of the physical layer is higher than the highest communication rate requirement of the service, the electronic device remains in the 5G low-frequency channel before 1.3 seconds.
[0317] After 1.3 seconds, the communication rate of the service on the 5G low-frequency channel drops to 400kbps.
[0318] Corresponding to step S1205, due to the reduced communication rate of the service on the 5G low-frequency channel, the service cannot send out the 1080P, 60FPS video data in time, and a large amount of data is accumulated in the local cache of the electronic device. When the service finds that a large amount of data is accumulated in the local cache of the electronic device, it can perform operations asynchronously: predict the physical layer communication rate, and adjust the rate at which the service generates data according to the physical layer communication rate. Specifically, the service can select the communication rate of the service on the 5G low-frequency channel in two time slices from 0.7 seconds to 1.0 seconds and from 1.0 seconds to 1.3 seconds to predict the communication rate of the service on the 5G low-frequency channel after 1.3 seconds. When the service predicts that after 1.3 seconds, the communication rate of the service on the 5G low-frequency channel is 400kbps. According to the correspondence between the communication rate requirement and the transmission data format shown in Table 1, the service determines to adjust the format of the service transmission video data to: 480P, 60FPS.
[0319] Corresponding to steps S1203 and S1205, the physical layer communication rate determined by the business prediction is lower than the maximum communication rate requirement of 1080kbps. At 1.7 seconds, the business notifies the electronic device to decide to start trying to switch to other channels to obtain better data transmission performance. After the business decides to start trying to switch to other channels, the electronic device can determine other available channels by radio sensing or listening to messages indicating other available channels on out-of-band channels and control channels. The electronic device determines that the alternative channels include the 5G high-frequency channel set up by the router. The electronic device determines to start trying to switch to the 5G high-frequency channel, and determines to start a temporary channel change operation at 1.9 seconds, that is, switching to the 5G high-frequency channel and staying in the 5G high-frequency channel for 0.3 seconds. In addition, the business determines to perform the channel switching operation number N=4, the upper limit of the residence time is 1.5 seconds, and the lower limit of the residence time is 0.1 seconds.
[0320] In order to reduce service freezes and errors caused by temporary channel change operations, the service can predict the physical layer communication rate from 1.7 seconds to 2.7 seconds, and adjust the rate at which the service generates data based on the predicted physical layer communication rate. The service predicts that the communication rate of the physical layer is 400*(1-0.1*2-0.3)=200kbps. Based on the correspondence between the communication rate requirements and the transmission data format shown in Table 1, the service determines to adjust the format of the service transmission video data to: 480P, 30FPS.
[0321] Corresponding to step S1206, from the 2nd second to the 2.4th second, when the electronic device is in the 5G high-frequency channel, the service performs channel evaluation on the 5G high-frequency channel while transmitting data, and determines that the communication rate of the service in the 5G high-frequency channel is 600 kbps.
[0322] Corresponding to step S1207, step S1208, step S1209, and step S1211, the service determines that the communication rate of the service in the 5G high-frequency channel is greater than the communication rate of the service in the 5G low-frequency channel, and increases the residence time T on the channel in the next temporary channel change operation by 0.6 seconds, and the residence time of 0.6 seconds is less than the upper limit of the residence time of 1.5 seconds.
[0323] At 2.3 seconds, the electronic device begins to switch back to the 5G low-frequency channel. At 2.4 seconds, the electronic device switches back to the 5G low-frequency channel.
[0324] Corresponding to step S1205, the service determines to start the second temporary channel change operation at 2.9 seconds, that is, switching to the 5G high-frequency channel, within 2.7 seconds to 2.9 seconds. Different from the first switch to the 5G high-frequency channel, since a channel evaluation has been performed on the 5G high-frequency channel, it can be predicted that from 3.0 seconds to 3.6 seconds, the communication rate of the service in the 5G high-frequency channel is less than or equal to 500kbps. Furthermore, when predicting the physical layer communication rate within 2.7 seconds to 3.7 seconds, the service can have multiple prediction methods. For example, the physical layer communication rate can be predicted to be 400*(1-0.1*2-0.6)+600*0.6=440kbps, or it can be 400*(1-0.1*2-0.3)=200kbps. According to the correspondence between the communication rate requirement and the transmission data format shown in Table 1, the service determines to adjust the format of the service transmission video data to: 480P, 30FPS or 720P, 30FPS or 480P, 60FPS.
[0325] Corresponding to step S1206, from the 3rd second to the 3.6th second, when the electronic device is in the 5G high-frequency channel, the service performs channel evaluation on the 5G high-frequency channel while transmitting data, and determines that the communication rate of the service in the 5G high-frequency channel is 600 kbps.
[0326] Corresponding to step S1207, step S1208, step S1209, and step S1211, the service determines that the communication rate of the service in the 5G high-frequency channel is greater than the communication rate of the service in the 5G low-frequency channel, and increases the residence time T = 1.2 seconds when switching channels next time, and the residence time of 1.2 seconds is less than the upper limit of the residence time of 1.5 seconds.
[0327] At 3.6 seconds, the electronic device begins to switch back to the 5G low-frequency channel. At 3.7 seconds, the electronic device switches back to the 5G low-frequency channel.
[0328] Corresponding to step S1205, the service determines to switch to the 5G high frequency channel for the third time at 4.2 seconds from 3.7 seconds to 4.1 seconds. Different from the second switch to the 5G high frequency channel, the service can predict the physical layer communication rate from 3.7 seconds to 4.7 seconds according to the original time slice length, or the service can adjust the time slice length to predict the physical layer communication rate from 3.7 seconds to 5.5 seconds.
[0329] The business predicts that the physical layer communication rate from 3.7 seconds to 4.7 seconds can be calculated in a variety of ways, for example, it can be 410*(1-0.1-0.4)=205kbps, or it can be 410*(1-0.1-0.4)+610*0.4=449kbps; or, the business predicts that the physical layer communication rate from 3.7 seconds to 5.6 seconds (the electronic device switches back to the 5G low-frequency channel at 5.6 seconds) is 410*(1.9-0.1*2-1.2) / 1.9+600*1.2 / 1.9=486kbps. According to the correspondence between the communication rate requirements and the transmission data format shown in Table 1, the business determines to adjust the format of the business transmission video data to: 480P, 30FPS or 720P, 30FPS or 480P, 60FPS.
[0330] Corresponding to step S1206, from 4.3 seconds to 5.5 seconds, when the electronic device is in the 5G high-frequency channel, the service performs channel evaluation on the 5G high-frequency channel while transmitting data, and determines that the communication rate of the service in the 5G high-frequency channel is 610 kbps.
[0331] Corresponding to step S1207, step S1208, step S1209, and step S1211, the service determines that the communication rate of the service in the 5G high-frequency channel is greater than the communication rate of the service in the 5G low-frequency channel, and increases the residence time T = 2.4 seconds when switching channels next time, and the residence time of 2.4 seconds is greater than the upper limit of the residence time of 1.5 seconds.
[0332] Corresponding to step S1213, at 5.5 seconds, because the service determines that the dwell time of the next channel switching is greater than the upper limit of the dwell time, the service instructs the electronic device to stay in the 5G high frequency channel.
[0333] Corresponding to step 1402, after 5.5 seconds, the service determines the physical layer communication rate, that is, determines that the transmission rate of the service on the 5G high frequency channel is 610 kbps. According to the correspondence between the communication rate requirement and the transmission data format shown in Table 1, the service determines to adjust the format of the service transmission video data to: 720P, 60FPS.
[0334] It is understandable that if 1.7 seconds to 2.7 seconds is considered as time slice K, 2.7 seconds to 3.7 seconds is considered as time slice K+1, and 3.7 seconds to 5.5 seconds is considered as time slice K+2, since the service knows the time and load of switching channels in advance, the service can adjust the rate of generating data in time to avoid the service from accumulating the produced data locally, which reduces the service jam and improves the user experience. Secondly, since the service switches channels while transmitting data, and dynamically adjusts the residence time of the channel after switching, it avoids affecting the user experience due to the low communication rate of the channel after switching, and has strong adaptive capabilities.
[0335] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0336] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0337] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A communication resource scheduling method, characterized in that: include: A first application is running on the first electronic device; The first electronic device adjusts the rate at which the first application generates data based on the Kth duration and the overhead of the channel switching operation; The first electronic device switches from the first channel to the second channel for the Kth time, where K is a positive integer; The first electronic device resides on the second channel for a Kth time period, and the first electronic device determines that the communication performance of the second channel is a Kth performance; After the first electronic device resides on the second channel for a Kth time period, the first electronic device switches back to the first channel; The first electronic device switches from the first channel to the second channel for the K+1th time; After the first electronic device resides on the second channel for a K+1th time period, the first electronic device determines that the communication performance of the second channel is a K+1th performance; After the first electronic device determines that the communication performance of the second channel is better than the communication performance of the first channel based on the communication performance of the second channel obtained at least twice in the previous K+1 times, the first electronic device stays in the second channel, or the first electronic device switches back to the first channel and then switches to the second channel.
2. The method according to claim 1, characterized in that When the Kth performance is greater than the communication performance of the first channel, the K+1th time length is greater than or equal to the Kth time length; when the Kth performance is less than the communication performance of the first channel, the K+1th time length is less than or equal to the Kth time length.
3. The method according to claim 2, characterized in that The communication performance of the first channel is determined before the first electronic device switches from the first channel to the second channel for the Kth time; or, the communication performance of the first channel is determined before the first electronic device switches from the first channel to the second channel for the K+1th time.
4. The method according to any one of claims 1 to 3, characterized in that: Before the first electronic device switches from the first channel to the second channel for the Kth time, the method further includes: A first application is running on the first electronic device, and the first application is configured with one or more communication performance parameter thresholds; The first electronic device determines that the communication performance of the first channel is lower than any one of the one or more communication performance parameter thresholds.
5. The method according to claim 4, characterized in that Before the first electronic device determines that the communication performance of the first channel is lower than any one of the one or more communication performance parameter thresholds, the method further includes: The first electronic device adjusts the rate at which the first application generates data based on the communication performance of the first channel and the communication performance parameter threshold.
6. The method according to claim 1, characterized in that The first electronic device adjusts the rate at which the first application generates data based on the Kth duration and the overhead of the channel switching operation, specifically including: The first electronic device determines a Kth prediction value, where the Kth prediction value is a communication rate of the first application on the second channel; The first electronic device adjusts the rate at which the first application generates data based on the Kth prediction value, the Kth duration, and the overhead of the channel switching operation.
7. The method according to claim 6, characterized in that The first electronic device determines the Kth prediction value, specifically including: Before the first electronic device switches from the first channel to the second channel, the first electronic device determines the Kth prediction value through a short-distance communication service, and the short-distance communication service includes one or more of Bluetooth, Apple Wireless Direct Connection AWDL, ZigBee, and HiLink.
8. The method according to claim 6, wherein the first electronic device determines the Kth prediction value, specifically comprising: If K is greater than 1, the first electronic device determines a Kth prediction value based on a K-1th performance.
9. The method according to claim 6, wherein the first electronic device determines the Kth prediction value, specifically comprising: The first electronic device determines that the Kth prediction value is equal to 0.
10. The method according to any one of claims 1 to 3, characterized in that After the first electronic device determines that the communication performance of the second channel is better than the communication performance of the first channel based on the communication performance of the second channel obtained at least twice in the previous K+1 times, the first electronic device stays in the second channel, or the first electronic device switches back to the first channel and then switches to the second channel, specifically including: In a case where the K+1th performance is greater than the communication performance of the first channel, the first electronic device determines a K+2th duration, and the K+2th duration is greater than the K+1th duration; After the first electronic device determines that the K+2th time duration is greater than the upper limit of the dwell time, the first electronic device stays in the second channel, or the first electronic device switches back to the first channel and then switches to the second channel.
11. An electronic device, characterized in that: The electronic device comprises: one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the method according to any one of claims 1 to 10.
12. A computer program product comprising instructions, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 10.
13. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 10.
Citation Information
Patent Citations
Cell switching method, base station and user equipment
CN107820282A
Network mode control method, terminal and storage medium
CN109618378A