Service quality optimization method and electronic equipment

By obtaining and combining the service information and link information of each service, reasonably allocating bandwidth, the problem of unreasonable bandwidth allocation in multiple devices and multiple service scenarios is solved, and the QOS of non-file transmission services is given priority, which improves the service experience.

CN120166416APending Publication Date: 2025-06-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311692774.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-09
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In multi-device and multi-service scenarios, the bandwidth allocation of multiple electronic devices in the prior art is unreasonable, resulting in the inability to obtain sufficient bandwidth for businesses that are sensitive to delays, affecting the service experience.

Method used

By obtaining the service information and link information of each service, combining the link information and service information of multiple electronic devices, the bandwidth is reasonably allocated. The specific method includes determining the speed limit value between the file transfer service and the non-file transfer service, and giving priority to ensuring the requested bandwidth of the non-file transfer service.

Benefits of technology

It realizes reasonable allocation of bandwidth in multiple devices and multiple business scenarios, prioritizes the protection of QOS for non-file transmission services, improves bandwidth utilization for delay-sensitive services, and improves service experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120166416A_ABST
    Figure CN120166416A_ABST
Patent Text Reader

Abstract

The invention discloses a service quality optimization method and electronic equipment, and the method comprises the steps: collecting link information of links and business information of businesses in multiple pieces of electronic equipment, combining the link information of the links and the business information of the businesses in the multiple pieces of electronic equipment to reasonably distribute bandwidth, and further, improving the service quality of the electronic equipment. By limiting the speed of the file transmission service in the first electronic equipment, the appealing bandwidth of the non-file transmission service in the second electronic equipment can be guaranteed preferentially, so that the service quality of the non-file transmission service is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technologies, and in particular, to a method for optimizing quality of service and an electronic device. Background Art

[0002] In the scenario of near-field communication, multiple devices, such as one or more mobile phones, tablet computers, personal computers, large-screen devices (such as televisions), etc., need to concurrently transmit various service data under limited network bandwidth. Exemplarily, at the same moment, some devices are performing large-file transmission, and some devices are performing high-definition video transmission. At this time, it is necessary to reasonably allocate broadband resources through a Quality of Service (QoS) mechanism to ensure the orderly progress of data communication.

[0003] In order to ensure that delay-sensitive services can obtain sufficient bandwidth for transmission in a multi-device and multi-service scenario and avoid queuing waiting for such services, a bandwidth adjustment and optimization mechanism is required to improve the experience of such services. Summary of the Invention

[0004] The present application provides a method for optimizing quality of service and an electronic device to solve the problem of unreasonable bandwidth allocation among multiple existing electronic devices.

[0005] In a first aspect, a method for optimizing quality of service is provided, which is applied to a first electronic device. The method includes:

[0006] Obtain first service information and link information of a first link. The first link carries a first service with the first electronic device as the sending end. The first service information includes the service type of the first service, and the link information of the first link includes the first highest effective rate and the identifier of the first channel;

[0007] Receive second service information and link information of a second link sent by a second electronic device. The second link carries a second service with the second electronic device as the sending end. The second service information includes the service type and the requested bandwidth of the second service, and the link information of the second link includes the second highest effective rate and the identifier of the second channel; the first channel and the second channel are the same channel, or the first channel and the second channel are two channels in the same frequency band;

[0008] When the service type of the first service is a file transfer service and the service type of the second service is a non-file transfer service, determine a first speed limit value of the first service based on the first highest effective rate, the requested bandwidth of the second service, and the second highest effective rate;

[0009] Transmit first file data through the first link at a first bandwidth value, where the first bandwidth value is less than or equal to the first speed limit value, and the first file data is the service data of the first service.

[0010] Among them, the first highest effective rate is the highest effective rate of the first link. The second highest effective rate is the highest effective rate of the second link.

[0011] By executing the above method, by collecting the link information of the links and the service information of the services in multiple electronic devices, the bandwidth can be reasonably allocated by combining the link information of the links and the service information of the services in multiple electronic devices. By limiting the speed of the file transfer service in the first electronic device, the required bandwidth of the non-file transfer service in the second electronic device can be preferentially guaranteed, thereby ensuring the QOS of the non-file transfer service.

[0012] In a possible application scenario, the first link is the link between the first electronic device and the second electronic device, and the second link is the link between the second electronic device and the third electronic device.

[0013] In a possible application scenario, the first link is the link between the first electronic device and the third electronic device, and the second link is the link between the second electronic device and the third electronic device.

[0014] In a possible application scenario, the first link is the link between the first electronic device and the third electronic device, and the second link is the second link between the first electronic device and the second electronic device.

[0015] In a possible application scenario, the first link is the link between the first electronic device and the third electronic device, and the second link is the link between the second electronic device and the fourth electronic device.

[0016] Combined with the first aspect or any one of the possible application scenarios provided by the first aspect, the embodiments of the present application provide a distributed service quality optimization method. Among them, the method further includes: sending the first service information and the link information of the first link to the second electronic device.

[0017] The above method enables the second electronic device to also collect the link information of the links and the service information of the services in multiple electronic devices, so as to reasonably allocate the bandwidth by combining the link information of the links and the service information of the services in multiple electronic devices.

[0018] In a possible implementation, one implementation of obtaining the first service information and the link information of the first link may be: when the trigger condition is met, obtaining the first service information and the link information of the first link and broadcasting a notification; or, when receiving a notification, obtaining the first service information and the link information of the first link. Among them, the notification is used to indicate an update of the link information and the service information, or is used to indicate that the service information or the link information has changed.

[0019] In the above method, when the trigger condition is met, the link information and service information are triggered to be updated to recalculate the speed limit value of the file transfer service, so as to realize the dynamic adjustment of the bandwidth of the service.

[0020] In a possible implementation, before obtaining the first service information and the link information of the first link when the trigger condition is met, the method further includes: when the creation of the first service is successful or when it is detected that the third service is closed, it is determined that the trigger condition is met; the third service is a service with the first electronic device as the sender.

[0021] It can be understood that the third service and the first service are two different services. The third service can be a service created by the first electronic device before obtaining the first service information and the link information of the first link.

[0022] In the above method, when the service is created or closed, the link information and service information are triggered to be updated to recalculate the speed limit value of the file transfer service, so as to realize the dynamic adjustment of the bandwidth of the service.

[0023] In a possible implementation, before obtaining the first service information and the link information of the first link when the trigger condition is met, the method further includes: when it is detected that the transmission rate of the first link changes, updating the first highest effective rate; when the first highest effective rate is updated, it is determined that the trigger condition is met.

[0024] In the above method, when the transmission rate of the link changes, the link information and service information are triggered to be updated to recalculate the speed limit value of the file transfer service, so as to realize the dynamic adjustment of the bandwidth of the service.

[0025] In a possible implementation, before obtaining the first service information and the link information of the first link when the trigger condition is met, the method further includes: in response to a user operation received for indicating the creation of a fourth service, determining whether the remaining bandwidth is less than the required bandwidth of the fourth service; when the remaining bandwidth is not less than the required bandwidth of the fourth service, creating the fourth service; when the creation of the fourth service is successful, it is determined that the trigger condition is met.

[0026] In the above method, when a non-file transfer service is created, the link information and service information are triggered to be updated to recalculate the speed limit value of the file transfer service, so as to realize the dynamic adjustment of the bandwidth of the service. Moreover, when the remaining bandwidth is greater than the required bandwidth of the newly created non-file transfer service, the creation of the non-file transfer service is allowed only to reduce the impact of the newly created service on the QOS of the existing non-file transfer service.

[0027] In a possible implementation, the first service information further includes the service type and the required bandwidth of the fourth service. The fourth service is also carried on the first link, and the service type of the fourth service is a non-file transfer service. A specific implementation of the above-mentioned first electronic device determining the first rate limit value of the first service based on the first maximum effective rate, the required bandwidth of the second service, and the second maximum effective rate may be: the first electronic device determines the first rate limit value of the first service based on the first maximum effective rate, the required bandwidth of the second service, the required bandwidth of the fourth service, and the second maximum effective rate. In this case, the method further includes: transmitting the service data of the fourth service through the first link at the required bandwidth of the fourth service.

[0028] In the above method, when the first electronic device includes a non-file transfer service (the fourth service), the service data of the non-file transfer service is transmitted at the required bandwidth of the non-file transfer service to preferentially guarantee the required bandwidth of the non-file transfer service.

[0029] In a possible implementation, the method further includes: when the required bandwidth of the fourth service changes or the fourth service lags, obtaining the first service information and the link information of the first link, and broadcasting a notification.

[0030] In the above method, when the non-file transfer service lags, it triggers an update of the link information and the service information to recalculate the rate limit value of the file transfer service, realizing dynamic adjustment of the service bandwidth to reduce or eliminate the lag of the non-file transfer service.

[0031] In a possible implementation, the second service information further includes the service type of the fifth service. The fifth service is also carried on the second link, and the service type of the fifth service is a file transfer service. A specific implementation of the above-mentioned first electronic device determining the first rate limit value of the first service based on the first maximum effective rate, the required bandwidth of the second service, the required bandwidth of the fourth service, and the second maximum effective rate may be: the first electronic device determines the first rate limit value of the first service based on the first maximum effective rate, the required bandwidth of the second service, the second maximum effective rate, and the number of file transfer services.

[0032] It can be understood that the number of file transfer services here can be the total number of file transfer services or the number of some file transfer services.

[0033] In the above method, when other devices include file transfer services, the calculation of the rate limit value of the file transfer service takes into account the file transfer services on other devices to more reasonably determine the rate limit value of the file transfer service.

[0034] In a possible implementation, a specific implementation of the above-mentioned first electronic device for determining the first speed limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the number of file transfer services may be as follows: The first electronic device determines the total time occupancy ratio of non-file transfer services based on the first highest effective rate, the required bandwidth of the second service, and the second highest effective rate; determines the total time occupancy ratio of file transfer services based on the total time occupancy ratio of non-file transfer services; determines the time occupancy ratio of each file transfer service based on the total time occupancy ratio and the number of file transfer services; and determines the first speed limit value based on the time occupancy ratio of each file transfer service and the first highest effective rate.

[0035] The above method provides a method for calculating the speed limit value of file transfer services in a scenario of multiple electronic devices, which can preferentially guarantee the required bandwidth of non-file transfer services in the second electronic device, thereby ensuring the QOS of non-file transfer services.

[0036] Among them, the total time occupancy ratio of non-file transfer services is the sum of the ratio of the second service to the second highest effective rate and the ratio of the fourth service to the first highest effective rate; the total time occupancy ratio of file transfer services is the difference between 1 and the total time occupancy ratio of non-file transfer services; the time occupancy ratio of each file transfer service is determined based on the total time occupancy ratio of file transfer services and the number of file transfer services, or based on the total time occupancy ratio of file transfer services, the number of file transfer services, and the anti-collision coefficient. Among them, the anti-collision coefficient is determined based on the number of sending ends.

[0037] The above method takes into account the number of sending ends when calculating the speed limit value of file transfer services, and can further ensure the QOS of non-file transfer services.

[0038] Among them, when the product of the time occupancy ratio of each file transfer service and the first highest effective rate is greater than or equal to the preset speed limit value, the first speed limit value is the product of the time occupancy ratio of each file transfer service and the first highest effective rate; when the product of the time occupancy ratio of each file transfer service and the first highest effective rate is less than the preset speed limit value, the first speed limit value is the preset speed limit value.

[0039] The above method makes the speed limit value of file transfer services not less than the preset speed limit value, avoiding the transmission failure of file transfer services.

[0040] In a possible implementation, the first highest effective rate is determined based on the modulation and coding strategy (MCS) rate of the first link; the second highest effective rate is determined based on the MCS rate of the second link.

[0041] Combined with the above first aspect or any of the possible application scenarios provided by the first aspect, the embodiments of the present application provide a centralized (also known as central) service quality optimization method. Among them, the second service information further includes the service type of the sixth service, and the sixth service is also carried on the second link, and the service type of the sixth service is a file transfer service; a specific implementation of determining the first speed limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, and the second highest effective rate in the above first aspect can be: the first electronic device determines the first speed limit value of the first service and the second speed limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the number of file transfer services. The method further includes: sending the second speed limit value to the second electronic device, and the second speed limit value is used to determine the second bandwidth value of the second file data of the sixth service, and the second bandwidth value is less than or equal to the second speed limit value.

[0042] It should be understood that the second file data is the service data of the sixth service. Here, the number of file transfer services can be the total number of file transfer services or the number of partial file transfer services.

[0043] In the above method, the first electronic device uniformly calculates the speed limit values of the file transfer services in multiple electronic devices, and it is not necessary for each electronic device to calculate the speed limit values, which not only reduces communication overhead but also improves the QOS optimization efficiency.

[0044] In a possible implementation, before obtaining the first service information and the link information of the first link, the method further includes: when receiving the indication information from the second electronic device, broadcasting an update instruction; the indication information is used to indicate that the service information or the link information has changed, or is used to indicate service quality optimization; the update instruction is used to request the service information and the link information.

[0045] In the above method, when the second electronic device needs QOS optimization, it notifies the first electronic device, and the first electronic device triggers the multiple electronic devices to synchronously perform QOS optimization by sending an update instruction.

[0046] In a possible implementation, before obtaining the first service information and the link information of the first link, the method further includes: when detecting that the trigger condition is satisfied, broadcasting an update instruction; the update instruction is used to request the service information and the link information.

[0047] In the above method, when the trigger condition is satisfied, it triggers the update of the link information and the service information to recalculate the speed limit values of the file transfer services and realize the dynamic adjustment of the service bandwidth.

[0048] In a possible implementation, the method further includes: determining that a trigger condition is met when the creation of the first service is successful or when it is detected that the seventh service is closed; the seventh service is a service with the first electronic device as the sender.

[0049] It can be understood that the seventh service and the first service are two different services, and the seventh service may be a service created by the first electronic device before obtaining the first service information and the link information of the first link.

[0050] In the above method, when a service is created or closed, it triggers the update of link information and service information to recalculate the speed limit value of the file transfer service, realizing the dynamic adjustment of the bandwidth of the service.

[0051] In a possible implementation, the method further includes: updating the first highest effective rate when it is detected that the transmission rate of the first link changes; determining that the trigger condition is met when the first highest effective rate is updated.

[0052] In the above method, when the transmission rate of the link changes, it triggers the update of link information and service information to recalculate the speed limit value of the file transfer service, realizing the dynamic adjustment of the bandwidth of the service.

[0053] In a possible implementation, the method further includes: in response to a user operation received for indicating the creation of an eighth service, determining whether the remaining bandwidth is less than the required bandwidth of the eighth service; creating the eighth service when the remaining bandwidth is not less than the required bandwidth of the eighth service; determining that the trigger condition is met when the creation of the eighth service is successful.

[0054] In the above method, when a non-file transfer service is created, it triggers the update of link information and service information to recalculate the speed limit value of the file transfer service, realizing the dynamic adjustment of the bandwidth of the service. And, when the remaining bandwidth is greater than the required bandwidth of the newly created non-file transfer service, the creation of the non-file transfer service is allowed to reduce the impact of the newly created service on the QOS of the existing non-file transfer service.

[0055] In a possible implementation, the first service information further includes the service type and required bandwidth of the eighth service, and the eighth service is also carried on the first link, and the service type of the eighth service is a non-file transfer service;

[0056] Determining the first speed limit value of the first service and the second speed limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the number of file transfer services specifically includes: determining the first speed limit value of the first service and the second speed limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the required bandwidth of the eighth service, the second highest effective rate, and the number of file transfer services;

[0057] The method further includes: transmitting service data of an eighth service at a demanded bandwidth of the eighth service through a first link.

[0058] In the above method, when the first electronic device includes a non-file transfer service (the eighth service), the service data of the non-file transfer service is transmitted at the demanded bandwidth of the non-file transfer service to preferentially guarantee the demanded bandwidth of the non-file transfer service.

[0059] In a possible implementation, the method further includes:

[0060] When the demanded bandwidth of the eighth service changes or the eighth service lags, obtaining first service information and link information of the first link, and broadcasting a notification.

[0061] In the above method, when the non-file transfer service lags, trigger an update of the link information and service information to recalculate the speed limit value of the file transfer service, and implement dynamic adjustment of the service bandwidth to reduce or eliminate the lag of the non-file transfer service.

[0062] In a possible implementation, a specific implementation of determining a first speed limit value of a first service and a second speed limit value of a sixth service based on a first highest effective rate, a demanded bandwidth of a second service, a demanded bandwidth of an eighth service, a second highest effective rate, and the number of file transfer services may be: determining a total time ratio of non-file transfer services based on the first highest effective rate, the demanded bandwidth of the second service, the demanded bandwidth of the eighth service, and the second highest effective rate; determining a total time ratio of file transfer services based on the total time ratio of non-file transfer services; determining a time ratio of each file transfer service based on the total time ratio and the number of file transfer services; determining the first speed limit value based on the time ratio of each file transfer service and the first highest effective rate; and determining the second speed limit value based on the time ratio of each file transfer service and the second highest effective rate.

[0063] Among them, the total time ratio of non-file transfer services is the sum of the ratio of the second service to the second highest effective rate and the ratio of the eighth service to the first highest effective rate; the total time ratio of file transfer services is the difference between 1 and the total time ratio of non-file transfer services; the time ratio of each file transfer service is determined based on the total time ratio of file transfer services and the number of file transfer services, or based on the total time ratio of file transfer services, the number of file transfer services, and an anti-collision coefficient. Among them, the anti-collision coefficient is determined based on the number of sending ends.

[0064] Wherein, when the product of the time ratio of each file transfer service and the first highest effective rate is greater than or equal to the preset speed limit value, the first speed limit value is the product of the time ratio of each file transfer service and the first highest effective rate; when the product of the time ratio of each file transfer service and the first highest effective rate is less than the preset speed limit value, the first speed limit value is the preset speed limit value; when the product of the time ratio of each file transfer service and the second highest effective rate is greater than or equal to the preset speed limit value, the second speed limit value is the product of the time ratio of each file transfer service and the first highest effective rate; when the product of the time ratio of each file transfer service and the second highest effective rate is less than the preset speed limit value, the second speed limit value is the preset speed limit value.

[0065] In a possible implementation, the first highest effective rate is determined based on the modulation and coding strategy (MCS) rate of the first link; the second highest effective rate is determined based on the MCS rate of the second link.

[0066] In a second aspect, an embodiment of the present application further provides a service quality optimization method, which is applied to a second electronic device. The method includes: obtaining second service information and link information of a second link. The second link carries a second service with the second electronic device as the sender. The second service information includes the service type and the requested bandwidth of the second service. The link information of the second link includes the second highest effective rate and the identifier of the second channel; the requested bandwidth of the second service and the second highest effective rate are used to calculate the first speed limit value of a first service; the first service is a service carried on the first link with the first electronic device as the sender, and the service type of the first service is a file transfer service; the link information of the first link includes the identifier of the first channel; the first channel and the second channel are the same channel, or the first channel and the second channel are two channels in the same frequency band;

[0067] Sending the second service information and the link information of the second link to the first electronic device.

[0068] In the above method, the first electronic device uniformly calculates the speed limit values of the file transfer services in multiple electronic devices, and it is not necessary for each electronic device to calculate the speed limit values, which not only reduces communication overhead but also improves the QOS optimization efficiency.

[0069] In a possible implementation, the second service information further includes the service type of a sixth service. The second link also carries the sixth service, and the service type of the sixth service is a file transfer service. The requested bandwidth of the second service and the second highest effective rate are also used to calculate the second speed limit value of the sixth service. The method further includes: receiving the second speed limit value from the first electronic device; transmitting second file data through the second link at a second bandwidth value, where the second bandwidth value is less than or equal to the second speed limit value, and the second file data is the service data of the sixth service.

[0070] In a possible implementation, before obtaining the second service information and the link information of the second link, the method further includes: receiving an update instruction from a first electronic device, where the update instruction is used to request service information and link information.

[0071] In a possible implementation, the method further includes: when detecting that a trigger condition is satisfied, sending indication information to the first electronic device; the indication information is used to indicate that the service information or the link information has changed, or is used to indicate to perform quality of service optimization.

[0072] In a possible implementation, the method further includes: when creating the second service successfully or when detecting that the ninth service is closed, determining that the trigger condition is satisfied, where the ninth service is a service with the second electronic device as the sending end.

[0073] In a possible implementation, the method further includes: when detecting that the required bandwidth of the second service changes or the second service freezes, determining that the trigger condition is satisfied.

[0074] In a possible implementation, the method further includes: when detecting that the transmission rate of the second link changes, updating the second highest effective rate; when the second highest effective rate is updated, determining that the trigger condition is satisfied.

[0075] It should be noted that it is not limited to the above services such as the first service and the second service, and links such as the first link and the second link. The first electronic device can also obtain the service information of more services and the link information of the links, and calculate the rate limit value by combining the service information of more services and the link information of more links.

[0076] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, one or more processors; 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 the method executed by the first electronic device in the first aspect or any one of the implementation manners of the first aspect.

[0077] In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory, one or more processors; 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 the method executed by the second electronic device in the second aspect or any one of the implementation manners of the second aspect.

[0078] Fifth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions, which when running on an electronic device, cause the electronic device to execute the method performed by the first electronic device in the first aspect or any implementation manner of the first aspect.

[0079] Sixth aspect, an embodiment of the present application provides a computer program product, which when running on a computer, causes the computer to execute the method performed by the first electronic device in the first aspect or any implementation manner of the first aspect.

[0080] Seventh aspect, an embodiment of the present application provides a chip system, the chip system includes at least one processor, which is used to implement the method performed by the first electronic device in the first aspect or any implementation manner of the first aspect.

[0081] Eighth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions, which when running on an electronic device, cause the electronic device to execute the method performed by the second electronic device in the second aspect or any implementation manner of the second aspect.

[0082] Ninth aspect, an embodiment of the present application provides a computer program product, which when running on a computer, causes the computer to execute the method performed by the second electronic device in the second aspect or any implementation manner of the second aspect.

[0083] Tenth aspect, an embodiment of the present application provides a chip system, the chip system includes at least one processor, which is used to implement the method performed by the second electronic device in the second aspect or any implementation manner of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1A It is a schematic structural diagram of a communication system provided by an embodiment of the present application;

[0085] Figure 1B It is a schematic structural diagram of another communication system provided by an embodiment of the present application;

[0086] Figure 2 A centralized QoS optimization solution provided by the present application is schematically described;

[0087] Figure 3 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application;

[0088] Figure 4 It is a software and hardware architecture of an electronic device provided by an embodiment of the present application;

[0089] Figure 5An application scenario of a QOS system provided by an embodiment of the present application;

[0090] Figure 6A A schematic flow chart of a QOS optimization method involved when creating a screen mirroring service from device A to device B provided by an embodiment of the present application;

[0091] Figure 6B A schematic flow chart of a QOS optimization method involved when creating a voice call service between device A and device B provided by an embodiment of the present application;

[0092] Figure 6C A schematic flow chart of a QOS optimization method involved when creating a file sharing service on device A provided by an embodiment of the present application;

[0093] Figure 7A - Figure 7D Schematic diagrams of some user interfaces involved in creating a screen mirroring service provided by an embodiment of the present application;

[0094] Figure 7E - Figure 7F Schematic diagrams of some user interfaces involved in creating a voice call service provided by an embodiment of the present application;

[0095] Figure 7G - Figure 7H Schematic diagrams of some user interfaces involved in creating a file sharing service provided by an embodiment of the present application;

[0096] Figure 8 A schematic flow chart of a QOS optimization method caused by a change in the WiFi transmission rate provided by an embodiment of the present application;

[0097] Figure 9 A schematic flow chart of a QOS optimization process caused by closing a service provided by an embodiment of the present application;

[0098] Figure 10 A schematic flow chart of a distributed QOS optimization method provided by an embodiment of the present application;

[0099] Figure 11 A schematic flow chart of a centralized QOS optimization method provided by an embodiment of the present application;

[0100] Figure 12 A schematic flow chart of a method for calculating the remaining bandwidth and determining whether the remaining bandwidth meets the service requirements provided by an embodiment of the present application;

[0101] Figure 13 A schematic flow chart of a method for calculating the speed limit value of a file transfer service provided by an embodiment of the present application. Detailed implementation manners

[0102] The technical solutions in the embodiments of the present application will be clearly and elaborately described below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; "and / or" in the text is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.

[0103] Hereinafter, terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more than two.

[0104] In the present application, "electronic device" is also simply referred to as "device".

[0105] The method provided by the embodiments of the present application can be applied to scenarios that are sensitive to or have high requirements for time delay, such as scenarios of multiple devices connected via WiFi. In this scenario, multiple devices include file transfer services such as file sharing, as well as one or more services that are sensitive to or have high requirements for time delay, such as call sharing, notification sharing, keyboard and mouse sharing, PC collaboration, PAD collaboration, screen mirroring, large screen collaboration, screen mirroring / extension, video on demand / live broadcast, etc.

[0106] Figure 1A As shown, it is a schematic structural diagram of a communication system provided by the embodiments of the present application. The communication system may include multiple QOS systems, and each QOS system may include one or more electronic devices. Exemplarily, Figure 1A it includes a first QOS system and a second QOS system. The first QOS system includes a first mobile phone, a second mobile phone, and a notebook. The second QOS system includes a third mobile phone, a fourth mobile phone, a large screen device, and a notebook. Different QOS systems may include the same electronic devices, that is, an electronic device may belong to different multiple QOS systems at the same time. Exemplarily, the notebook belongs to the first QOS system and the second QOS system at the same time.

[0107] Electronic devices belonging to the same QOS system can establish at least one link. A link is a data transmission channel from a first device to a second device for transmitting service data. Links in the same QOS system operate on the same channel or the same frequency band.

[0108] Among them, the same frequency band means being in the 2.4 GHz, 5 GHz, or other frequency bands. A frequency band can include multiple channels. Exemplarily, the available channels of an indoor access point (AP) in the 5 GHz frequency band can be divided into 13 channels such as 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165. The same channel in this application can be any channel provided by the above 2.4 GHz, 5.0 GHz, or other frequency bands. Taking the short-range communication method as Wireless Fidelity (WiFi) as an example, that the links in a QoS system work on the same channel can mean that the links established between multiple electronic devices in a QoS system can work under the same local area network, that is, belong to the same basic service set (BSS), or belong to the same extended service set (ESS). Or, some links in a QoS system belong to the same BSS or ESS, some links belong to the WiFi direct connection network, and other links belong to other networks with the same frequency band or the same channel. That the links in a QoS system work on the same frequency band can mean that the channels on which the links in the QoS system work belong to the same frequency band, such as belonging to one of the 2.4 GHz, 5 GHz, or other frequency bands.

[0109] As Figure 1B shown in the architecture diagram of the communication system, this communication system is illustrated by taking a QoS system as an example.

[0110] Exemplarily, this communication system can include a QoS system composed of multiple electronic devices. The multiple electronic devices can communicate with each other through a short-range communication method and can establish at least one link, and these links work on the same frequency band or the same channel. As Figure 1B shown, the multiple electronic devices can include terminals such as mobile phones (11, 12, and 13), laptop 15, and large-screen device 16.

[0111] Taking the example of the first device sending service data (such as data for screen mirroring service) to the second device, the first device can also be called the sending end of the service, and the second device can also be called the receiving end of the service. In one implementation, both the sending end and the receiving end of the service are two devices in the QoS system. In another implementation, the sending end of the service is a device in the above QoS system, and the receiving end of the service can be another device in the above QoS system or a router in the communication system.

[0112] Services are carried on links. The link may include switching nodes in the middle. For example, the link 41 between mobile phone 11 and mobile phone 12 may include a switching node such as a router; the link may also not include a switching node in the middle, such as for WiFi direct connection, such as the link 42 between mobile phone 13 and laptop 15, the link 44 between mobile phone 14 and large screen device 16, and the link 43 between mobile phone 13 and large screen device 16.

[0113] The services running in the application layer can be divided into three service types, including real-time services, delay-sensitive services, and file transfer services. In some other embodiments, it can also be divided into two service types, such as file transfer services and non-file transfer services. Among them, non-file transfer services include real-time services and delay-sensitive services. The following briefly introduces these three service types:

[0114] (1) Real-time service: Generate data to be transmitted at a fixed period. For example, the screen mirroring service usually generates a video frame every 16 milliseconds. To ensure the real-time transmission of the service, this service usually requires a relatively small average transmission delay.

[0115] (2) Delay-sensitive service: This type of service randomly generates data to be transmitted and has requirements for the average transmission delay of the data.

[0116] (3) File transfer service: When the service is initiated, the content and size of the data to be transmitted can be determined, and there may also be requirements for the data transmission completion time (i.e., the average transmission rate).

[0117] It can be understood that the application layer can identify the service types of each service based on the characteristics of the above-mentioned services.

[0118] Among them, real-time services may include screen mirroring services, etc., delay-sensitive services may include voice call services, video call services, video on demand services, etc., and file transfer services may include video file transfer services, text file transfer services, image file transfer services, web page transfer services, etc.

[0119] Exemplarily, Figure 1B In, mobile phone 11 and mobile phone 12 make a voice call, and link 41 carries the voice call service V1 sent from mobile phone 11 to mobile phone 12; link 41 also carries the voice call service V2 sent from mobile phone 12 to mobile phone 11. Mobile phone 13 sends a video file to laptop 15 and an image to large screen device 16, then link 42 carries the file transfer service D1 sent from mobile phone 13 to laptop 15, and link 43 carries the file transfer service D2 sent from mobile phone 13 to large screen device 16; mobile phone 14 mirrors the screen to large screen device 16, and link 44 carries the screen mirroring service P1.

[0120] Above, the services carried by each link are exemplarily shown. It should be understood that one link can carry one or more services.

[0121] In the following embodiments of this application, the short-range communication is taken as an example of WiFi communication for illustration. It should be understood that in some other embodiments, the above short-range communication method can also be Bluetooth, near field communication (NFC), etc. The above short-range communication method can also include multiple types. Exemplarily, the above links 41, 42, and 43 are established through WiFi and all operate in the 2.4 GHz band, and links 44 and 45 are established through Bluetooth and operate in the 2.4 GHz band.

[0122] It should be understood that the above Figure 1B devices, services, links, etc. are only for exemplary illustration. In some other embodiments, the QOS system may also include more or fewer electronic devices, the types of electronic devices can also be replaced with other devices, and the services between electronic devices can also be other services.

[0123] The above electronic devices can be intelligent terminal devices and can be of various types. The embodiments of this application do not limit their specific types. For example, it can be a mobile phone, and can also include a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a smart screen, a wearable device, an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a car computer, a smart headset, a game console, and can also be an Internet of Things (IOT) device or a smart home device such as a smart TV, etc. Without limitation, it can also be a non-portable terminal device such as a laptop with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel, etc.

[0124] Multiple electronic devices operating in the same band or on the same channel share the bandwidth. The bandwidth resources of the same channel are limited, and it is necessary to reasonably allocate the link bandwidth between multiple electronic devices operating on the same channel. In one implementation, an electronic device can sense its own service and perform bandwidth allocation based on its own service, and cannot sense the services of other devices. It is possible that this electronic device allocates a large amount of bandwidth for its own service. As a result, the service bandwidth of other devices is insufficient and the service transmission cannot be completed. Exemplarily, in combination with the above Figure 1B, there are only two file transfer services on mobile phone 13. There may be a screen mirroring service on mobile phone 14, and voice call services on mobile phones 11 and 12. However, mobile phone 13 only allocates bandwidth based on its own services. Mobile phone 13 will increase the bandwidth for file transfer services. Therefore, the optimization strategy of increasing the bandwidth for file transfer services on mobile phone 13 will inevitably lead to insufficient bandwidth for the screen mirroring service on mobile phone 14 and the voice call services on mobile phones 11 and 12, resulting in lags and increased delays in the screen mirroring service and voice call services. It can be seen that this bandwidth allocation method will result in unreasonable bandwidth allocation and cannot guarantee the bandwidth for high-priority services of other devices in the QOS system.

[0125] Therefore, in order to guarantee the service quality of services in the QOS system, this application provides a QOS optimization method, which collects the link information of the links and the service information of the services in the QOS system to reasonably allocate bandwidth by combining the link information of all links and the service information of the services in the QOS system.

[0126] In this application, considering that the real-time requirement of the file transfer service is not high and non-file transfer services (i.e., real-time services or delay-sensitive services) are sensitive to delays, when there are non-file transfer services such as real-time services or delay-sensitive services, the bandwidth requirements of real-time services or delay-sensitive services are preferentially satisfied to guarantee the QOS of non-file transfer services.

[0127] This application provides two QOS optimization schemes for multiple devices, namely, the distributed and centralized schemes, which are described separately as follows.

[0128] First, the distributed QOS optimization scheme for multiple devices provided by the embodiments of this application is described.

[0129] In one implementation, devices acting as senders in the QoS system collect their own device link information and device service information and send them to other devices. Among them, the device service information of a device includes the service information of services with the device as the sender, and the device link information of a device includes the link information of the link carrying the service with the device as the sender. Alternatively, each device in the QoS system collects its own device link information and device service information and sends them to other devices. When a device has no service, the information it sends is empty. Thus, devices in the QoS system can collect the link information of all links in the QoS system and the service information of the services carried by each link, and based on this, perform bandwidth allocation for the services they need to send. Specifically, devices in the QoS system can calculate the speed limit value of their own file transfer service based on the received service information and link information, and then transmit the file to be transmitted by the file transfer service at a bandwidth value not greater than the speed limit value to limit the transmission rate of the file transfer service. The above method optimizes QoS through multi-device collaboration and limits the bandwidth of file transfer services in the QoS system, thereby ensuring the bandwidth of services sensitive to latency in the QoS system.

[0130] It should be understood that in the distributed QoS optimization method, the first electronic device can be any sender of the file transfer service in the QoS system, and the second electronic device is any sender of non-file transfer services other than the first electronic device in the QoS system. The first service data can be the service data of the service with the first electronic device as the sender. The first service is a file transfer service among the services with the first electronic device as the sender, and the first link is the link carrying the file transfer service. The second service data can be the service data of the service with the second electronic device as the sender. The second service is a non-file transfer service among the services with the second electronic device as the sender, and the second link is the link carrying the non-file transfer service.

[0131] Not limited to the above services such as the first service and the second service, links such as the first link and the second link, the first electronic device can also obtain the service information of more services and the link information of more links, and calculate the speed limit value by combining the service information of more services and the link information of more links.

[0132] Among them, the link information of a link includes the identifier of the link, the highest effective rate, and the identifier of the channel on which the link operates, etc. The service information of a service includes the identifier of the service, the requested bandwidth, the service type, etc. The service information of the file transfer service may not include the requested bandwidth.

[0133] Among them, the identifier of a link is used to distinguish links in the QoS system, and can be represented by the identifiers of the two devices that create the link. When there is a switching node (such as a router) in the link, the identifier of the link can also include the identifier of the switching node. Optionally, the device link information of the device itself can also include the number of links created with the device that operate on the same channel or the same frequency band, so as to facilitate the device receiving the device link information to determine whether it has collected all the required link information.

[0134] The highest effective rate of a link can reflect the highest transmission rate that the link can achieve, and can be determined based on the Modulation and Coding Scheme (MCS) rate of the link. The MCS rate is also called the negotiated rate. For example, it is the MCS rate of the link, or the MCS rate multiplied by a coefficient that is greater than 0 and less than 1, such as 0.7, 0.8, etc.

[0135] It should be understood that when the link contains a switching node (such as a router), if the link is a transmission channel from the first device to the second device through the router, then the highest effective rate of the link is the minimum of the MCS rate between the first device and the router and the MCS rate between the router and the second device, or the minimum value multiplied by a coefficient that is greater than 0 and less than 1, such as 0.5, 0.25, etc.

[0136] The identifier of a service is used to distinguish services in the QoS system, and can be represented by the identifier of the link carrying the service and the identifier of the service in the link. The identifier of the service in the link is used to distinguish services in the same link. The device service information of the device itself can also include the number of services, so that the device receiving the device service information can determine whether it has collected all the required service information.

[0137] Optionally, when the device sends device link information and device service information, the service information of a service and the link information of the link carrying the service are usually sent together to indicate the link carrying the service.

[0138] Exemplarily, in the above Figure 1BIn the QoS system shown, mobile phone 11 sends the device link information of mobile phone 11 (including the identifier of link 41, the highest effective rate, and the identifier of the channel on which it operates) and device service information (the identifier of voice call service V1, the required bandwidth, and the service type) to other devices in the QoS system; mobile phone 12 sends the device link information of mobile phone 12 (including the identifier of link 41, the highest effective rate, and the identifier of the channel on which it operates) and device service information (the identifier of voice call service V2, the required bandwidth, and the service type) to other devices in the QoS system; mobile phone 13 sends the device link information of mobile phone 13 (including the identifier of link 42, the highest effective rate, and the identifier of the channel on which it operates, and the identifier of link 43, the highest effective rate, and the identifier of the channel on which it operates) and device service information (the identifiers and service types of file transfer services D1 and D2, the identifier of screen mirroring service P3, the required bandwidth, and the service type) to other devices in the QoS system; mobile phone 14 sends the device link information of mobile phone 14 (including the identifier of link 45, the highest effective rate, and the identifier of the channel on which it operates) and device service information (the identifier of screen mirroring service P1, the required bandwidth, and the service type) to other devices in the QoS system. Laptop 15 sends the device link information of laptop 15 (including the identifier of link 42, the highest effective rate, and the identifier of the channel on which it operates, and the identifier of link 45, the highest effective rate, and the identifier of the channel on which it operates) and device service information (the identifier of screen mirroring service P2, the required bandwidth, and the service type) to other devices in the QoS system. Since the large screen device 16 does not contain services that need to be sent, it does not need to send its own device link information and device service information. Alternatively, although the large screen device 16 does not contain services that need to be sent, the large screen device 16 can also send device link information and device service information, and in this case, the device link information and device service information can be empty. Each device in the QoS system can collect the link information of all links and the service information of all services in the QoS system. Therefore, the speed limit values of their respective file transfer services can be calculated. In some embodiments, devices that only contain file transfer services, such as mobile phone 13, need to calculate the speed limit value of its file transfer service, while other devices do not need to calculate the speed limit value of the file transfer service because they do not contain file transfer services.

[0139] It can be seen that although mobile phone 13 has two file transfer services, when performing QoS optimization, since it knows the required bandwidths of non-file transfer services with high real-time requirements in the QoS system, namely screen mirroring services P1 and P2 and voice call services V1 and V2, it will limit the speed of these two file transfer services to preferentially ensure the bandwidth requirements of screen mirroring services P1 and P2 and voice call services V1 and V2.

[0140] Among them, the method for a device in the QoS system to determine the speed limit value of a file transfer service can be as follows: Each device or a device including a file transfer service can calculate the total time occupancy ratio of non-file transfer services based on the required bandwidth of non-file transfer services received and the highest effective rate of the link carrying the non-file transfer services. Furthermore, the maximum total time occupancy ratio of the file transfer service can be determined, and then the speed limit value of each device's file transfer service can be determined based on the maximum total time occupancy ratio of the file transfer service. Each device can send the file transfer service with a bandwidth value not greater than the speed limit value to limit its own file transfer service, so as to use the bandwidth of the file transfer service to meet the required bandwidth of services sensitive to delay (real-time services or delay-sensitive services) and improve the QoS of services sensitive to delay.

[0141] Moreover, the above method can be dynamically adjusted based on changes in the link information or service information of the QoS system, so as to adjust the speed limit value of the file transfer service in real time under the condition of preferentially guaranteeing the QoS of services sensitive to delay, making full use of communication resources, and improving the QoS of the file transfer service.

[0142] The following describes the centralized QoS optimization solution for multiple devices provided by the embodiments of the present application.

[0143] A device in the QoS system serves as a central control device. This central control device can not only collect its own device service information and device link information, but also collect the device service information and device link information of other devices. Based on this, it calculates the speed limit value of each file transfer service in the system and sends the speed limit values of each file transfer service to the sending end of the file transfer service. In this way, the device can send the file transfer service with a bandwidth value not greater than the speed limit value to limit the corresponding file transfer service. The above method optimizes QoS based on the service information of multiple devices and limits the bandwidth of file transfer services in multiple devices, thereby guaranteeing the QoS of services sensitive to delay in the QoS system.

[0144] Among them, the method for the central control device to determine the speed limit value of the file transfer service is the same as the method for a device to determine the speed limit value of the file transfer service in the above distributed QoS optimization solution.

[0145] The following combines Figure 2 to make a schematic description of the centralized QoS optimization solution provided by the present application.

[0146] Based on the above Figure 1BTaking the QoS system shown as an example, the exemplary central control device is the notebook 15. Each device in the QoS system or a device that needs to send services sends its respective device link information and device service information to the notebook 15, that is: The mobile phone 11 sends its own device link information (including the identifier of link 41, the highest effective rate, and the identifier of the channel it works on) and device service information (the identifier of voice call service V1, the required bandwidth, and the service type) to the notebook 15; The mobile phone 12 sends its own device link information (including the identifier of link 41, the highest effective rate, and the identifier of the channel it works on) and device service information (the identifier of voice call service V2, the required bandwidth, and the service type) to the notebook 15; The mobile phone 13 sends its own device link information (including the identifier of link 42, the highest effective rate, and the identifier of the channel it works on, as well as the identifier of link 43, the highest effective rate, and the identifier of the channel it works on) and device service information (the identifiers of file transfer services D1, D2 and the service type, the identifier of screen mirroring service P3, the required bandwidth, and the service type) to the notebook 15; The mobile phone 14 sends its own device link information (including the identifier of link 45, the highest effective rate, and the identifier of the channel it works on) and device service information (the identifier of screen mirroring service P1, the required bandwidth, and the service type) to the notebook 15. The notebook 15 obtains its own device link information (including the identifier of link 42, the highest effective rate, the identifier of the channel it works on, and the identifier of link 45, the highest effective rate, the identifier of the channel it works on) and device service information (the identifier of screen mirroring service P2, the required bandwidth, and the service type). Since the large screen device 16 does not contain services that need to be sent, it does not need to send its device link information and device service information to the notebook 15. Or, although the large screen device 16 does not contain services that need to be sent, the large screen device 16 can also send device link information and device service information. At this time, the device link information and device service information can be empty. Furthermore, the notebook 15 can collect the link information of each link and the service information of each service in the QoS system. Based on this, the speed limit value of each file transfer service can be calculated, that is, the speed limit values of file transfer services D1, D2. Furthermore, the speed limit values of file transfer services D1, D2 are sent to the device corresponding to the file transfer service (that is, the sending end of the file transfer service), that is, the mobile phone 13. Furthermore, the mobile phone 13 sends the service data of file transfer service D1 with a bandwidth value not greater than the speed limit value of file transfer service D1, and sends the service data of file transfer service D2 with a bandwidth value not greater than the speed limit value of file transfer service D2 to limit the file transfer services D1, D2. In this embodiment, the sending of device link information and device service information can be reduced. Just send them all to the central control device, and the central control device will calculate. There is no need for each device to calculate, which not only reduces communication overhead but also improves the QoS optimization efficiency.

[0147] In some embodiments, each device in the QOS system can detect events to trigger the above QOS optimization solutions. The device can detect events such as the creation, closing, lagging, and change in the requested bandwidth of services, as well as change events such as the transmission rate or the highest effective rate of the link. When detecting these events, it can trigger the collection of device service information, device link information, etc. of each device in the QOS system, so as to execute the above-mentioned distributed or centralized QOS optimization method based on the collected information.

[0148] It should be understood that the notebook 15 can also include file transfer services and / or non-file transfer services to be sent. In this case, the notebook 15 will also collect its own device service information and device link information. The above takes the Figure 2 scenario shown as an example for illustration. It should be understood that the QOS system can include more or fewer devices, services, and links than the Figure 2 system shown above.

[0149] In an application scenario, the mobile phone 13 is the first electronic device, the mobile phone 14 is the second electronic device, and the large-screen device 16 is the third electronic device. At this time, the link 43 is the first link, the link 44 is the second link, the file transfer service D2 is the first service, and the screen mirroring service P1 is the second service.

[0150] In another application scenario, the mobile phone 13 is the first electronic device, the mobile phone 14 is the second electronic device, the notebook 14 is the third electronic device, and the large-screen device 16 is the fourth electronic device. At this time, the link 42 is the first link, the link 44 is the second link, the file transfer service D1 is the first service, and the screen mirroring service P1 is the second service.

[0151] In another application scenario, the mobile phone 13 is the first electronic device, the notebook 14 is the second electronic device, and the large-screen device 16 is the third electronic device. At this time, the link 42 is the first link, the link 45 is the second link, the file transfer service D1 is the first service, and the screen mirroring service P2 is the second service.

[0152] In another application scenario, the mobile phone 13 is the first electronic device, the mobile phone 14 is the second electronic device, and the large-screen device 16 is the third electronic device. At this time, the link 42 is the first link, the link 43 is the second link, the file transfer service D1 is the first service, and the screen mirroring service P3 is the second service.

[0153] It should be noted that the distributed or centralized QOS optimization method provided in the embodiments of the present application is an optimization of the services involved in a QOS system, and the channels corresponding to the links carrying these services are the same channel or belong to the same frequency band. However, for services belonging to other QOS systems, they participate in the optimization of other QOS systems.

[0154] As shown Figure 3 in the figure, it is a schematic diagram of the hardware structure of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 may be a mobile phone, a notebook, a large-screen device, a central control device, etc. as described above Figure 1A , Figure 1B or Figure 2 in the text, or devices A, B, C, the first electronic device, the central control device, etc. in the method embodiments below, and is used to execute the methods executed by each device in the following method embodiments.

[0155] The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, antennas 103A, 104A, etc. Among them, the wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above-mentioned multiple parts can transmit data through a bus.

[0156] The processor 101 may include one or more processing units. For example, the processor 101 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0157] The memory 102 may be used to store computer-executable program code, and the executable program code may include instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the memory 102, such as executing the various methods provided by the embodiments of the present application.

[0158] The wireless communication function of the electronic device 100 may be implemented by the antennas 103A, 104A, the mobile communication module 104, the wireless communication module 103, the modem processor, and the baseband processor, etc.

[0159] Antennas 103A and 104A can be used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, antenna 103A can be multiplexed 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.

[0160] The mobile communication module 104 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 104 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 104 can receive electromagnetic waves by antenna 104A, and perform processing such as filtering and amplifying the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 104 can also amplify the signal modulated by the modulation and demodulation processor, and the amplified signal is converted into electromagnetic waves by antenna 104A and radiated out. In some embodiments, at least some functional modules of the mobile communication module 104 can be disposed in the processor 101. In some embodiments, at least some functional modules of the mobile communication module 104 can be disposed in the same device as at least some modules of the processor 101.

[0161] The modulation and demodulation processor can include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. In some embodiments, the modulation and demodulation processor can be an independent device. In some other embodiments, the modulation and demodulation processor can be independent of the processor 101 and be disposed in the same device as the mobile communication module 104 or other functional modules.

[0162] The wireless communication module 103 can provide wireless communication solutions applied to the electronic device 100, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 103 receives electromagnetic waves via the antenna 103A, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 101. The wireless communication module 103 can also receive the signals to be sent from the processor 101, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 103A for radiation.

[0163] In some embodiments, the antenna 104A of the electronic device 100 is coupled to the mobile communication module 104, and the antenna 103A of the electronic device 100 is coupled to the wireless communication module 103, so that the electronic device 100 can communicate with the network and other devices through wireless communication technologies.

[0164] It can be understood that the structure illustrated in the embodiments 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 figures, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0165] In the embodiments of the present application, the wireless communication module 103 can be used for WiFi connection between electronic devices and the transmission of data such as data or instructions.

[0166] For the operations performed by each device in the electronic device 100, reference can be specifically made to the relevant descriptions in the foregoing method embodiments, and details will not be elaborated here.

[0167] Exemplarily, Figure 4 shows the software and hardware architecture of the electronic device 100 provided by the embodiments of the present application.

[0168] Such as Figure 4As shown, the software architecture of the electronic device may adopt a layered architecture. The layered architecture divides the system into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into five layers, from top to bottom: the application layer, the application framework layer (framework), the system libraries and Android runtime, the hardware abstraction layer (HAL), and the driver layer. Among them: the application framework layer, the system libraries and Android runtime, and the hardware abstraction layer are not shown in Figure 4 shown.

[0169] The application layer (application) may include a series of applications. For example, the application package may include applications such as WLAN applications, Bluetooth applications, application continuity, call sharing, notification sharing, keyboard and mouse sharing, file sharing, screen mirroring, video, and gallery, as well as other applications not shown, such as music, camera, browser, WeChat TM , Douyin TM and other applications.

[0170] Among them, the WLAN application is mainly used to implement the opening, connection, and setting of WLAN, etc. The Bluetooth application is used to implement the opening, connection, and setting of Bluetooth, etc. The application continuity application is used to implement the mutual continuity of the content and usage status of applications between this electronic device and nearby devices. The call sharing application is used to implement the answering of calls from nearby devices and the continuation of calls from this electronic device. Exemplarily, the smart screen can answer calls from this electronic device, and tablets and computers also support making calls. Notification sharing is used to implement the reception of notifications from this electronic device by nearby devices and support processing on these devices. Keyboard and mouse sharing is used to share input devices between this electronic device and nearby computers, or the mouse, keyboard, and touchpad of a computer or tablet are shared with this electronic device, and it can also implement cross-device file transfer, cross-device window display and use. The file sharing application is used to wirelessly share files with other electronic devices within the same network to achieve fast file sharing or printing. The screen mirroring application is used to link this electronic device with a large-screen device to display the content such as videos shown on this electronic device through the large-screen device, or to link this electronic device with a small-screen device to display the content such as videos shown on the small-screen device through the large screen on this electronic device. Here, "large screen" and "small screen" refer to the relative size of the display screen of the electronic device.

[0171] The application layer also includes a video transmission service interface, a message transmission service interface, an audio transmission service interface, a file transmission service interface, a keyboard and mouse transmission service interface, a file stream transmission service interface, etc., as well as the services corresponding to these interfaces respectively, including a video transmission service, a message transmission service, an audio transmission service, a file transmission service, a keyboard and mouse transmission service, and a file stream transmission service. Among them, the video transmission service, the message transmission service, the audio transmission service, the file transmission service, the keyboard and mouse transmission service, and the file stream transmission service are respectively used to implement video transmission, message transmission, audio transmission, file transmission, keyboard and mouse transmission, and file stream transmission. The upper-layer application realizes the transmission of business data of the service created by it by calling these interfaces. Exemplarily, after the upper-layer application "screen mirroring" creates a screen mirroring service, it calls the video transmission service interface, and the video transmission service responds to this call to realize the transmission of business data of the screen mirroring service.

[0172] The application layer may also include a QOS control engine. The QOS control engine may be an application invisible to the user and may include some or all of the following functional modules: a bandwidth management system, an information update system, a QOS scheduling system, a QOS bandwidth allocation system, a sending system, and a QOS monitoring system, etc. Among them:

[0173] When the application creates a service, it sends a connection request or a service creation request, as well as the required bandwidth of the service, to the bandwidth management system.

[0174] The bandwidth management system is used to calculate the remaining bandwidth and determine whether the remaining bandwidth can meet the requirements of the service to be created after receiving the request and the required bandwidth of the upper-layer application. The bandwidth management system is also used to establish a link.

[0175] The information update system is used to collect its own service information and link information, receive the service information and link information of other devices in the QOS system, and send a scheduling request to the QOS scheduling system when receiving a notification or instruction sent by other devices to indicate re-scheduling of QOS, or when it recognizes that there is an update, increase or decrease in the service information or link information in the QOS system, so as to trigger the re-scheduling of QOS. Among them, the service information includes the bandwidth requirement of the service. The link information includes the highest effective rate of the link.

[0176] The QOS scheduling system is used to respond to the scheduling request, determine whether the current QOS system includes a file transmission service or whether the electronic device itself includes a file transmission service. When a file transmission service is included, it recalculates the speed limit value of the file transmission service and sends the required bandwidth of its non-file transmission service and the speed limit value of the file transmission service to the QOS bandwidth allocation system.

[0177] The QOS bandwidth allocation system is used to allocate bandwidth for non-file transfer services based on the required bandwidth of the received non-file transfer services, and allocate bandwidth for non-file transfer services based on the speed limit value of file transfer services, and send the allocated bandwidth of each service to the sending system.

[0178] The sending system is used to send down the service data of the services at their respective allocated bandwidths.

[0179] The QOS monitoring system is used to monitor changes in the service information of services and changes in the link information of links, so as to trigger the information update system to update the service information and link information of the QOS system when changes occur.

[0180] In some embodiments, the information update system is also used to implement the measurement of the highest effective rate of the link in the QOS system.

[0181] The application framework layer (framework) can provide application programming interfaces (application programming interface, API) and programming frameworks for the applications in the application layer. The framework layer includes some predefined functions. For example, it can include an activity manager, a window manager, a view system, a resource manager, a notification manager, an audio service, a camera service, etc., and the embodiments of the present application do not make any restrictions on this.

[0182] The system library can include multiple functional modules. For example: surface manager, Media Libraries, OpenGL ES, SGL, etc.

[0183] The hardware abstraction layer is an interface layer located between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. From the perspective of software and hardware testing, the testing work of software and hardware can be completed separately based on the hardware abstraction layer, making it possible to perform the software and hardware testing work in parallel.

[0184] The driver layer includes drivers for various hardware. The driver layer can include a Bluetooth driver, a WIFI driver, etc. Among them, the Bluetooth driver is used to drive the Bluetooth module. The WIFI driver is used to drive the WIFI module.

[0185] As follows, taking Figure 5 the QOS system composed of the three devices shown as an example, where the three devices communicate through WiFi, this paper illustrates the QOS optimizations caused by events such as the creation, closing, lag, change in the required bandwidth of services, and change in the transmission rate of links.

[0186] See Figure 5In the application scenario shown, the QOS system includes Device A (such as a mobile phone), Device B (such as a tablet computer), and Device C (such as a PC). The mobile phone is connected to the tablet computer and the PC via WiFi respectively. The following links and services can be established in sequence:

[0187] ① Establish a link L between the mobile phone and the tablet computer AB , the user can project the meeting window on the mobile phone to the tablet computer, that is, the mobile phone creates a screen projection service to the tablet computer, and the mobile phone sends the screen projection service P1 to the tablet computer through the link L AC ;

[0188] ② Transfer the call of the mobile phone to the tablet computer. The mobile phone creates a voice call service V1 and sends the service data of the voice call service V1 (that is, the voice information received by the mobile phone) to the tablet computer through the link L AB . At the same time, the tablet computer creates a voice call service V2 and sends the service data of the voice call service V2 (that is, the voice information collected by the microphone of the tablet computer) to the mobile phone through the link L AB ;

[0189] ③ Establish a link L between the mobile phone and the PC AC , the mobile phone shares the file to be shared with the PC. The mobile phone establishes a file sharing service D1 and sends the service data of the file sharing service D1 (the file to be shared) to the PC through the link L AC ;

[0190] It should be understood that the above links L AB and L AC work on the same channel or the same frequency band.

[0191] In this application, the above Device A (mobile phone) is the first electronic device, Device B (tablet computer) is the second electronic device, Device C (PC) is the third electronic device, the link L AC is the first link, the link L AB is the second link, the file sharing service D1 is the first service, the voice call service V2 is the second service, or the voice call service V1 is the third service and the screen projection service P1 is the fourth service, as an example. It should be understood that in some other embodiments, the above Device B (tablet computer) can also be used as the first electronic device, and the above Device A (mobile phone) and the above Device C (PC) are the second electronic device and the third electronic device respectively. Or, the above Device C (PC) can also be used as the first electronic device, and the above Device A (mobile phone) and the above Device B (tablet computer) are the second electronic device and the third electronic device respectively.

[0192] Not limited to the above scenario, it may also include other specific scenarios. The following takes this scenario as an example to illustrate.

[0193] Combined with the aboveFigure 3 and Figure 4 the hardware architecture, software and hardware architecture of the electronic device shown in Figure 5 the application scenarios shown in , the QOS optimization method provided by the present application will be described in detail below. This method is divided into QOS optimization processes caused by several stages such as service creation, WiFi transmission rate change, service requirement change, lag, and service end. It should be understood that during the life cycle of the service, QOS optimization processes such as the QOS optimization process caused by the change of WiFi transmission rate, the QOS optimization process caused by the change of service requirements, and the QOS optimization process caused by lag can occur once or multiple times, or may not occur.

[0194] (1) QOS optimization process caused by service creation

[0195] Taking Figure 5 the creation of the screen mirroring service P1 in the scenario shown in as an example, Figure 6A exemplarily shows the QOS optimization method involved when device A in the QOS system creates a screen mirroring service to device B. The method includes but is not limited to the following steps:

[0196] S101, the screen mirroring application of device A receives an operation to perform screen mirroring to device B.

[0197] Exemplarily, as Figure 7A the user interface 71 of the "Settings" application shown in , this interface may include a smart connection control 711 and a more connection control 712. Device A can detect a user operation acting on the more connection control 712. In response to this user operation, device A can display a user interface 72 as shown in Figure 7B this user interface 72 may include a file sharing control 721, a screen mirroring control 722, etc. Device A can detect a user operation acting on the screen mirroring control 722. Device A can display a user interface 73 as shown in Figure 7C this user interface 73 may include a wireless screen mirroring control 731. Device A detects a user operation acting on this wireless screen mirroring control 731, turns on Bluetooth, searches for available devices, and displays as shown in Figure 7DThe user interface 74 shown includes a list of available devices. For example, the list of available devices includes a device identifier 741 of device B. The operation of casting the screen to device B can be a user operation acting on the device identifier 741. Device A detects the user operation acting on the device identifier 741. In response to the user operation, device A initiates the screen casting transmission to device B. It should be understood that device A can also initiate the screen casting transmission to device B in other ways. For example, device A acts on the top of the display screen by a pull-down operation to display the interface of the control center. The interface of the control center includes a screen casting icon. In response to the detected user operation acting on the screen casting icon, available devices under the same network are searched, and screen casting transmission to the default device B is initiated.

[0198] S102, in response to receiving the screen projection operation, the screen projection application of device A sends a request for establishing a wireless fidelity (WiFi) connection with device B and the requested bandwidth of the screen projection service to the bandwidth management system.

[0199] For example, the required bandwidth for the screen projection service may be 30 Mbps.

[0200] S103: The bandwidth management system of device A requests the WiFi driver to establish a WiFi connection with device B.

[0201] The WiFi connection may be a WiFi direct connection or a connection through a WiFi router. In another implementation, device A and device B may establish a WiFi connection in advance, at which point S106 may be directly executed, and the bandwidth management system may send the requested bandwidth of the screen projection service to the information update system.

[0202] S104, the WiFi driver of device A establishes a WiFi connection with the WiFi driver of device B.

[0203] After the WiFi connection is established, a link L is established between device A and device B on channel K1. AB .

[0204] S105: The bandwidth management system of device A determines whether the remaining bandwidth meets the bandwidth requirement of the screen projection service.

[0205] The remaining bandwidth refers to the link L in the QOS system. AB The remaining bandwidth or link L of the operating channel K1 AB The remaining bandwidth of the frequency band where the working channel K1 is located. This application takes the remaining bandwidth of the channel as an example for explanation.

[0206] The general calculation method of the remaining bandwidth can be the total time proportion of the file transfer service and the link L ABThe product of the highest effective rate. The QOS scheduling system can update the total time ratio of the latest file transfer service to the bandwidth management system. The QOS scheduling system or the information update system can also update the latest effective rate of link L AB to the bandwidth management system so that the bandwidth management system can calculate the remaining bandwidth. Alternatively, the QOS scheduling system calculates the remaining bandwidth and updates the latest remaining bandwidth of link L AB to the bandwidth management system. The calculation method of the remaining bandwidth can be referred to the method of calculating the remaining bandwidth shown below Figure 13 .

[0207] Since there is no non-file transfer service in the QOS system before the screen mirroring service is created, at this time, the maximum total time ratio of the file transfer service is 1, and the remaining bandwidth is the highest effective rate of link L AB , which is 200 Mbps.

[0208] If the remaining bandwidth is insufficient, that is, it cannot meet the requirements of the screen mirroring service, the bandwidth management system of device A will feedback to the screen mirroring application that the remaining bandwidth is insufficient. At this time, the creation of the screen mirroring service fails. If the remaining bandwidth can meet the required bandwidth of the screen mirroring service, then execute S106.

[0209] S106. The bandwidth management system of device A sends a message to the screen mirroring application, and this message indicates that the remaining bandwidth meets the required bandwidth of the screen mirroring service.

[0210] After S106, the screen mirroring application of device A can send the service data of the screen mirroring service to device B through the link L AB established between device A and device B, that is, execute S115, and at the same time, S106 can also be executed.

[0211] S107. The bandwidth management system of device A sends the required bandwidth of the screen mirroring service to the information update system.

[0212] S108. The information update system of device A collects its own device service information and device link information and broadcasts the notification. Among them, the device service information collected by device A includes the identifier, required bandwidth and service type of the real-time service with device A as the sender, the identifier, required bandwidth and service type of the delay-sensitive service, and the identifier and service type of each file transfer service. The device link information collected by device A includes the identifier of the link carrying the service sent by device A, the highest effective rate and the identifier of the channel, etc. At this time, device A collects the identifier of the screen mirroring service P1, the required bandwidth of 30 Mbps and the service type 1, and the identifier of link L AB , the highest effective rate of 200 Mbps and the identifier of channel K1. Among them, service type 1 represents non-file transfer service, and service type 0 represents file transfer service.

[0213] After receiving the requested bandwidth, the information update system of Device A can also broadcast a notification. The notification is used to indicate the update of service information and link information or to indicate that the service information or link information of the QoS system has changed. In response to this notification, the information update systems of other devices (i.e., devices other than Device A in the QoS system) will also collect their own device link information and device service information, and send their own device link information and device service information to other devices, so that each device in the QoS system can collect the link information of all links in the QoS system and the service information of all services carried on each link. Since there is no service on Device B and Device C at this time, there is no need to collect their own device link information and device service information.

[0214] In some embodiments, the notification may not be sent, and each device in the QoS system triggers the generation of a scheduling request when it receives the changed device service information and / or changed device link information sent by other devices. Or, each device in the QoS system triggers the generation of a scheduling request when it collects the service information and link information sent by all devices.

[0215] S109. The information update system of Device A sends its own device service information and device link information to other devices.

[0216] The information update system of Device A can send the device link information and device service information of Device A itself to other devices. At this time, that is, it sends the identifier of the screen mirroring service P1, the requested bandwidth of 30 Mbps and the service type 1, as well as the identifier of link L AB the identifier of the highest effective rate of 200 Mbps and the identifier of channel K1.

[0217] In some other embodiments, the above S108 - S109 may not be executed either. Device A can also only send the updated device link information and updated device service information to other devices. For example, the screen mirroring service is a created service, a newly added service. Device A sends the identifier of the screen mirroring service, the requested bandwidth of 30 Mbps and the service type 1, and the identifier of the link used to carry this screen mirroring service, the highest effective rate of 200 Mbps and the identifier of channel K1. Here, the updated link information includes the link information of newly added links and the updated link information of existing links; the updated service information refers to the service information of newly added services and the updated service information of existing services.

[0218] It should be understood that when there is a service on other devices, the information update system of Device A will also receive the device service information and device link information from other devices. Since the screen mirroring service is the first service created by the QoS system here. Therefore, Device A will not receive the device service information and device link information sent by other devices.

[0219] S110. The information update system of Device A sends a scheduling request to the QoS scheduling system. This scheduling request carries the device link information and device service information received by Device A. That is, it carries the identifier of the screen mirroring service P1, the required bandwidth of 30 Mbps, and the service type 1, as well as the identifier of link L AB and the identifier of the highest effective rate of 200 Mbps and the identifier of channel K1.

[0220] The received device link information and device service information can be the link information of all links in the current QoS system and the service information of all services carried on each link, or can be the link information of some links and the service information of some services.

[0221] It should be understood that Device A will collect the device link information and device service information sent by other devices in the QoS system within a certain time interval (such as the first duration after the broadcast notification in S108 above, such as within 3 s), and when reaching the first duration, execute S110, or execute S110 after executing S109.

[0222] S111. The QoS scheduling system of Device A, in response to the scheduling request, determines whether the service to be sent by itself includes a file transfer service. When it does not include a file transfer service, there is no need to calculate the file speed limit value. When it includes a file transfer service, the speed limit value of the file transfer service needs to be calculated.

[0223] At this time, among them, the service to be sent by Device A itself is also the service with Device A as the sending end. Among the services currently to be transmitted by Device A, there is only the screen mirroring service and no file transfer service. Therefore, there is no need to calculate the speed limit value of the file transfer service.

[0224] S112. The QoS scheduling system of Device A sends the required bandwidth of its non - file transfer services to the bandwidth allocation system.

[0225] In some embodiments, Device A can send the required bandwidth of all its non - file transfer services. At this time, Device A includes the screen mirroring service, that is, sends the required bandwidth of the screen mirroring service, 30 Mbps.

[0226] In other embodiments, Device A can only send the required bandwidth of the non - file transfer services that are newly added and updated by Device A itself relative to the previous scheduling request.

[0227] S113. The bandwidth allocation system of Device A allocates bandwidth for the non - file transfer services according to the required bandwidth of the non - file transfer services.

[0228] Considering that non-file transfer services have low requirements for real-time performance, this application preferentially allocates bandwidth for non-file transfer services based on the required bandwidth of the non-file transfer services to prioritize ensuring the QoS of non-file transfer services.

[0229] Among them, the allocated bandwidth for non-file transfer services can be their required bandwidth, and the allocated bandwidth for file transfer services can be less than or equal to their speed limit values.

[0230] Exemplarily, the allocated bandwidth for the screen mirroring service is its required bandwidth, which is 30 Mbps, and device A does not include file transfer services that need to be sent.

[0231] S114, the bandwidth allocation system of device A sends the allocated bandwidth of its own services to the sending system. At this time, device A includes the screen mirroring service, and the allocated bandwidth of the screen mirroring service, which is 30 Mbps, is sent.

[0232] S115, the screen mirroring application of device A sends the service data of the screen mirroring service to the sending system.

[0233] S116, the sending system of device A sends the service data of each service to the WiFi driver at the allocated bandwidth of its own services.

[0234] At this time, if the services to be sent by device A include the screen mirroring service, the sending system of device A sends the service data of the screen mirroring service to the WiFi driver at the allocated bandwidth of the screen mirroring service. Specifically, the service data of the screen mirroring service can be packed into data packets and then sent sequentially.

[0235] In another embodiment, for non-file transfer services, taking the above screen mirroring application as an example, after successfully creating the screen mirroring application, the screen mirroring application can send its required bandwidth (which is its allocated bandwidth) to the sending system, and the sending system can send the service data of the screen mirroring service to the WiFi driver based on the required bandwidth of the screen mirroring application. At this time, when step S111 determines that the services to be transmitted by itself do not include file transfer services, the above S112 - S114 may not be executed.

[0236] It should be understood that one implementation of sending the service data of a service based on the allocated bandwidth of the service can be that the rate at which the sending system sends the service data of the service does not exceed its allocated bandwidth, or the amount of service data of the service sent per unit time does not exceed the amount of data reached when sending at the allocated rate of the service per unit time.

[0237] S117, the WiFi driver of device A drives the WiFi module to send the service data of each service to device B through the link L established between device A and device B AB That is, the service data of the above screen mirroring service is sent to device B.

[0238] It should be noted that when device B includes services that need to be sent via WiFi, device B will also perform the steps of S109 - S116 performed by device A above. Figure 6A Taking the case where device B does not include services as an example for illustration.

[0239] After performing the method shown above Figure 6A Device A can also transfer the call to device B when receiving an incoming call, and device A and device B respectively create a voice call service. Figure 6B Exemplarily shows the QOS optimization method involved when device A and device B in the QOS system create a voice call service. This method includes but is not limited to the following steps:

[0240] S118, when the call application on device A receives a call request, it sends an incoming call interface to device B.

[0241] Specifically, after the call sharing function of device A is enabled, when device A receives an incoming call, that is, a call request, it displays the incoming call interface and sends this incoming call interface to device B. The incoming call interface can be the Figure 7E shown user interface 75, and this user interface 75 can include an answer control 751 and a reject control 752. The answer control 751 is used to answer the call, and the reject control 752 is used to hang up the call.

[0242] S119, when the call application on device B receives the incoming call interface, it displays the incoming call interface.

[0243] The incoming call interface displayed by device B is the Figure 7F shown user interface 76, including an answer control 761 and a reject control 762.

[0244] S120, the call application on device B responds to the answer operation and sends an instruction for indicating answer to the call application on device A.

[0245] The answer operation can be a user operation on the answer control 761 on the user interface 76, as shown in Figure 7F shown.

[0246] S121, the call application on device A answers the call in response to the instruction for indicating answer.

[0247] S122, the call application on device A sends information for indicating that the call has been answered to the call application on device B.

[0248] S123, the call application on device A sends a requested bandwidth of 30 Mbps for the voice call service V1 to its bandwidth management system.

[0249] S124. The bandwidth management system of Device A determines whether the remaining bandwidth meets the required bandwidth of the voice call service V1. If the remaining bandwidth is insufficient, i.e., it cannot meet the requirements of the voice call service V1, the bandwidth management system of Device A feeds back to the call application that the remaining bandwidth is insufficient. At this time, the creation of the voice call service V1 fails. If the remaining bandwidth can meet the required bandwidth of the voice call service V1, the call application of Device A can send the service data of the voice call service V1 to Device B through the link L established between Device A and Device B, that is, execute S138, and at the same time, S125 can be executed. AB Send the service data of the voice call service V1 to Device B, that is, execute S138, and at the same time, S125 can be executed.

[0250] Exemplarily, before creating the voice call service V1, the link information and service information included in the QOS system are as follows:

[0251] The link information includes: Link L AB : The highest effective rate γ1 = 200 Mbps, the identifier of channel K1.

[0252] The service information includes: The screen mirroring service P1, carried on Link L AB with the required bandwidth band1 = 30 Mbps and service type 1.

[0253] Based on the following Figure 13 shown remaining bandwidth calculation method, the remaining bandwidth of Device A is: (1 - 30 / 200) * 200 Mbps = 200 Mbps - 30 Mbps = 170 Mbps, which is greater than the required bandwidth of the voice call service V2 of 20 Mbps. Then the remaining bandwidth meets the requirements of the voice call service V2.

[0254] S125. The bandwidth management system of Device A sends the required bandwidth of the voice call service V1 to the information update system.

[0255] S126. The information update system of Device A collects the device service information and device link information of Device A itself and broadcasts it to other devices.

[0256] Similar to the above S108, at this time, the device service information of Device A itself includes the identifier of the screen mirroring service P1, the required bandwidth of 30 Mbps and service type 1, the identifier of the voice call service V1, the required bandwidth of 20 Mbps and service type 1, and the device link information includes the identifier of Link L AB the identifier of the highest effective rate of 200 Mbps and the identifier of channel K1.

[0257] S127. The information update system of Device A sends its own device service information and device link information to other devices.

[0258] Similar to the creation of the voice call service V1 by device A, after the call application of device B receives the information sent by device A indicating that the call has been answered, the following S128 - S132 are executed:

[0259] S128, the call application of device B sends a requested bandwidth of 30 Mbps for the voice call service V2 to its bandwidth management system.

[0260] S129, the bandwidth management system of device B determines whether the remaining bandwidth meets the requirement of the requested bandwidth for the voice call service V2.

[0261] If the remaining bandwidth is insufficient, that is, it cannot meet the requirements of the voice call service V2, the bandwidth management system of device B feeds back to the call application that the remaining bandwidth is insufficient. At this time, the creation of the voice call service V2 fails. If the remaining bandwidth can meet the requested bandwidth of the voice call service V2, the call application of device B can send the service data of the voice call service V2, that is, the voice information collected by the microphone of device B, to device A through the link L AB established between device A and device B. The call application of device A will then receive this voice information ( Figure 6B (not shown), and at the same time, the bandwidth management system of device B can also execute S130.

[0262] S130, the bandwidth management system of device B sends the requested bandwidth of the voice call service V2 to the information update system.

[0263] S131, the information update system of device B collects the device service information and device link information of device B itself and broadcasts it to other devices.

[0264] Similar to the above S108, at this time, the device service information of device B itself includes the identifier of the voice call service V2, the requested bandwidth of 20 Mbps, and the service type 1, and the device link information includes the identifier of link L AB the identifier of the highest effective rate of 200 Mbps, and the identifier of channel K1.

[0265] S132, the information update system of device B sends its own device service information and device link information to other devices.

[0266] At this time, the information update system of device A receives the device service information and device link information sent by other devices, such as the device service information and device link information of device B.

[0267] Exemplarily, the information update system of device A receives the device service information (the identifier of the voice call service V2, the requested bandwidth of 20 Mbps, and the service type 1) and the device link information (link L ABThe identifier, the highest effective rate of 200 Mbps, and the identifier of channel K1).

[0268] At this time, the link information and service information received by device A include:

[0269] The link information includes (the identifiers of the link and the channel are not shown):

[0270] Link L AB , device A (mobile phone) and device B (tablet): the highest effective rate γ1 = 200 Mbps;

[0271] The service information includes (the identifier of the service):

[0272] The screen mirroring service P1, carried on link L AB above, service type 1, required bandwidth band1 = 30 Mbps;

[0273] The voice call service V1, carried on L AB above, service type 1, required bandwidth band2 = 20 Mbps;

[0274] The voice call service V2, carried on L AB above, service type 1, required bandwidth band3 = 20 Mbps.

[0275] S133, the information update system of device A, sends a scheduling request to the QOS scheduling system. This scheduling request includes the link information and service information currently received by device A.

[0276] Exemplarily, taking the current QOS system including one link as an example, and the screen mirroring service P1, voice call service V1, and voice call service V2 carried on the link as an example, in practice, the QOS system may also include multiple links and more services, and device A may also receive device link information or device service information of other devices.

[0277] S134, the QOS scheduling system of device A, in response to the scheduling request, determines whether the service to be sent by itself includes a file transfer service. When it does not include a file transfer service, there is no need to calculate the file speed limit value. When it includes a file transfer service, the speed limit value of the file transfer service needs to be calculated. At this time, among the services to be transmitted by the current device A, there are the screen mirroring service P1 and the voice call service V1, and there is no file transfer service. Therefore, there is no need to calculate the speed limit value of the file transfer service.

[0278] S135, the QOS scheduling system of device A sends the required bandwidth of its non - file transfer services to the bandwidth allocation system.

[0279] Exemplarily, the required bandwidth for the screen mirroring service P1 is 30 Mbps, and the required bandwidth for the voice call service V1 is band2 = 20 Mbps.

[0280] In some embodiments, it is also possible to only send the required bandwidth of the newly added service or the service with changed service information. At this time, in S135, it is possible to send the required bandwidth of the voice call service V1, which is 20 Mbps.

[0281] S136. The bandwidth allocation system of device A allocates bandwidth for the non-file transfer service according to the required bandwidth of the non-file transfer service. At this time, device A only includes the screen mirroring service P1 and the voice call service V1. The required bandwidth of the screen mirroring service P1, which is 30 Mbps, is the allocated bandwidth of the screen mirroring service P1, and the required bandwidth of the voice call service V1, which is 20 Mbps, is the allocated bandwidth of the voice call service V1.

[0282] S137. The bandwidth allocation system of device A sends the allocated bandwidth of its own services to the sending system. At this time, since device A includes the screen mirroring service and the voice call service V1, the allocated bandwidth of the screen mirroring service, which is 30 Mbps, and the allocated bandwidth of the voice call service V1, which is 20 Mbps, are sent.

[0283] S138. The call application of device A sends the service data of the voice call service V1 to the sending system.

[0284] S139. The screen mirroring application of device A sends the service data of the screen mirroring service P1 to the sending system.

[0285] It should be understood that the service that device A currently needs to send also includes the screen mirroring service P1, and its screen mirroring application will also send the service data of the screen mirroring service P1 to the sending system.

[0286] S140. The sending system of device A sends the service data of each service to the WiFi driver according to the allocated bandwidth of its own services. At this time, the link L between device A and device B AB carries the screen mirroring service P1 and the voice call service V2. Then, the sending system of device A sends the service data of the screen mirroring service P1 at the allocated bandwidth of the screen mirroring service P1, and sends the service data of the voice call service V1 at the allocated bandwidth of the voice call service V1. Specifically, the service data of these services can be packed into data packets and sent sequentially.

[0287] S141. The WiFi driver of device A drives the WiFi module to send the service data of the voice call service V1 to device B through the link L established between device A and device B AB Specifically, the service data can be packed into data packets for sending.

[0288] It should be noted that, similar to Device A, Device B will also execute the steps S133 - S138 and S140 executed by Device A, Figure 6B which are not shown. The difference is that in S135, the requested bandwidth of 20 Mbps for the voice call service V2 is sent by Device B. In S136 - S137 and S140, Device B allocates bandwidth for the voice call service V2 and sends the service data of the voice call service V2 with the requested bandwidth of the voice call service V2 as the allocated bandwidth. The call application of Device B sends the service data of the voice call service V2 to its sending system. The sending system of Device B sends the service data of the voice call service V2 to the WiFi driver with the allocated bandwidth of the service, and then, its WiFi driver drives the WiFi module to send the service data of the voice call service V2 to Device A through the link L established between Device B and Device A. BA The service data of the voice call service V2 is sent to Device A.

[0289] S142, the call application of Device A receives the service data of the voice call service V2 from Device B.

[0290] Specifically, the call application of Device A receives the service data of the voice call service V2 from Device B through the WiFi module.

[0291] After executing the above - mentioned Figure 6A 、 Figure 6B shown method, Device A can also share files, such as pictures, with Device C. Figure 6C Exemplarily shown is a QOS optimization method involved in creating a file sharing service by Device A in the QOS system. This method includes but is not limited to the following steps:

[0292] S143, the application of Device A receives a user operation input by the user for indicating sharing a file with Device C.

[0293] As Figure 7G shown, Device A displays the user interface of the photo gallery, such as displaying the user interface 77 containing the file to be shared 771. Device A can detect the user operation acting on the file to be shared 771 and display the sharing control 772; Device A detects the user operation acting on the sharing control 772 and displays the sharing interface 78 as Figure 7H shown. The sharing interface 78 includes a file sharing control 781 for sharing to other devices; Device A detects the user operation acting on the file sharing control 781, turns on the Bluetooth, searches for available devices, and displays a list including the available devices. It shows that the device identifier of Device C is included in the available device list. Device A detects the user operation acting on the device identifier of Device C, which is the user operation for sharing a file with Device C, and this user operation instructs to transfer the file to be shared 771 to Device C.

[0294] S144. The picture library of device A sends a request to the bandwidth management system to indicate the establishment of a wireless fidelity (WiFi) connection with device C in response to the user operation.

[0295] S145. The bandwidth management system of device A requests the WiFi driver to establish a WiFi connection with device C.

[0296] At this time, device A and device C establish a WiFi connection, and a link L between device A and device C is established on channel K2. AC .

[0297] Among them, the WiFi connection can be a WiFi direct connection or a connection through a WiFi router. In another implementation, device A and device C can establish a WiFi connection in advance. At this time, S147 can be directly executed, and the bandwidth management system can send the required bandwidth for the screen mirroring service to the information update system. Channel K1 and channel K2 are the same channel or belong to the same frequency band.

[0298] S146. The WiFi driver of device A and the WiFi driver of device C establish a WiFi connection.

[0299] After the connection is established, the WiFi driver can send a notification to the picture library and the bandwidth management system to notify that link L has been established. AC . Device A can then execute S152.

[0300] S147. The bandwidth management system of device A sends information indicating the creation of file sharing service D1 to the information update system.

[0301] When the bandwidth management system of device A determines that the service type of file sharing service D1 is a file transfer service, it can execute S147 without determining whether the remaining bandwidth meets the required bandwidth of service D1.

[0302] S148. The information update system of device A collects its own device service information and device link information and broadcasts the notification to other devices. Similar to the above step S108, the difference is that at this time, device A not only collects the service information of the screen mirroring service P1, the service information of the voice call service V1, and the link information of link L AB but also collects the service information of the file sharing service D1 carried on link L between device A and device C and the link information of link L. AB AC AC

[0303] At this time, the device service information of device A itself includes the identifier of the screen mirroring service P1, the required bandwidth of 30 Mbps, and service type 1; the identifier of the voice call service V1, the required bandwidth of 20 Mbps, and service type 1; the identifier of the file sharing service D1 and service type 0. The device link information includes the identifier of link L AB the identifier of, the highest effective rate of 200 Mbps, and the identifier of channel K1. Link L AC the identifier of, the highest effective rate of 100 Mbps, and the identifier of channel K2.

[0304] S149. The information update system of device A sends its own device service information and device link information to other devices and broadcasts a notification.

[0305] Among them, the specific implementation of S149 is the same as that of S108 above. It will not be elaborated here.

[0306] S150. The information update system of device A receives the device service information and device link information from other devices.

[0307] After receiving the notification in step S149 above, device B and device C can also collect their own device link information and device service information, and send their own device service information and device link information to other devices.

[0308] Among them, the device link information of device B includes the identifier of link L AB the identifier of, the highest effective rate of 200 Mbps, and the identifier of channel K1. The device service information includes the identifier of the voice call service V2, the required bandwidth of 20 Mbps, and service type 1. Device C has no services to send, so it does not need to send device link information and device service information, or it can also send device link information and device service information. At this time, the device link information and device service information can be empty.

[0309] After S150, the link information and service information received by device A, device B, and device C are as follows:

[0310] The link information includes:

[0311] Link L AB , from device A (mobile phone) to device B (tablet): the highest effective rate is 200 Mbps;

[0312] Link L AC , from device A (mobile phone) to device C (PC): the highest effective rate is 100 Mbps;

[0313] The service information includes:

[0314] The screen mirroring service P1, carried on link L ABAbove, for service type 1, the required bandwidth is 30 Mbps;

[0315] Voice call service V1 is carried on L AB Above, for service type 1, the required bandwidth is 20 Mbps;

[0316] Voice call service V2 is carried on L AB Above, for service type 1, the required bandwidth is 20 Mbps;

[0317] File sharing service D1 is carried on L AC Above, for service type 0.

[0318] S151, the information update system of device A sends a scheduling request to the QOS scheduling system. This scheduling request includes the link information and service information received by device A currently.

[0319] S152, in response to the scheduling request, the QOS scheduling system of device A determines whether the service it needs to send itself includes a file transfer service. When it does not include a file transfer service, there is no need to calculate the file speed limit value. When it includes a file transfer service, the speed limit value of the file service needs to be calculated.

[0320] S153, when the QOS scheduling system of device A determines that there is a file transfer service in the service it needs to send currently, it calculates the speed limit value of the file transfer service, that is, calculates the speed limit value of file sharing service D1.

[0321] It should be understood that only the device that only includes the file transfer service needs to calculate the speed limit value. Device B and device C will also execute the above S151 - S153. Since the services to be sent by device B and device C do not include the file transfer service, neither device B nor device C needs to calculate the speed limit value.

[0322] Among them, the method for calculating the speed limit value of the file transfer service can refer to the method embodiment for calculating the speed limit value of the file transfer service below, which will not be elaborated here.

[0323] Exemplarily, at this time, device A calculates the speed limit value of file sharing service D1 based on the required bandwidth of 30 Mbps for the screen mirroring service P1, the required bandwidth of 20 Mbps for the voice call service V1, the required bandwidth of 20 Mbps for the voice call service V2, the highest effective rate of 200 Mbps for link L AB and the highest effective rate of 100 Mbps for link L AC . Based on the following Figure 13The calculation method of the speed limit value shown calculates that the speed limit value of file sharing service D1 is (1 - 30 / 200 - 20 / 200 - 20 / 200) * 0.8 = 0.52. Among them, 0.8 here is the anti-collision coefficient, and the speed limit value 0.52 is used to indicate that within a unit time (such as 1 second), it is allowed to send service data of file sharing service D1 within a time not greater than 0.52 times the unit time (0.52 seconds).

[0324] In another representation of the speed limit value of file sharing service D1, it is 0.52 * 100 Mbps = 52 Mbps.

[0325] It should be understood that device A can calculate the speed limit value of each file transfer service in the QOS system, or only calculate the speed limit value of its own file transfer service (that is, file sharing service D1 that device A needs to send).

[0326] S154, the QOS scheduling system of device A sends the requested bandwidth of its own non-file transfer services and the speed limit values of file transfer services to the bandwidth allocation system, that is, sends the requested bandwidth of screen mirroring service P1, which is 30 Mbps, the requested bandwidth of voice call service, which is 20 Mbps, and the speed limit value of file sharing service D1, which is 52 Mbps.

[0327] S155, the bandwidth allocation system of device A allocates bandwidth for each non-file transfer service according to the requested bandwidth of each non-file transfer service, and allocates bandwidth for each file transfer service according to the speed limit value of each file transfer service.

[0328] Among them, the allocated bandwidth of non-file transfer services is the requested bandwidth of each file transfer service. The allocated bandwidth of file transfer services is the speed limit value of each file transfer service. Exemplarily, the allocated bandwidth of screen mirroring service P1 is its requested bandwidth of 30 Mbps, and the allocated bandwidth of voice call service V2 is its requested bandwidth of 20 Mbps. The allocated bandwidth of file sharing service D1 is its speed limit value of 52 Mbps or less than this speed limit value of 52 Mbps.

[0329] S156, the bandwidth allocation system of device A sends the allocated bandwidth of each service to the sending system, that is, sends the allocated bandwidth of screen mirroring service P1, which is 30 Mbps, the allocated bandwidth of voice call service V2, which is 20 Mbps, and the allocated bandwidth of file sharing service D1, which is 52 Mbps.

[0330] S157, the application "Gallery" of device A sends the service data of file sharing service D1 to the sending system.

[0331] S158, the sending system of device A sends the service data of file sharing service D1 to the WiFi driver according to the allocated bandwidth of file sharing service D1.

[0332] At this time, device A sends the service data of the screen mirroring service to the WiFi driver according to the allocated bandwidth of the screen mirroring service, and sends the service data of the file sharing service to the WiFi driver according to the allocated bandwidth of the file sharing service. Specifically, the service data of each service can be packed into data packets and then sent sequentially.

[0333] S159. The WiFi driver of device A drives the WiFi module to send the service data of the file sharing service D1 to device C through the link L established between device A and device C. AC Send the service data of the file sharing service D1 to device C.

[0334] It should be noted that the service data of file sharing D1 is the file to be shared. The screen mirroring application of device A will also send the service data of the screen mirroring service P1 to the sending system. The call application of device A will also send the service data of the voice call service V1 to the sending system. The sending system of device A will also send the service data of the screen mirroring service P1 to the WiFi driver according to the allocated bandwidth of the screen mirroring service P1, and send the service data of the voice call service V1 to the WiFi driver according to the allocated bandwidth of the voice call service V1. Further, the WiFi module will then send this service data to the corresponding devices. Figure 6C Not shown.

[0335] It should also be noted that after the above S150, device B and device C can also execute the steps S151 - S156, S158 executed by device A above. Figure 6C Not shown. The difference is that in S152 - S155, since neither device B nor device C contains the file transfer service to be sent, it does not need to calculate the speed limit value of the file transfer service, nor does it need to allocate bandwidth for the file transfer service. In S154, the requested bandwidth of the voice call service V2 sent by device B is 20 Mbps. In S155 - S156, device B allocates bandwidth for the voice call service V2 and sends the allocated bandwidth of the voice call service V2. The call application of device B also sends the service data of the voice call service V2 to its sending system. The sending system of device B sends the service data of the voice call service V2 to the WiFi driver according to the allocated bandwidth of the voice call service V2. Furthermore, its WiFi driver drives the WiFi module to send the service data of the voice call service V2 to device A through the link L established between device B and device A. Figure 6C AB Send the service data of the voice call service V2 to device A.

[0336] Since device C has no service to be sent, it can not execute the above steps S151 - S159.

[0337] In the above example, finally, the allocated bandwidth of each service in the QOS system is as follows:

[0338] ​The allocated bandwidth for screen projection service P1 is 30Mbps;

[0339] The allocated bandwidth for voice call service V1 is 20Mbps;

[0340] The allocated bandwidth for voice call service V2 is 20Mbps;

[0341] The allocated bandwidth for the file sharing service D1 is 52 Mbps.

[0342] It should be understood that the above Figure 6A - Figure 6C Take the creation of screen projection service, voice call service, and file sharing service as an example. In other embodiments, each created service can be replaced with other services, and multiple services can be created. It should also be understood that an application can create one or more services at a time.

[0343] It should be understood that the above Figure 5 , Figure 6A - Figure 6C For example, in a QOS system, device A needs to send services including screen projection service P1, voice call service V1, and file sharing service D1, and device B needs to send services including voice call service V2. Figure 6C As shown, more or less services need to be sent, device B may include more Figure 5 , Figure 6A - Figure 6C More or fewer services that need to be sent are shown. The above services may also be replaced by other services, and these services may also be carried by other links in the same frequency band or channel.

[0344] (II) QOS optimization method caused by WiFi transmission rate changes

[0345] Figure 8 Taking the change of the WiFi transmission rate with device B as an example, the QOS optimization method caused by the change of the WiFi transmission rate is exemplified.

[0346] S201, the WiFi driver of device A detects that the WiFi transmission rate with device B changes.

[0347] The device can detect its own movement through the motion sensors it carries, such as accelerometers and gyroscopes. When it detects that the device is moving or the moving distance is greater than a preset threshold, such as 2m, the device position can be determined and the movement can be sent.

[0348] When device B moves, the WiFi transmission rate between other devices and device B will change, that is, the maximum effective rate of the link with device B will change. Alternatively, when device A moves, the maximum effective rate of the link between device A and device B will also change.

[0349] S202, The WiFi driver of Device A sends the highest effective rate after the link update to the bandwidth monitoring system.

[0350] In some embodiments, the WiFi driver of Device A can re-obtain the MCS rate of the link L between Device A and Device B, and then update the highest effective rate of the link L based on the negotiated rate. Exemplarily, the highest effective rate of the link L is updated to 150 Mbps. AB and then update the highest effective rate of the link L based on the negotiated rate. AB Exemplarily, the highest effective rate of the link L AB is updated to 150 Mbps.

[0351] S203, The bandwidth monitoring system of Device A sends the updated link information (i.e., the updated highest effective rate of the updated link L) to the information update system. In some other embodiments, the WiFi driver of Device A sends the information indicating the change in the highest effective rate of the link L to the bandwidth monitoring system. After receiving this information, the bandwidth monitoring system of Device A sends an update request for the link information indicating the updated link L to the information update system. In response to this update request, the information update system of Device A can re-measure the highest effective rate of the link. The information update system obtains the MCS rate of the link L from Device A to Device B, and then updates the highest effective rate of the link L based on the negotiated rate. AB In some other embodiments, the WiFi driver of Device A sends the information indicating the change in the highest effective rate of the link L to the bandwidth monitoring system. After receiving this information, the bandwidth monitoring system of Device A sends an update request for the link information indicating the updated link L to the information update system. AB After receiving this information, the bandwidth monitoring system of Device A sends an update request for the link information indicating the updated link L to the information update system. The information update system of Device A can re-measure the highest effective rate of the link in response to this update request. The information update system obtains the MCS rate of the link L from Device A to Device B, AB and then updates the highest effective rate of the link L based on the negotiated rate. AB and then updates the highest effective rate of the link L based on the negotiated rate. AB The information update system obtains the MCS rate of the link L from Device A to Device B, and then updates the highest effective rate of the link L based on the negotiated rate.

[0352] S204, The information update system of Device A collects its own device service information and device link information, and broadcasts and notifies other devices.

[0353] The specific implementation is the same as the above step S149. At this time, the device service information of Device A itself includes the identifier of the screen mirroring service P1, the required bandwidth of 30 Mbps and the service type 1, the identifier of the voice call service V1, the required bandwidth of 20 Mbps and the service type 1, the identifier of the file sharing service D1 and the service type 0, and the device link information includes the identifier of the link L, the highest effective rate of 150 Mbps and the identifier of the channel K1, the identifier of the link L, the highest effective rate of 100 Mbps and the identifier of the channel K2. AB the identifier of the link L, the highest effective rate of 150 Mbps and the identifier of the channel K1, the identifier of the link L, AC the highest effective rate of 100 Mbps and the identifier of the channel K2.

[0354] S205, The information update system of Device A sends its own device service information and device link information to other devices.

[0355] S206, The information update system of Device A receives the device service information and device link information from other devices.

[0356] Exemplarily, after receiving the notification broadcast in S204, Device B and Device C can also collect their own device link information and device service information, and send their own device service information and device link information to other devices.

[0357] Among them, the device link information of Device B includes the identifier of link L AB , the highest effective rate of 200 Mbps, and the identifier of channel K1. The device service information includes the identifier of voice call service V2, the required bandwidth of 20 Mbps, and service type 1. Device C has no services to send, so it does not need to send device link information and device service information, or it can also send device link information and device service information. At this time, the device link information and device service information can be empty.

[0358] After S206, the link information and service information received by Device A, Device B, and Device C are as follows:

[0359] The link information includes:

[0360] Link L AB , Device A (mobile phone) → Device B (tablet): The highest effective rate is 150 Mbps;

[0361] Link L AC , Device A (mobile phone) → Device C (PC): The highest effective rate is 100 Mbps;

[0362] The service information includes:

[0363] Screen mirroring service P1, carried on link L AB , service type 1, required bandwidth is 30 Mbps;

[0364] Voice call service V1, carried on L AB , service type 1, required bandwidth is 20 Mbps;

[0365] Voice call service V2, carried on L BA , service type 1, required bandwidth is 20 Mbps;

[0366] File sharing service D1, carried on L AC , service type 0.

[0367] S207, after the information update system of Device A collects all the service information and link information in the QOS system, it sends a scheduling request to the QOS scheduling system. This scheduling request can include the link information and service information received by Device A.

[0368] S208. The QoS scheduling system of device A responds to the scheduling request, determines whether the services it sends include file transfer services. When there are no file transfer services, there is no need to calculate the file speed limit value. When there are file transfer services, the speed limit value of the file service needs to be calculated.

[0369] S209. The QoS scheduling system of device A determines that there are file transfer services in the services it sends, and calculates the speed limit value of the file transfer service, that is, calculates the speed limit value of the file sharing service D1.

[0370] At this time, device A calculates the speed limit value of the file sharing service D1 based on the required bandwidth of 30 Mbps for the screen mirroring service P1, the required bandwidth of 20 Mbps for the voice call service V1, the required bandwidth of 20 Mbps for the voice call service V2, the maximum effective rate of link L AB being 150 Mbps, and the maximum effective rate of link L AC being 100 Mbps. Exemplarily, based on the following Figure 13 method for calculating the speed limit value, the calculated speed limit value of the file sharing service D1 is (1 - 30 / 150 - 20 / 150 - 20 / 150)×0.8 = 0.427.

[0371] In another representation of the speed limit value of the file sharing service D1, it is 0.427×100 Mbps = 42.7 Mbps.

[0372] S210. The QoS scheduling system of device A sends the required bandwidth of its non - file transfer services and the speed limit value of the file transfer service to the bandwidth allocation system. That is, it sends the required bandwidth of 30 Mbps for the screen mirroring service P1, the required bandwidth of 20 Mbps for the voice call service, and the speed limit value of 42.7 Mbps for the file sharing service D1.

[0373] S211. The bandwidth allocation system of device A allocates bandwidth for each non - file transfer service according to the required bandwidth of each non - file transfer service, and allocates bandwidth for each file transfer service according to the speed limit value of each file transfer service.

[0374] S212. The bandwidth allocation system of device A sends the allocated bandwidth of each service to the sending system.

[0375] S213. The application program of device A sends the service data of each service to the sending system. That is, the screen mirroring application sends the screen mirroring service P1 to the sending system, the call application sends the voice call service V1 to the sending system, and the "gallery" application sends the service data of the file sharing service D1 to the sending system.

[0376] S214. The sending system of Device A sends the service data of each service to the WiFi driver according to the allocated bandwidth of each service.

[0377] S215. The WiFi driver of Device A drives the WiFi module to send the service data of each service, that is, to send the service data of the screen mirroring service P1, the voice call service V1, and the file sharing service D1.

[0378] Among them, except for the differences in data values such as the speed limit value and allocated bandwidth of the service, the specific implementation of S204 - S215 can refer to the above steps S148 - S159, which will not be elaborated here.

[0379] It should be noted that Device B will also execute the above steps S207 - S215 executed by Device A, Figure 8 not shown. The difference is that the services to be sent by Device B are different. It is the voice call service V2. There is no file transfer service on the link with Device B as the sending end. Device B does not need to calculate the speed limit value of the file transfer service, nor does it need to allocate bandwidth for the file transfer service.

[0380] Since there is no service to be sent on Device C, the above steps S204 - S215 can be not executed.

[0381] In the above example, finally, the allocated bandwidth of each service in the QOS system is as follows:

[0382] The allocated bandwidth of the screen mirroring service P1 is 30 Mbps;

[0383] The allocated bandwidth of the voice call service V1 is 20 Mbps;

[0384] The allocated bandwidth of the voice call service V2 is 20 Mbps;

[0385] The allocated bandwidth of the file sharing service D1 is 42.7 Mbps.

[0386] At this time, Device A sends the service data of the screen mirroring service P1 to Device B through link L AB at the allocated bandwidth of 30 Mbps of the screen mirroring service P1; and sends the service data of the voice call service V1 to Device B through link L AB at the allocated bandwidth of 20 Mbps of the voice call service V1, and transmits the file to be shared through link L AB at a speed less than or equal to the allocated bandwidth of 42.7 Mbps of the file sharing service D1. Device B sends the service data of the voice call service V2 to Device A through link L AB at the allocated bandwidth of 20 Mbps of the voice call service V2.

[0387] The above is based on detecting link LAB Taking the change in the transmission rate as an example, it should be understood that when device A detects link L AC and the transmission rate changes, the above S202 - S215 can also be triggered.

[0388] (3) QoS optimization method caused by the change in the required bandwidth of services

[0389] The QoS monitoring system of the device can also monitor the changes in the device service information of the device itself, such as detecting changes in service requirements, etc. When detecting a change in the required bandwidth of the service, it can send the updated required bandwidth to its information update system. Further, the device can execute the above Figure 8 S204 - S215. For the specific implementation of S204 - S215, reference can be made to the relevant description above Figure 8 and will not be elaborated here. Taking the screen mirroring service in device A as an example below to illustrate.

[0390] Specifically, the QoS monitoring system of device A detects the change in the bit rate of the screen mirroring service and determines the required bandwidth of the screen mirroring service.

[0391] Among them, the QoS monitoring system detects the bit rate of each service, that is, the data traffic used per unit time. Exemplarily, the QoS monitoring system detects the bit rate of the service data sent by the screen mirroring application. When the user switches the clarity of the screen mirroring display, the QoS monitoring system can monitor that the bit rate of the screen mirroring service changes. When detecting a change in the bit rate of the screen mirroring service, it can re - determine the required bandwidth of the screen mirroring service.

[0392] Exemplarily, there is a corresponding relationship between the bit rate and the required bandwidth. When the bit rate decreases, the corresponding required bandwidth decreases. Conversely, when the bit rate decreases, the corresponding required bandwidth decreases. Exemplarily, when the bit rate of screen mirroring service P1 changes to 50 Mbps, the required bandwidth of screen mirroring service P1 needs to be updated to the required bandwidth corresponding to the new bit rate, which is 50 Mbps.

[0393] The bandwidth monitoring system of device A sends the updated required bandwidth of the screen mirroring service to the information update system, for example, it is 50 Mbps after the update.

[0394] At this time, after S204 - S206, the link information and service information received by device A, device B, and device C are as follows:

[0395] The link information includes:

[0396] Link L AB , device A (mobile phone) → device B (tablet): the highest effective rate is 150 Mbps;

[0397] Link L AC, Device A (mobile phone) → Device C (PC): The maximum effective rate is 100 Mbps.

[0398] The service information includes:

[0399] The screen mirroring service P1 is carried on link L AB and the required bandwidth is 50 Mbps;

[0400] The voice call service V1 is carried on L AB and the required bandwidth is 20 Mbps;

[0401] The voice call service V2 is carried on L BA and the required bandwidth is 20 Mbps;

[0402] The file sharing service D1 is carried on L AC .

[0403] At this time, based on the required bandwidth of 50 Mbps for the screen mirroring service P1, 20 Mbps for the voice call service V1, 20 Mbps for the voice call service V2, the maximum effective rate of link L AB is 150 Mbps, and the maximum effective rate of link L AC is 100 Mbps, the rate limit value of the file sharing service D1 is calculated. Exemplarily, based on the following Figure 13 shown rate limit value calculation method, the recalculated rate limit value of the file sharing service D1 is (1 - 50 / 150 - 20 / 150 - 20 / 150) * 0.8 = 0.32.

[0404] In another representation of the rate limit value of the file sharing service D1, it is 0.32 * 100 Mbps = 32 Mbps.

[0405] In the above example, finally, the allocated bandwidths of each service in the QOS system are as follows:

[0406] The allocated bandwidth of the screen mirroring service P1 is 50 Mbps;

[0407] The allocated bandwidth of the voice call service V1 is 20 Mbps;

[0408] The allocated bandwidth of the voice call service V2 is 20 Mbps;

[0409] The allocated bandwidth of the file sharing service D1 is 32 Mbps.

[0410] At this time, device A sends the service data of the screen mirroring service P1 to device B through link L AB at the allocated bandwidth of 50 Mbps for the screen mirroring service P1; through link L ABSend the service data of voice call service V1 to device B at the allocated bandwidth of 20 Mbps for voice call service V1, and, through link L AB Transmit the file to be shared at a rate less than or equal to the allocated bandwidth of 32 Mbps for file sharing service D1. Device B passes through link L AB Send the service data of voice call service V2 to device A at the allocated bandwidth of 20 Mbps for voice call service V2.

[0411] (4) QoS optimization process caused by lag

[0412] The receiving end of the service can detect whether events such as lag occur in the service. When lag is detected, it can send indication information to its QoS monitoring system or information update system to indicate that the service has lagged. However, the reason for the lag may be that the communication environment of the current QoS system has changed and the interference has increased, which will cause the maximum effective rate of each link in the QoS system to become smaller. At this time, the information update systems of each device in the QoS system can re-collect their respective device link information and device service information, and recalculate the speed limit values of each file transfer service in the QoS system, so as to limit the speed of the file transfer service based on the new speed limit values and ensure the QoS of services sensitive to delay. Specifically, after the information update system receives the indication information, it triggers each device in each QoS system to execute the above Figure 8 S204 - S215 in. The specific implementation of S204 - S215 can refer to the relevant description above Figure 8 and will not be elaborated here. The following takes the lag of the screen mirroring service in device A as an example to illustrate.

[0413] Taking the lag of the screen mirroring service as an example, the screen mirroring application of device B detects the screen mirroring lag and sends indication information to its information update system. This indication information is used to indicate the screen mirroring lag. The information update system of device B can re-collect its respective device link information and device service information and broadcast the notification, and send the collected information to other devices. In response to this notification, the information update systems of device A and device C also re-collect their respective device link information and device service information and send them to other devices. Suppose the link information and service information received by device A, device B, and device C are as follows:

[0414] The link information includes:

[0415] Link L AB , device A (mobile phone) → device B (tablet): the maximum effective rate is 100 Mbps;

[0416] Link L AC , device A (mobile phone) → device C (PC): the maximum effective rate is 80 Mbps;

[0417] The service information includes:

[0418] The screen mirroring service P1 is carried on link L AB and the required bandwidth is 50 Mbps;

[0419] The voice call service V1 is carried on L AB and the required bandwidth is 20 Mbps;

[0420] The voice call service V2 is carried on L BA and the required bandwidth is 20 Mbps;

[0421] The file sharing service D1 is carried on L AC ;

[0422] At this time, based on the required bandwidth of 50 Mbps for the screen mirroring service P1, the required bandwidth of 20 Mbps for the voice call service V1, the required bandwidth of 20 Mbps for the voice call service V2, the maximum effective rate of link L AB is 100 Mbps, and the maximum effective rate of link L AC is 80 Mbps, the device A calculates the rate limit value of the file sharing service D1. Exemplarily, based on the following Figure 13 shown rate limit value calculation method, the recalculated rate limit value of the file sharing service D1 is (1 - 50 / 100 - 20 / 100 - 20 / 100) * 0.8 = 0.08.

[0423] In another representation of the rate limit value of the file sharing service D1, it is 0.08 * 80 Mbps = 6.4 Mbps.

[0424] In the above example, finally, the allocated bandwidths of each service in the QOS system are as follows:

[0425] The allocated bandwidth of the screen mirroring service P1 is 50 Mbps;

[0426] The allocated bandwidth of the voice call service V1 is 20 Mbps;

[0427] The allocated bandwidth of the voice call service V2 is 20 Mbps;

[0428] The allocated bandwidth of the file sharing service D1 is 6.4 Mbps.

[0429] At this time, the device A sends the service data of the screen mirroring service P1 to the device B through link L AB at the allocated bandwidth of 50 Mbps of the screen mirroring service P1; and sends the service data of the voice call service V1 to the device B through link L AB at the allocated bandwidth of 20 Mbps of the voice call service V1, and, through link L ABTransmit the file to be shared at a bandwidth less than or equal to 42.7 Mbps, which is the allocated bandwidth of the file sharing service D1. Device B transmits through link L AB Send the service data of the voice call service V2 to device A at the allocated bandwidth of 6.4 Mbps of the voice call service V2.

[0430] (5) QoS optimization method caused by service termination

[0431] When the QoS monitoring system of the device can still monitor the changes in the device service information of the device itself, for example, when it detects that a service is closed, it can send an indication message for indicating the change of service information to its information update system. Further, the device can execute the above Figure 8 S204 - S215 in it. For the specific implementation of S204 - S215, reference can be made to the relevant description above Figure 8 and will not be elaborated here. The following takes the screen mirroring service in device A as an example to illustrate.

[0432] Figure 9 Taking the closing of the voice call service as an example, the process of QoS optimization caused by service termination is exemplarily shown.

[0433] S501, the call application of device B detects a user operation for indicating the end of the call.

[0434] S502, in response to this user operation, the call application of device B sends an instruction for indicating the end of the call to the call application of device A.

[0435] S503, the call application of device B closes the voice call service V2.

[0436] S504, in response to this instruction, the call application of device A ends the call and closes the voice call service V1.

[0437] S505, the call application of device A sends an indication message to the information update system to indicate the change of service information.

[0438] S506, the call application of device B also sends an indication message to the information update system to indicate the change of service information.

[0439] S507, the information update system of device A collects its own device service information and device link information, and broadcasts and notifies other devices. At this time, the device service information of device A itself includes the identifier of the screen mirroring service P1, the required bandwidth of 50 Mbps, and the service type 1, the identifier of the file sharing service D1, and the service type 0. The device link information of device A itself includes the identifier of link L AB the identifier, the highest effective rate of 150 Mbps, and channel K1 of link L ACThe identifier, the highest effective rate of 80 Mbps, and channel K2.

[0440] S508, the information update system of device A sends its own device service information and device link information to other devices.

[0441] S509, the information update system of device A receives device service information and device link information from other devices.

[0442] Exemplarily, after receiving the broadcast notification of S507 above, device B and device C can also collect their own device link information and device service information, and send their own device service information and device link information to other devices.

[0443] Among them, neither device B nor device C has services to send. Therefore, they do not need to send device link information and device service information, or they can also send device link information and device service information. At this time, the device link information and device service information can be empty.

[0444] After S509, the link information and service information received by device A, device B, and device C are as follows:

[0445] The link information includes:

[0446] Link L AB , device A (mobile phone) → device B (tablet): The highest effective rate is 100 Mbps;

[0447] Link L AC , device A (mobile phone) → device C (PC): The highest effective rate is 80 Mbps;

[0448] The service information includes:

[0449] Screen mirroring service P1, carried on link L AB with service type 1 and a required bandwidth of 50 Mbps;

[0450] File sharing service D1, carried on L AC with service type 0.

[0451] S510, after the information update system of device A has collected all the service information and link information in the QOS system, it sends a scheduling request to the QOS scheduling system. This scheduling request can include the link information and service information received by device A.

[0452] S511, in response to the scheduling request, the QOS scheduling system of device A determines whether the services it sends include file transfer services. When it does not include file transfer services, it does not need to calculate the file speed limit value. When it includes file transfer services, it needs to calculate the speed limit value of the file service.

[0453] In S512, the QoS scheduling system of device A determines that there is a file transfer service among the services it sends, and calculates the speed limit value of the file transfer service, that is, calculates the speed limit value of the file sharing service D1.

[0454] At this time, based on the required bandwidth of 50 Mbps for the screen mirroring service P1 of device A, the highest effective rate of link L AB is 100 Mbps, and the highest effective rate of link L AC is 80 Mbps to calculate the speed limit value of the file sharing service D1. Exemplarily, based on the following Figure 13 shown method for calculating the speed limit value, the calculated speed limit value of the file sharing service D1 is (1 - 50 / 100) * 0.9 = 0.45. At this time, the anti-collision coefficient is 0.9.

[0455] In another representation of the speed limit value of the file sharing service D1, it is 0.45 * 80 Mbps = 36 Mbps.

[0456] In S513, the QoS scheduling system of device A sends the required bandwidth of its non - file transfer services and the speed limit value of the file transfer service to the bandwidth allocation system. At this time, it sends the required bandwidth of 50 Mbps for the screen mirroring service P1 and the speed limit value of 36 Mbps for the file sharing service D1.

[0457] In S514, the bandwidth allocation system of device A allocates bandwidth for each non - file transfer service according to the required bandwidth of each non - file transfer service, and allocates bandwidth for each file transfer service according to the speed limit value of each file transfer service. At this time,

[0458] the allocated bandwidth for the screen mirroring service P1 is 50 Mbps, and the allocated bandwidth for the file sharing service D1 is less than or equal to the speed limit value of 36 Mbps, such as 36 Mbps.

[0459] In S515, the bandwidth allocation system of device A sends the allocated bandwidth of each service to the sending system, that is, sends the allocated bandwidth of 50 Mbps for the screen mirroring service P1 and the allocated bandwidth of 36 Mbps for the file sharing service D1.

[0460] In S516, the application program of device A sends the service data of each service to the sending system, that is, the screen mirroring application sends the screen mirroring service P1 to the sending system, and the application "Gallery" sends the service data of the file sharing service D1 to the sending system.

[0461] In S517, the sending system of device A sends the service data of each service to the WiFi driver according to the allocated bandwidth of each service.

[0462] S518. The WiFi driver of device A drives the WiFi module to send the service data of each service, that is, to send the service data of the screen mirroring service P1 and the file sharing service D1.

[0463] For the specific implementation of S507 - S518, reference can be made to the above steps S148 - S159, which will not be elaborated here.

[0464] Since device B and device C do not contain services to be sent and there is no change in service information, they may not execute the steps that device A needs to execute in S507 - S518 above.

[0465] In the above example, finally, the allocated bandwidths of each service in the QOS system are as follows:

[0466] The allocated bandwidth of the screen mirroring service P1 is 50 Mbps;

[0467] The allocated bandwidth of the file sharing service D1 is 36 Mbps.

[0468] At this time, device A sends the service data of the screen mirroring service P1 to device B through link L AB at the allocated bandwidth of 50 Mbps of the screen mirroring service P1; and, through link L AB transmits the file to be shared at a bandwidth less than or equal to 32 Mbps, which is the allocated bandwidth of the file sharing service D1.

[0469] In some other embodiments, when there is no file transfer service in the device, no newly created or closed service in the device, and no service with a change in service information, the device may also not send a scheduling request, that is, continue to send the service data of the service using the original allocated bandwidth of the service.

[0470] It should be understood that the voice call service V1 may be the third service that is closed.

[0471] It should be noted that in the distributed QOS optimization solution, the above takes the QOS system including device A (the first electronic device), device B (the second electronic device), and device C (the third electronic device), the links including link L AC (the first link) and link L AB (the second link), and the services including the file sharing service D1 (the first service), the voice call service V2 (the second service), and the screen mirroring service P1 being the fourth service as an example for illustration. In some other embodiments, there may also be more services. For example, device A sends data through link L ACSend the screen mirroring service P2 to device C. At this time, the screen mirroring service P2 is the fifth service. When there are changes or lags in the service information of the screen mirroring service P1 or the voice call service V1, or when the existing service is closed or a new service is created, etc., when recalculating the speed limit value (the first speed limit value) of the file sharing service D1, the required bandwidth of this screen mirroring service P2 also needs to be considered.

[0472] The embodiments shown in the above (i)-(v) are all illustrated by taking the distributed QOS optimization as an example. It should be understood that device A in the embodiments shown in the above (i)-(v) can also be the central control device in the centralized QOS optimization method. At this time, device B and device C are controlled devices. At this time, device A does not judge whether the service to be sent by itself includes the file transfer service, but judges whether the file transfer service is included in the QOS system. When the services sent by device A, device B or device C include the file transfer service, the speed limit value of the file transfer service to be sent by device A, device B and device C is calculated, and the calculated speed limit value of the file transfer service is sent to the sending end of the file transfer service. Device B and device C no longer need to generate and send scheduling requests, nor do they need to judge whether the service to be sent by themselves includes the file transfer service, nor do they need to calculate the speed limit value. Other steps that device B and device C need to execute in the above distributed QOS optimization can be the same. The specific steps executed by device A, device B and device C can also refer to the relevant descriptions in the Figure 11 centralized QOS optimization method shown below.

[0473] In another scenario, the service that device B needs to send also includes the file transfer service D2, and this file transfer service D2 is carried on the link L between device B and device C BC 、link L AB or the link L between device B and other devices, such as device D. BD At this time, in the distributed QOS optimization method, when device A calculates the speed limit value of the file sharing service D1, the total number of file transfer services also needs to be considered. Device B needs to calculate the speed limit value of the file transfer service D2, and transmit the service data of this file transfer service D2 with a bandwidth less than or equal to the speed limit value of the file transfer service D2.

[0474] In the centralized QOS optimization method, device A also needs to calculate the speed limit value of the file transfer service D2, and when calculating the speed limit values of services D1 and D2, the total number of file transfer services also needs to be considered. Device A needs to transmit the service data of this service D1 with a bandwidth less than or equal to the speed limit value of service D1. Similarly, device B also needs to transmit the service data of this file transfer service D2 with a bandwidth less than or equal to the speed limit value of the file transfer service D2.

[0475] It should be noted that in the centralized QoS optimization solution, the above-mentioned device A can be the first electronic device, device B can be the second electronic device, device C can be the third electronic device, and the link L AC can be the first link, and the link L AB can be the second link. The file sharing service D1 can be the first service, the voice call service V2 can be the second service, the voice call service V1 can be the seventh service, and the screen mirroring service P1 can be the eighth service.

[0476] In some other embodiments, there can be more services. For example, device B sends a video file to device C through the link L BC At this time, the file sharing service D2 is the sixth service. When there are changes or lags in the service information of the screen mirroring service P1 or the voice call service V1, or when the existing service is closed or a new service is created, etc., when recalculating the rate limit value of the file sharing service D1 and the rate limit value (the second rate limit value) of the file sharing service D2, the number of file transfer services also needs to be considered.

[0477] As follows, taking one device in the QoS system shown above Figure 1B as an example, in combination with the following Figure 10 Taking a more general QoS system as an example, the optimization method of distributed QoS is described.

[0478] In the embodiments of the present application, the QoS system includes multiple electronic devices. At least one link is established between these multiple electronic devices, and these links operate in the same frequency band or the same channel. One or more services are carried on each link, and the services can be non-file transfer services or file transfer services. Herein, the electronic device is also referred to as a device, and the first device is any one of the electronic devices in the QoS system.

[0479] In some embodiments, when each device in the QoS system creates a service, closes a service, changes the transmission rate of WiFi, detects service lags, changes in service information, etc., the information update system of the device will receive the service information of the changed service sent by the bandwidth management system or the QoS monitoring system, etc., or receive the indication information indicating the change in the service information of the service, and then trigger the execution of Figure 10 the QoS optimization method shown. The QoS optimization methods caused by the above-mentioned service creation, change in the required bandwidth of the service, lags, change in the transmission rate of WiFi, service end, etc. can be referred to the above embodiments and will not be elaborated here.

[0480] Figure 10Shows an optimized method for distributed QoS provided by the present application. Taking the first device in the QoS system as an example, it should be understood that each device in the QoS system or an electronic device including a service to be sent executes the following method, and this method may include but is not limited to some or all of the following steps.

[0481] S601. The information update system of the first device obtains its own device service information and device link information.

[0482] Among them, the device link information of the first device itself includes the identifier of the link, the highest effective rate, and the identifier of the channel, and this link carries the service with the first device as the sending end. The device service information of the first device itself includes the identifier of the service with the first device as the sending end (i.e., the service that the first device needs to send), the service type, and the required bandwidth.

[0483] In some embodiments, when the first device creates a service, closes a service, detects service jams, link information changes, or service information changes, etc., and meets the trigger condition, the information update system of the first device will receive the service information of the changed service sent by the bandwidth management system or the QoS monitoring system, etc., or receive the indication information indicating the change of the service information of the service, and then trigger the execution of step S601. Specifically, reference can be made to the QoS optimization method caused by the above-mentioned service creation, change of the required bandwidth of the service, jam, change of the transmission rate of WiFi, service end, etc.

[0484] The application program of the first device creates at least one service and sends the service data of the created service to one or more other devices in the QoS system through WiFi. The method of service creation can refer to the Figure 6A - Figure 6C service creation method shown above and will not be elaborated here.

[0485] S602. The information update system of the first device sends its own device service information and device link information to the information update systems of other devices.

[0486] Here, other devices are electronic devices other than the first electronic device in the QoS system, or are sending ends other than the first electronic device in the QoS system. Among them, the sending end is the sending end of the service.

[0487] S603. The information update system of the first device receives the device service information and device link information from the information update systems of other devices.

[0488] In some embodiments, when the first device executes S602 or afterwards, it can also broadcast a notice to other devices.

[0489] Among them, the notification is used to indicate the update of service information and link information or to indicate that the service information or link information of the QoS system has changed. When the information update system of other devices or other senders in the QoS system receives the notification, in response to the notification, it will also collect its own device service information and device link information and send them to other devices (other devices or other senders in the QoS system except itself), so that each device or each receiver in the QoS system can collect the link information of all links in the QoS system and the service information of all services carried by each link.

[0490] In some other embodiments, the first device may also not send a notification. At this time, the device service information and device link information sent by the information update system of the first device to the information update system of other devices include the link information and updated service information updated by itself relative to the last time it sent the device link information and device service information. The updated link information here includes the link information of newly added links and the updated link information of existing links, and both the newly added links and the existing links carry services with the first device as the sender; the updated service information refers to the change in the service information of newly added services and the updated service information of existing services, and both the newly added services and the existing services are services with the first device as the sender. At this time, when other devices receive the device link information and device service information sent by the first device, they determine the link information of all current links in the QoS system and the service information of all services carried by each link based on the device link information and device service information they currently receive (that is, the updated link information and updated service information) and the device link information and device service information received historically. Similarly, the first device can also determine the link information of all current links in the QoS system and the service information of all services carried by each link based on its updated link information, updated service information and the device link information and device service information received historically.

[0491] S604, the information update system of the first device sends a scheduling request to the QoS scheduling system. The scheduling request includes the link information and service information currently received.

[0492] Among them, the link information currently received by the first device may include the device link information of the first device itself and the device link information of devices or senders in the QoS system except the first device, and the service information currently received by the first device may include the device service information of the first device itself and the device service information of devices or senders in the QoS system except the first device.

[0493] S605. The QoS scheduling system of the first device determines whether the services to be sent by itself include file transfer services in response to a scheduling request. When there is no file transfer service, there is no need to calculate the file speed limit value. At this time, perform the following S607 - S611. When there is a file transfer service, the speed limit value of the file transfer service needs to be calculated, and perform the following S606 - S611.

[0494] Among them, the services to be sent by the first device itself are the services with the first device as the sending end.

[0495] In some embodiments, in response to the scheduling request, when the services to be sent by the QoS scheduling system itself include file transfer services, it is also necessary to determine whether the current speed limit values of the included file transfer services are all preset speed limit values. If so, there is no need to calculate the file speed limit value. Otherwise, it is necessary to recalculate the file speed limit value.

[0496] S606. The first device calculates the speed limit value of the file transfer service to be transmitted by itself.

[0497] For the specific implementation of calculating the speed limit value, reference can be made to the method of calculating the speed limit value shown below Figure 13 and will not be elaborated here.

[0498] In another implementation, the first device can also calculate the speed limit value of each file transfer service in the QoS system.

[0499] S607. The QoS scheduling system of the first device sends the requested bandwidth of the non - file transfer services to be sent by itself and the speed limit value of the file transfer services to be sent by itself to the bandwidth allocation system.

[0500] It should be understood that when there is no non - file transfer service among the services to be sent by the first device itself, there is no need to send the requested bandwidth of the non - file transfer service. Similarly, there is no need to allocate bandwidth for the non - file transfer service, nor to send the allocated bandwidth of the non - file transfer service.

[0501] It should also be understood that when there is no file transfer service among the services to be sent by the first device itself, there is no need to send the speed limit value of the file transfer service, nor to send the allocated bandwidth of the file transfer service.

[0502] It should also be understood that the non-file transfer services corresponding to the requested bandwidth to be sent by the QoS scheduling system of the first device in step S607 can be all non-file transfer services with the first device as the sender, or non-file transfer services that are newly added by the first device itself with the first device as the sender or non-file transfer services with a changed requested bandwidth relative to the previous scheduling request. However, the speed limit value of the file transfer service to be sent by the QoS scheduling system of the first device in step S607 can be the speed limit value of all file transfer services with the first device as the sender, because the speed limit value of the file transfer service generally needs to be updated.

[0503] S608. The bandwidth allocation system of the first device allocates bandwidth to each non-file transfer service according to the requested bandwidth of each non-file transfer service, and allocates bandwidth to each file transfer service according to the speed limit value of each file transfer service.

[0504] In one implementation of S608, the allocated bandwidth of the non-file transfer service is the requested bandwidth of the non-file transfer service, and the allocated bandwidth of the file transfer service is less than or equal to the speed limit value of the file transfer service.

[0505] S609. The bandwidth allocation system of the first device sends the allocated bandwidth of the services to be sent by itself to the sending system.

[0506] Here, the services to be transmitted by the first device itself include the non-file transfer services and file transfer services to be sent by itself. The sent allocated bandwidth can include the allocated bandwidth of all file transfer services with the first device as the sender, and the allocated bandwidth of all non-file transfer services with the first device as the sender; or include the allocated bandwidth of non-file transfer services that are newly added by the first device itself or non-file transfer services with a changed requested bandwidth relative to the previous scheduling request and the allocated bandwidth of all file transfer services with the first device as the sender.

[0507] S610. The sending system of the first device sends the service data of each service to the WiFi driver according to the allocated bandwidth of the services to be sent by itself.

[0508] Among them, one implementation of sending the service data of the service based on the allocated bandwidth of the service can be that the rate at which the sending system sends the service data of the service does not exceed its allocated bandwidth, or the amount of service data of the service sent per unit time does not exceed the amount of data reached by sending at the allocated rate of the service per unit time.

[0509] S611. The WiFi driver of the first device drives the WiFi module to send the service data of each service.

[0510] Specifically, the WiFi driver of the first device drives the WiFi module to send service data of corresponding services through the links carrying various services.

[0511] It should be understood that other devices in the QOS system also need to execute the methods executed by the first device in S601 - S611 above. However, the services to be transmitted by each device are different. When a device does not include the service to be sent, it does not need to execute S604 - S611 above. Or, when a device does not include a file transfer service and the service information of its non - file transfer service has not changed, it also does not need to execute S604 - S611 above.

[0512] In some embodiments, the devices in the QOS system can also trigger QOS optimization periodically, that is, periodically trigger each device in the system to execute S601 - S611.

[0513] The optimization method of centralized QOS is described as follows.

[0514] As follows above Figure 2 Taking the central control device and each controlled device in the QOS system shown above as an example, and taking a more general QOS system as an example, the optimization method of QOS of the QOS system with a central control device is described.

[0515] Figure 11 An optimization method of centralized QOS provided by the present application is shown. In this method, the central control device in the QOS system uniformly collects the service information and link information of each controlled device, calculates the speed limit value of the file transfer service, and sends the calculated file transfer service to their respective controlled devices, and each controlled device limits the speed of the corresponding file transfer service based on the speed limit value of its own file transfer service.

[0516] S701, the information update systems of each controlled device send their respective device service information and device link information to the information update system of the central control device.

[0517] Among them, the definitions of device service information and device link information can refer to the relevant descriptions in the above - mentioned distributed QOS optimization method, and will not be elaborated here.

[0518] In some embodiments, the central control device can initiate QOS optimization periodically or in response to user operations, send an update instruction to each controlled device, and this update instruction is used to request the latest device service information and device link information. Each controlled device responds to this update instruction and sends its own device service information and device link information to the central control device.

[0519] In some other embodiments, when the controlled device creates a service, closes a service, detects service jamming, service information change, link information change, etc., and meets the trigger condition, the information update system of the controlled device will receive the service information or link information of the changed service sent by the bandwidth management system or the QoS monitoring system, etc., or receive the indication information for indicating the service information change or link information change. Furthermore, the controlled device will send indication information to the central control device, and the indication information is used to indicate that the service information or link information in the QoS system has changed, or is used to indicate that QoS optimization is required. When receiving the indication information, the central control device, in response to the indication information, collects its own device service information and device link information, and sends an update instruction to each controlled device, and the update instruction is used to request the latest device service information and device link information. Each controllable device sends its own device service information and device link information to the central control device in response to the update instruction.

[0520] Regarding the specific method of the controlled device collecting its own device service information and device link information when creating a service, closing a service, detecting service jamming, service information change, link information change, etc., reference can be made to the QoS optimization method caused by the above-mentioned service creation, the required bandwidth change of the service, jamming, the transmission rate change of WiFi, service end, etc.

[0521] When the central control device creates a service, closes a service, detects service jamming, service information change, link information change, etc., it will also trigger the central control device to collect its own device service information and device link information, and send an update instruction to each controlled device, and the update instruction is used to request the latest device service information and device link information. Each controllable device sends its own device service information and device link information to the central control device in response to the update instruction.

[0522] S702, the information update system of the central control device receives the device service information and device link information sent by the controlled device.

[0523] In one implementation, after the information update system of each controlled device or the controlled device as the sending end collects its own device service information and device link information, it will send all its own device service information and link information to the information update system of the central control device.

[0524] In another implementation, the information update system of the controllable device can send the changed service information or the changed link information. The information update system of the central control device can determine the service information of all services and the link information of all links in the current QoS system based on the historically received service information and link information and the changed service information and changed link information.

[0525] S703. The information update system of the central control device sends a scheduling request to the QoS scheduling system. The scheduling request includes the link information and service information received by the central control device.

[0526] Among them, the link information currently received by the central control device may include the device link information of the central control device itself and the device link information of devices other than the central control device or the sender in the QoS system. The service information currently received by the central control device may include the device service information of the central control device itself and the device service information of devices other than the central control device or the sender in the QoS system.

[0527] S704. The QoS scheduling system of the central control device responds to the scheduling request and determines whether the current QoS system includes a file transfer service. When it does not include a file transfer service, there is no need to calculate the file speed limit value; when it includes a file transfer service, the speed limit value of the file service needs to be calculated, and S705 is executed.

[0528] When the service information received by the central control device includes the service information of the file transfer service, the current QoS system includes the file transfer service; otherwise, the current QoS system does not include the file transfer service.

[0529] In some embodiments, when the QoS scheduling system responds to the scheduling request and the service in the QoS system includes a file transfer service, it also needs to determine whether the current speed limit values of the included file transfer services are all preset speed limit values. If so, there is no need to calculate the file speed limit value; otherwise, the file speed limit value needs to be recalculated.

[0530] Optionally, when there is no need to calculate the file speed limit value, the central control device may broadcast indication information for indicating that QoS optimization is not required to the controlled device. After receiving the indication information, the controlled device does not need to perform QoS optimization and sends its own respective services with the original allocated bandwidth.

[0531] S705. The QoS scheduling system of the central control device calculates the speed limit value of each file transfer service.

[0532] Here, the central control device needs to calculate the speed limit value of each file transfer service in the QoS system. The method for calculating the speed limit value can refer to the method shown below, which will not be elaborated here. Figure 13 shown below, which will not be elaborated here.

[0533] S706. The QoS scheduling system of the central control device sends the speed limit value of each file transfer service to its information update system.

[0534] It should be understood that the QOS scheduling system of the central control device also needs to send the required bandwidth of its non-file transfer services and the speed limit value of its file transfer services to the bandwidth allocation system to execute the steps performed by the controlled devices in S709 - S712 below.

[0535] S707, the information update system of the central control device sends the speed limit value of each of its file transfer services to the information update systems of the respective controlled devices.

[0536] Exemplarily, the information update system of the central control device sends the speed limit value of the file transfer service that the first controlled device itself needs to send to the information update system of the first controlled device. The first controlled device is any one of the controlled devices in the QOS system.

[0537] Optionally, when the highest effective rate of the link is calculated by the central control device, the central control device can also send the highest effective rate of the link where it is located to each of the controlled devices.

[0538] S708, the information update system of the controlled device sends the required bandwidth of its non-file transfer services and the speed limit value of its file transfer services to its bandwidth allocation system.

[0539] S709, the bandwidth allocation system of the controlled device allocates bandwidth for each non-file transfer service according to the required bandwidth of each non-file transfer service it needs to send, and allocates bandwidth for each file transfer service according to the speed limit value of each file transfer service it needs to send.

[0540] S710, the bandwidth allocation system of the controlled device sends the allocated bandwidth of its services to its sending system.

[0541] S711, the sending system of the controlled device distributes the service data of each service according to the allocated bandwidth of its services.

[0542] S712, the WiFi driver of the controlled device drives the WiFi module to send the service data of each service.

[0543] For the specific implementation of S708 - S712 above, reference can be made to steps S607 - S611 in the above distributed QOS optimization method, which will not be elaborated here.

[0544] It should be understood that when the central control device has services to be transmitted, it will also execute S708 - S712 above.

[0545] In another implementation, when the controlled device does not include file transfer services, then the controlled device may not execute S707 - S709 either. Furthermore, the sending system of the controlled device directly uses the required bandwidth of its non-file transfer services as the allocated bandwidth to send its service data.

[0546] It should also be understood that in the above Figure 10 and Figure 11 although the speed limit value and allocated bandwidth of the file transfer service and the requested bandwidth and allocated bandwidth of the non - file transfer service are described together in the above S607 - S611, S708 - S712, in fact, for the non - file transfer service in S607 - S611, S708 - S712, the sending of the requested bandwidth, the determination of the allocated bandwidth, and the sending of the service data of the non - file transfer service can all be executed immediately after the creation of the non - file transfer service, or can be executed at any time after the service creation, which is not limited here.

[0547] Calculate the remaining bandwidth and determine whether the remaining bandwidth meets the service requirements.

[0548] Figure 12 Fig. shows a method for calculating the remaining bandwidth and determining whether the remaining bandwidth meets the service requirements provided by the present application. This method can be implemented by the bandwidth management system and information update system in the above device. The method includes but is not limited to the following steps:

[0549] S801, the bandwidth management system obtains the requested bandwidth or allocated bandwidth of all non - file transfer services in the current QOS system from the information update system.

[0550] S802, the bandwidth management system determines the total time occupancy ratio T1 of the real - time services based on the requested bandwidth of the real - time services and the highest effective rate of each link where the real - time services are located.

[0551]

[0552] Among them, V i is the requested bandwidth of the i - th real - time service in the current QOS system. It should be understood that when the requested bandwidth of the service is inconsistent with the allocated bandwidth, V i can be the allocated bandwidth of the i - th real - time service. γ i is the highest effective rate of the link where the i - th real - time service in the current QOS system is located. N1 is a positive integer, which is the total number of real - time services in the current QOS system.

[0553] S803, the bandwidth management system determines the total time occupancy ratio T2 of the delay - sensitive services based on the requested bandwidth of the delay - sensitive services and the highest effective rate of each link where the delay - sensitive services are located.

[0554]

[0555] Among them, V jis the required bandwidth of the j-th delay-sensitive service in the current QoS system. It should be understood that when the required bandwidth of the service is inconsistent with the allocated bandwidth, V j can be the allocated bandwidth for the j-th delay-sensitive service. γ j is the highest effective rate of the link where the j-th delay-sensitive service is located in the current QoS system. N2 is a positive integer, which is the total number of delay-sensitive services in the current QoS system, and j is a positive integer.

[0556] S804. Determine the remaining time ratio based on the total time ratio T1 of real-time services and the total time ratio T2 of delay-sensitive services.

[0557] Among them, the sum of the total time ratio T1 of real-time services and the total time ratio T2 of delay-sensitive services is the total time ratio of non-file insertion loss services.

[0558] The remaining time ratio, that is, the total time ratio T3 of file transfer services, T3 = 1 - T1 - T2.

[0559] S805. The bandwidth management system determines the remaining bandwidth based on the remaining time ratio and the highest effective rate of the link where the service to be created is located.

[0560] The remaining bandwidth V is:

[0561] V = T3 * γ

[0562] Among them, γ is the highest effective rate of the link where the service to be created is located.

[0563] The bandwidth management system determines whether the remaining bandwidth ratio is not less than the required bandwidth of the service to be created. If so, it is determined that the remaining bandwidth can meet the requirements of the service to be created; otherwise, the remaining bandwidth cannot meet the requirements of the service to be created.

[0564] The method for calculating the remaining bandwidth is not limited to the above, and the remaining bandwidth can also be calculated by other means.

[0565] In some other embodiments, the bandwidth management system does not calculate the remaining time ratio T3, but is calculated by the bandwidth allocation system. After calculating T3, the bandwidth allocation system updates it to the bandwidth management system.

[0566] Calculate the speed limit value of file transfer services.

[0567] Figure 13 Illustrates a method for calculating the speed limit value of file transfer services provided by the present application. This method can be implemented by the bandwidth allocation system in the above device, and this method includes but is not limited to the following steps:

[0568] S901, the bandwidth allocation system determines the total time proportion T1 of real-time services based on the required bandwidth of real-time services and the highest effective rate of each link where real-time services are located.

[0569] S902, the bandwidth allocation system determines the total time proportion T2 of delay-sensitive services based on the required bandwidth of delay-sensitive services and the highest effective rate of each link where delay-sensitive services are located.

[0570] S903, the bandwidth allocation system determines the maximum total time proportion T3 of file transfer services based on the time proportion T1 of real-time services and the time proportion T2 of delay-sensitive services.

[0571] Among them, the total time proportion T3 of file transfer services is the remaining time proportion, and T3 = 1 - T1 - T2.

[0572] S904, the bandwidth allocation system determines the time proportion T4 of each file transfer service in the QoS system based on the maximum total time proportion T3 of file transfer services.

[0573] T4 = T3 / M, or,

[0574] T4 = T3 / M * P, or,

[0575] T4 = T3 / M * a,

[0576] Among them, M is the number of file transfer services in the QoS system, P is the anti-collision coefficient, and P is related to the number of sending devices of file transfer services in the QoS system. Exemplarily, P = 1 - N / 10, where N is the number of sending devices. 0 < a < 1, for example, a is 0.5, 0.7.

[0577] S905, the bandwidth allocation system determines the speed limit value of file transfer services based on the time proportion T4 of each file transfer service.

[0578] In some embodiments, the speed limit value of file transfer services is represented as the time proportion T4 of this file transfer service. From the above calculation method of the time proportion T4 of file transfer services, it can be seen that the speed limit values of each file transfer service generated in the QoS system are the same.

[0579] In some embodiments, the speed limit value of file transfer services is represented as the sending rate / bandwidth of this file transfer service.

[0580] Exemplarily, the speed limit values of each file transfer service on the same link are the same, and the speed limit value U of each file transfer service on the k-th link k is:

[0581] U k = T4 * γ k .

[0582] Exemplarily, the speed limit values of file transfer services on the same link can also be different. For example, the speed limit value of a file transfer service can also be determined based on the size of the data volume of the file transfer service or the file type. For example, the speed limit value U of the s-th file transfer service carried on the k-th link k,s is:

[0583] U k,s = N3 * T4 * γ k * W s .

[0584] Wherein, N3 is the number of file transfer services carried on the k-th link, and Ws is the ratio of the data volume of the s-th file transfer service to the total data volume of the N3 file transfer services carried on the k-th link.

[0585] In some embodiments, when the calculated speed limit value of the file transfer service is less than the preset speed limit value, the speed limit value of the file transfer service is determined as its preset speed limit value to set the minimum speed limit value of the file transfer service; when the calculated speed limit value of the file transfer service is greater than or equal to the preset speed limit value, the speed limit value of the file transfer service is the calculated speed limit value of the file transfer service to avoid the speed limit value of the file transfer service being too small, resulting in the inability to transmit the file transfer service.

[0586] For the speed limit value expressed in terms of transmission rate / bandwidth, the preset speed limit value can be 0.02, 0.03, etc.

[0587] For the speed limit value expressed in terms of time ratio, the preset speed limit value can be 2Mbps, 5Mbps, etc.

[0588] The calculation process is illustrated by the following example.

[0589] The QOS system includes three devices, namely a PC, a PAD, and a folding screen mobile phone. Among them, the link information and service information are as follows:

[0590] Then the link information at this time is as follows:

[0591] Link 1, PC → mobile phone, the highest effective rate γ1 = 100.

[0592] Link 2, PC → PAD, the highest effective rate γ2 = 300.

[0593] Link 3, mobile phone → PAD, the highest effective rate γ3 = 200.

[0594] Link 4, mobile phone → PC, the highest effective rate γ4 = 100.

[0595] The service information of the real-time service includes:

[0596] Service 1, PC → Mobile phone (Link 1): Required bandwidth band1 = 30

[0597] Service 2, PAD → PC (Link 2): Required bandwidth band2 = 30

[0598] Service 3, PAD → Mobile phone (Link 2): Required bandwidth band3 = 40

[0599] Service 4, Mobile phone → PAD (Link 3): Required bandwidth band4 = 20

[0600] The service information of the file transfer service includes:

[0601] Service 5, PC → PAD (Link 2): File stream

[0602] Service 6, Mobile phone → PC (Link 4): File stream

[0603] Calculate the file stream rate.

[0604] 1) The sum of the total time ratio T1 of the real-time service and the total time ratio T2 of the delay-sensitive service:

[0605] T1 + T2 = band1 / γ1 + band2 / γ3 + band3 / γ2 + band4 / γ3 = 30 / 100 + 30 / 300 + 40 / 200 + 20 / 200 =

[0606] 0.3 + 0.1 + 0.2 + 0.1 = 0.7.

[0607] 2) The maximum total time ratio T3 of the file transfer service, T3 = 1 - T1 - T2 = 0.3.

[0608] 3) The maximum total time ratio T4 of a single file transfer service = T3 / M*(1 – N / 10) = 0.3 / 2*0.8 = 0.12. Among them, M = 2, N = 2.

[0609] 4) The speed limit value of the file transfer service on Link 4 (Mobile phone → PC) is: γ4*T4 = 100*0.12 = 12.

[0610] 5) The speed limit value of the file transfer service on Link 2 (PC → PAD): γ2*T4 = 300*0.12 = 36.

[0611] Add a screen mirroring service and the QOS optimization processing process.

[0612] Assume that a new screen mirroring service is added on Link 6 (Mobile phone → PC), with a required bandwidth band7 = 20, and recalculate the speed limit value of the file transfer service:

[0613] 1) Add a screen mirroring service from mobile phone to PC, with a bandwidth requirement of band5 = 20.

[0614] 2) Broadcast the new service information to surrounding devices, triggering all devices to update and calculate the QOS bandwidth allocation.

[0615] 3) Recalculate the time lengths allocated for real-time services and delay-sensitive services. According to the previous calculation, the real-time service duration is 0.7, and the new T1 + T2 = 0.7 + 20 / 100 = 0.9.

[0616] 4) Recalculate the maximum total time ratio for file transfer services as T3 = 1 - T1 - T2 = 1 - 0.9 = 0.1.

[0617] 5) The time for a single file task T4 = T3 / M * (1 - N / 10) = 0.1 / 2 * 0.8 = 0.04.

[0618] 6) The speed limit value for file transfer services on link 4 (mobile phone → PC) is: γ4 * T4 = 100 * 0.04 = 4.

[0619] 7) The speed limit value for file transfer services on link 2 (PC → PAD) is: γ2 * T4 = 300 * 0.04 = 12.

[0620] It should be noted that the corresponding relationships between the first electronic device, the second electronic device, the third electronic device, the fourth electronic device in this application and the devices in the above various embodiments can also be other corresponding relationships. The corresponding relationships between the first service - the eighth service and the services in the above various embodiments can also be other corresponding relationships. The corresponding first link and second link with the links in the above various embodiments can also be other corresponding relationships. From different perspectives, there can be different corresponding relationships.

[0621] Exemplarily, in the distributed QOS optimization method, device B can be understood as the first electronic device, and device A can also be understood as the second electronic device.

[0622] It should be understood that the steps in the above method embodiments can be completed by the integrated logic circuit of the hardware in the processor or the instructions in software form. The method steps disclosed in combination with the embodiments of this application can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor.

[0623] This application also provides an electronic device, which may include: a memory and a processor. Among them, the memory can be used to store a computer program; the processor can be used to call the computer program in the memory so that the electronic device executes the method executed by the device in any one of the above embodiments.

[0624] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the device in any of the above embodiments.

[0625] In a possible design, the chip system further includes a memory for storing program instructions and data, and the memory is located inside or outside the processor.

[0626] The chip system may be composed of chips or may include chips and other discrete devices.

[0627] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor that implements functions by reading software codes stored in the memory.

[0628] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately provided from the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transitory processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or may be separately provided on different chips. The embodiments of the present application do not specifically limit the type of the memory and the setting manner of the memory and the processor.

[0629] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0630] The present application also provides a computer program product, which includes a computer program (which can also be referred to as code or instructions). When the computer program is run, it causes the computer to execute the method performed by the device in any of the above embodiments.

[0631] The present application also provides a computer-readable storage medium, which stores a computer program (which can also be referred to as code or instructions). When the computer program is run, it causes the computer to execute the method performed by the device in any of the above embodiments.

[0632] The various embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0633] 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 processes or functions according to the present application are 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk (SSD)), etc.

[0634] Those of ordinary skill in the art can understand all or part of the processes in the methods of the above embodiments. These processes can be completed by relevant hardware instructed by a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.

[0635] In summary, the above description is only an embodiment of the technical solution of this application and is not intended to limit the protection scope of this application. Any modifications, equivalent replacements, improvements, etc. made in accordance with the disclosure of this application shall be included within the protection scope of this application.

Claims

1. A method for optimizing quality of service, characterized in that, Applied to a first electronic device, the method includes: Obtain first service information and link information of a first link. The first link carries a first service with the first electronic device as the sending end. The first service information includes the service type of the first service, and the link information of the first link includes the first highest effective rate and the identifier of the first channel; Receive second service information and link information of a second link sent by a second electronic device. The second link carries a second service with the second electronic device as the sending end. The second service information includes the service type and the required bandwidth of the second service, and the link information of the second link includes the second highest effective rate and the identifier of the second channel; the first channel and the second channel are the same channel, or the first channel and the second channel are two channels in the same frequency band; When the service type of the first service is a file transfer service and the service type of the second service is a non-file transfer service, determine a first speed limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, and the second highest effective rate; Transmit first file data through the first link at a first bandwidth value, where the first bandwidth value is less than or equal to the first speed limit value, and the first file data is the service data of the first service.

2. The method according to claim 1, characterized in that, The first link is a link between the first electronic device and the second electronic device, and the second link is a link between the second electronic device and a third electronic device.

3. The method according to claim 1, characterized in that, The first link is a link between the first electronic device and a third electronic device, and the second link is a link between the second electronic device and the third electronic device.

4. The method according to claim 1, characterized in that, The first link is a link between the first electronic device and a third electronic device, and the second link is a link between the first electronic device and the second electronic device.

5. The method according to claim 1, characterized in that, The first link is a link between the first electronic device and a third electronic device, and the second link is a link between the second electronic device and a fourth electronic device.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: Send the first service information and the link information of the first link to the second electronic device.

7. The method according to any one of claims 1-6, characterized in that, The obtaining of the first service information and the link information of the first link includes: When a trigger condition is met, obtain the first service information and the link information of the first link and broadcast a notification; or, when a notification is received, obtain the first service information and the link information of the first link; The notification is used to indicate an update of link information and service information, or is used to indicate that service information or link information has changed.

8. The method according to claim 7, characterized in that, Before obtaining the first service information and the link information of the first link when the trigger condition is met, the method further includes: When the creation of the first service is successful or when it is detected that a third service is closed, determine that the trigger condition is met; the third service is a service with the first electronic device as the sending end.

9. The method according to claim 7, characterized in that, Before obtaining the first service information and the link information of the first link when the trigger condition is met, the method further includes: When it is detected that the transmission rate of the first link changes, update the first highest effective rate; When the update of the first highest effective rate occurs, it is determined that the trigger condition is satisfied.

10. The method according to claim 7, characterized in that, Before obtaining the first service information and the link information of the first link when the trigger condition is satisfied, the method further includes: In response to a user operation for instructing to create a fourth service, determining whether the remaining bandwidth is less than the required bandwidth of the fourth service; When the remaining bandwidth is not less than the required bandwidth of the fourth service, creating the fourth service; When the creation of the fourth service is successful, it is determined that the trigger condition is satisfied.

11. The method according to claim 10, characterized in that, The first service information further includes the service type and the required bandwidth of the fourth service, the fourth service is also carried on the first link, and the service type of the fourth service is a non-file transfer service; Determining the first rate limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, and the second highest effective rate specifically includes: determining the first rate limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, the required bandwidth of the fourth service, and the second highest effective rate; The method further includes: transmitting the service data of the fourth service through the first link at the required bandwidth of the fourth service.

12. The method according to claim 11, characterized in that, The method further includes: When the required bandwidth of the fourth service changes or the fourth service is stuck, obtaining the first service information and the link information of the first link and broadcasting a notification.

13. The method according to claim 10, wherein The second service information further includes the service type of a fifth service, the fifth service is also carried on the second link, and the service type of the fifth service is a file transfer service; Determining the first rate limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, the required bandwidth of the fourth service, and the second highest effective rate specifically includes: determining the first rate limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the number of file transfer services.

14. The method according to claim 13, wherein Determining the first rate limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the number of file transfer services includes: Determining the total time ratio of non-file transfer services based on the first highest effective rate, the required bandwidth of the second service, and the second highest effective rate; Determining the total time ratio of file transfer services based on the total time ratio of non-file transfer services; Determining the time ratio of each file transfer service based on the total time ratio and the number of file transfer services; Determining the first rate limit value based on the time ratio of each file transfer service and the first highest effective rate.

15. The method according to claim 14, wherein When the product of the time ratio of each file transfer service and the first highest effective rate is greater than or equal to a preset rate limit value, the first rate limit value is the product of the time ratio of each file transfer service and the first highest effective rate; When the product of the time ratio of each file transfer service and the first highest effective rate is less than the preset rate limit value, the first rate limit value is the preset rate limit value.

16. The method according to any one of claims 1 - 5, wherein The second service information further includes the service type of the sixth service, and the sixth service is also carried on the second link, and the service type of the sixth service is a file transfer service; Determining the first rate limit value of the first service based on the first highest effective rate, the required bandwidth of the second service, and the second highest effective rate specifically includes: determining the first rate limit value of the first service and the second rate limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the total number of file transfer services; The method further includes: sending the second rate limit value to the second electronic device, where the second rate limit value is used to determine the second bandwidth value of the second file data of the sixth service, and the second bandwidth value is less than or equal to the second rate limit value.

17. The method according to claim 16, wherein Before obtaining the first service information and the link information of the first link, the method further includes: When receiving the indication information from the second electronic device, broadcasting an update instruction; the indication information is used to indicate that the service information or the link information has changed, or is used to indicate service quality optimization; the update instruction is used to request service information and link information.

18. The method according to claim 16, wherein Before obtaining the first service information and the link information of the first link, the method further includes: When detecting that the trigger condition is satisfied, broadcasting an update instruction; the update instruction is used to request service information and link information.

19. The method according to claim 18, wherein The method further includes: When the creation of the first service is successful or when it is detected that the seventh service is closed, it is determined that the trigger condition is satisfied; the seventh service is a service with the first electronic device as the sending end.

20. The method according to claim 18, wherein The method further includes: When detecting a change in the transmission rate of the first link, updating the first highest effective rate; When the first highest effective rate is updated, it is determined that the trigger condition is satisfied.

21. The method according to claim 18, wherein The method further includes: In response to receiving a user operation for indicating the creation of an eighth service, determining whether the remaining bandwidth is less than the required bandwidth of the eighth service; When the remaining bandwidth is not less than the required bandwidth of the eighth service, creating the eighth service; When the creation of the eighth service is successful, it is determined that the trigger condition is satisfied.

22. The method according to claim 21, wherein The first service information further includes the service type and the required bandwidth of the eighth service, and the eighth service is also carried on the first link, and the service type of the eighth service is a non-file transfer service; Determining the first rate limit value of the first service and the second rate limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the second highest effective rate, and the total number of file transfer services specifically includes: determining the first rate limit value of the first service and the second rate limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the required bandwidth of the eighth service, the second highest effective rate, and the number of file transfer services; The method further includes: transmitting the service data of the eighth service through the first link at the required bandwidth of the eighth service.

23. The method according to claim 22, wherein The method further includes: When the required bandwidth of the eighth service changes or the eighth service lags, obtain the first service information and the link information of the first link, and broadcast a notification.

24. The method according to claim 22 or 23, characterized in that, The determining of the first rate limit value of the first service and the second rate limit value of the sixth service based on the first highest effective rate, the required bandwidth of the second service, the required bandwidth of the eighth service, the second highest effective rate, and the number of file transfer services specifically includes: Determine the total time ratio of non-file transfer services based on the first highest effective rate, the required bandwidth of the second service, the required bandwidth of the eighth service, and the second highest effective rate; Determine the total time ratio of file transfer services based on the total time ratio of non-file transfer services; Determine the time ratio of each file transfer service based on the total time ratio and the number of file transfer services; Determine the first rate limit value based on the time ratio of each file transfer service and the first highest effective rate; Determine the second rate limit value based on the time ratio of each file transfer service and the second highest effective rate.

25. The method according to claim 24, characterized in that, When the product of the time ratio of each file transfer service and the first highest effective rate is greater than or equal to the preset rate limit value, the first rate limit value is the product of the time ratio of each file transfer service and the first highest effective rate; When the product of the time ratio of each file transfer service and the first highest effective rate is less than the preset rate limit value, the first rate limit value is the preset rate limit value; When the product of the time ratio of each file transfer service and the second highest effective rate is greater than or equal to the preset rate limit value, the second rate limit value is the product of the time ratio of each file transfer service and the first highest effective rate; When the product of the time ratio of each file transfer service and the second highest effective rate is less than the preset rate limit value, the second rate limit value is the preset rate limit value.

26. The method according to any one of claims 1 - 25, characterized in that, The first highest effective rate is determined based on the modulation and coding strategy (MCS) rate of the first link; the second highest effective rate is determined based on the MCS rate of the second link.

27. A method for optimizing quality of service, characterized in that, Applied to a second electronic device, the method includes: Obtain the second service information and the link information of the second link. The second link carries a second service with the second electronic device as the sender. The second service information includes the service type and required bandwidth of the second service. The link information of the second link includes the second highest effective rate and the identifier of the second channel; the required bandwidth of the second service and the second highest effective rate are used to calculate the first rate limit value of the first service. The first service is a service carried on the first link with the first electronic device as the sender, and the service type of the first service is a file transfer service; the link information of the first link includes the identifier of the first channel; the first channel and the second channel are the same channel, or the first channel and the second channel are two channels in the same frequency band; Send the second service information and the link information of the second link to the first electronic device.

28. The method according to claim 27, characterized in that, The second service information also includes a service type of a sixth service, the second link also carries the sixth service, the service type of the sixth service is a file transfer service, the requested bandwidth of the second service and the second maximum effective rate are also used to calculate a second rate limit value of the sixth service, and the method further includes: receiving the second speed limit value from the first electronic device; The second file data is transmitted through the second link at a second bandwidth value, where the second bandwidth value is less than or equal to the second speed limit value, and the second file data is service data of the sixth service.

29. The method according to claim 27 or 28, characterized in that, Before acquiring the second service information and the link information of the second link, the method further includes: An update instruction is received from the first electronic device, where the update instruction is used to request service information and link information.

30. The method according to any one of claims 27 - 29, characterized in that, The method further comprises: When it is detected that a trigger condition is met, indication information is sent to the first electronic device; the indication information is used to indicate that the service information or link information has changed, or to indicate that the service quality is optimized.

31. The method according to claim 30, characterized in that, The method further comprises: When the second service is successfully created or when it is detected that the ninth service is closed, it is determined that the trigger condition is met, and the ninth service is a service with the second electronic device as the sending end.

32. The method according to claim 30, characterized in that, The method further comprises: When it is detected that the required bandwidth of the second service changes or the second service is stuck, it is determined that the trigger condition is met.

33. The method according to claim 30, characterized in that, The method further comprises: When a transmission rate change of the second link is detected, updating the second highest effective rate; When the second highest effective rate is updated, it is determined that the trigger condition is satisfied.

34. An electronic device, characterized in that It includes a memory and one or more processors; 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 the method described in any one of claims 1-26 or 27-33.

35. A computer-readable storage medium, comprising instructions, characterized in that When the instructions are executed on an electronic device, the electronic device executes the method as described in any one of claims 1-33.