Speed limiting method and related equipment
By performing multiple speed limit and emulator simulations on file services in the channel, the appropriate speed limit ratio is determined, and the problem of delay timeout of real-time services in the channel is solved, and the stable transmission of real-time services and efficient utilization of resources is achieved.
Patent Information
- Application Number
- CN202411266882.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-08-12
AI Technical Summary
How to ensure that the delay of real-time services in a channel does not expire, especially in the case of interference, it is difficult for the prior art to effectively manage channel resources to meet the delay requirements of real-time services.
By increasing the speed limits multiple times for file services in the channel, and combining the emulator to simulate the system status before and after interference, the appropriate speed limit ratio is determined to ensure that the delay of real-time services does not exceed timeout, and the fitting curve is used to adjust the speed limit ratio to adapt to changes in real-time services.
It effectively ensures that the delay of real-time services in the channel does not expire, improves the efficiency of channel resources, and ensures the stable transmission of real-time services.
Smart Images

Figure CN120474983A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a speed limiting method and related equipment. Background Art
[0002] Round-trip time (RTT) refers to the time between data being sent from the sender, the time the receiver receives the data, the time it sends feedback to the sender, and the time the receiver receives the feedback. For example, if data is sent from the sender at time t1 and the sender receives the feedback at time t2, the RTT for this data is t2 - t1.
[0003] Typically, services transmitted in a system can be categorized as file services and real-time services. Both services can be transmitted on a single channel. Real-time services have strict transmission latency requirements, requiring the RTT of real-time services to remain within the timeout threshold. Therefore, ensuring latency for real-time services within the channel becomes a challenge. Summary of the Invention
[0004] This application provides a rate limiting method and related equipment to ensure the delay of real-time services.
[0005] In a first aspect, some embodiments of the present application provide a speed limiting method. The speed limiting method may include: at a first moment, if a first real-time service is included in a first channel, limiting the data rate of a first file service in the first channel based on a first speed limiting ratio, where the first real-time service is a real-time service in the first channel whose round-trip time (RTT) is greater than a timeout threshold; at a second moment, if the first channel still includes the first real-time service, limiting the data rate of the first file service based on a second speed limiting ratio, where the second speed limiting ratio is greater than the first speed limiting ratio, and the size of the speed limiting ratio is inversely proportional to the size of the data rate after speed limiting; at a third moment, if the first channel still includes the first real-time service, determining a third speed limiting ratio corresponding to the first real-time service; and limiting the data rate of the first real-time service based on the third speed limiting ratio.
[0006] Through the above method, when the real-time service in the channel times out, the file service in the channel is first subject to two incremental speed limits. If there is still timed-out real-time service in the channel after the file service is speed-limited, the actual service in the channel is speed-limited to ensure the delay of the real-time service.
[0007] In a possible embodiment, determining the third speed limit ratio corresponding to the first real-time service includes: obtaining a first RTT and a second RTT, the first RTT being the RTT corresponding to the real-time service in the first channel after speed limiting at the first moment, and the second RTT being the RTT corresponding to the real-time service in the first channel after speed limiting at the second moment; determining the third speed limit ratio corresponding to the first real-time service based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT, and the timeout threshold corresponding to the first real-time service.
[0008] Through the above method, by accurately determining the third speed limit ratio corresponding to the first real-time service through the two RTTs corresponding to the real-time service in the first channel after speed limiting the file service twice, the first real-time service will not time out after the first real-time service is speed limited by the third speed limit ratio / a speed limit ratio greater than the third speed limit ratio.
[0009] In a possible embodiment, based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT and the timeout threshold corresponding to the first real-time service, the third speed limit ratio corresponding to the first real-time service is determined, including: based on the first speed limit ratio, the second speed limit ratio, the first RTT and the second RTT, determining the fitting curve corresponding to the first real-time service, the fitting curve is used to represent the relationship between the speed limit ratio and the RTT; based on the fitting curve and the timeout threshold corresponding to the first real-time service, determining the third speed limit ratio corresponding to the first real-time service.
[0010] In the above manner, a curve is fitted to fit the relationship between the speed limit ratio and the RTT, and a suitable speed limit ratio that can meet the timeout threshold is determined through the fitted curve.
[0011] In a possible embodiment, the data rate of the first real-time service is limited based on the third speed limit ratio, including: using the largest speed limit ratio among the third speed limit ratios as the fourth speed limit ratio; and using the fourth speed limit ratio to limit the data of all first real-time services in the first channel.
[0012] In the above manner, the maximum speed limit ratio is selected to limit the speed of the real-time service, that is, a speed limit ratio is used to uniformly limit the speed of all real-time services in the first channel, so that all real-time services after speed limit will not time out.
[0013] In a possible embodiment, the first file service is a file service in which the amount of remaining data to be transmitted in the first channel is greater than a file rate limit threshold.
[0014] In the above manner, when the amount of remaining transmission data of the file service is small, the speed of the small data file service is not limited.
[0015] In a possible embodiment, if the first channel includes a first real-time service, the relationship between the data rate of the first file service and the RTT of the first real-time service is obtained through an emulator; based on the relationship between the data rate of the first file service and the RTT of the first real-time service, and the timeout threshold corresponding to the first real-time service, the first file service is speed-limited.
[0016] In the above manner, the first file service can be accurately speed-limited by the simulator.
[0017] In a possible embodiment, the simulator is allowed to learn the relationship between the data rate of the file service and the RTT of the real-time service by simulating the system status before and after the new interference; wherein, the system status before the new interference is a state in which the first real-time service does not exist in the first channel, and the system status after the new interference is a state in which the first real-time service exists in the first channel.
[0018] Through the above method, by simulating the system status before and after the interference, the simulator can learn the relationship between the data rate of the file service and the RTT of the real-time service. In the application stage, the reason for the timeout of the real-time service in the channel may be the new interference in the system. Therefore, through the above simulation method, the simulator can accurately learn the relationship between the data rate of the file service and the RTT of the real-time service.
[0019] In a possible embodiment, if the RTTs of all real-time services in the first channel are less than the corresponding RTT busy thresholds, the data rate of the first file service is increased based on a preset step size.
[0020] By using the above method, when the channel is not busy, the data rate of the first file service is increased, and the transmission of the first file service is accelerated, so that the transmission of the first file service is completed faster.
[0021] In a second aspect, the present application provides a speed limiting device, which may be an electronic device, a device in an electronic device, or a device that can be used in conjunction with an electronic device; wherein, the speed limiting device may also be a chip system, and the speed limiting device may execute the method executed by the electronic device in the first aspect. The functions of the speed limiting device may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions. The unit may be software and / or hardware. The operations and beneficial effects performed by the speed limiting device may refer to the methods and beneficial effects described in the first aspect above, and repeated parts will not be repeated.
[0022] In a third aspect, the present application provides an electronic device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, wherein the computer program code comprises computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the speed limiting method of any possible implementation of the first aspect.
[0023] In a fourth aspect, the present application provides a chip system comprising a processor and an interface, wherein the processor and the interface are coupled; the interface is used to receive or output signals, and the processor is used to execute code instructions to execute the speed limiting method in any possible implementation of the first aspect above.
[0024] In a fifth aspect, the present application provides a computer-readable storage medium storing a computer program / instruction. When the computer program product runs on a computer, the computer executes the speed limiting method in any possible implementation of the first aspect.
[0025] In a sixth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the speed limiting method in any possible implementation of the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1A A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0027] Figure 1B A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0028] Figure 1C A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0029] Figure 2 A flow chart of a speed limiting method provided in this application;
[0030] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0031] Figure 4 The software and hardware architecture of an electronic device provided in an embodiment of the present application;
[0032] Figure 5 A flow chart of another speed limiting method provided for this application;
[0033] Figure 6 A schematic structural diagram of a speed limiting device provided in an embodiment of the present application;
[0034] Figure 7 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0036] It should be understood that the terms "first," "second," and the like in the specification, claims, and drawings of this application are used to distinguish between different objects, rather than to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0037] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0038] The following is an introduction to the background and terms involved in the embodiments of this application:
[0039] Round-trip time (RTT)
[0040] RTT measures the round-trip time it takes for data to be sent from the sender to the receiver and then returned from the receiver to the sender. RTT reflects the data speed and network stability, making it a key parameter for evaluating network quality. For this application, RTT can also be used to assess whether real-time services in the channel have timed out.
[0041] The RTT can be calculated as follows: The sender first records the timestamp of the real-time service data packet, for example, the sending time is t1. Then, after receiving the real-time service data packet, the receiver sends an ACK packet to the sender. The sender records the timestamp of the ACK receipt, for example, the ACK receipt time is t2. The sender calculates the RTT based on t1 and t2, for example, taking the difference between t2 and t1 as the RTT.
[0042] The method provided in the embodiments of the present application can be applied to scenarios where latency is required, such as scenarios where multiple devices are connected via WiFi. In this scenario, multiple devices include file transfer services such as file sharing, as well as services that have latency requirements, such as call sharing, notification sharing, keyboard and mouse sharing, PC collaboration, and PAD collaboration.
[0043] Figure 1A As shown, it is a structural diagram of a communication system provided by an embodiment of the present application. The communication system may include multiple QOS systems, and each QOS system may include one or more electronic devices. For example, Figure 1A The system 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 laptop. The second QOS system includes a third mobile phone, a fourth mobile phone, a large-screen device, and a laptop. Different QOS systems can include the same electronic device, that is, an electronic device can belong to multiple different QOS systems at the same time. For example, a laptop belongs to both the first QOS system and the second QOS system.
[0044] Electronic devices in 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, used to transmit service data. Links in the same QoS system operate on the same channel or frequency band.
[0045] Among them, the same frequency band refers to the same 2.4GHz, 5GHz or other frequency bands. A frequency band may include multiple channels. For example, the available channels of an indoor access point (AP) in the 5GHz band can be divided into 13 channels such as 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, and 165. The same channel in this application can be any channel provided by the above-mentioned 2.4GHz or 5.0GHz or other frequency bands. Taking wireless fidelity (WiFi) as an example of a short-range communication method, the links in a QOS system working 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, they belong to the same basic service set (BSS) or the same extended service set (ESS). Alternatively, some links in a QoS system belong to the same BSS or ESS, some links belong to the Wi-Fi Direct network, and other links belong to other networks with the same frequency band or the same channel. Links in a QoS system operating in the same frequency band may mean that the channels on which the links in the QoS system operate belong to the same frequency band, such as 2.4 GHz, 5 GHz, or another frequency band.
[0046] like Figure 1B The architecture diagram of the communication system shown in FIG. 1 is an example of a communication system including a QOS system.
[0047] For example, the communication system may include a QOS system composed of multiple electronic devices, wherein the multiple electronic devices may communicate with each other through short-range communication and may establish at least one link, and these links may operate in the same frequency band or the same channel. Figure 1B As shown, the multiple electronic devices may include terminals such as mobile phones (11 and 12), notebooks 13 and large-screen devices 14.
[0048] Taking the example of a first device sending service data (such as screen projection service data) to a 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, the sending end and the receiving end of the service are both two devices in the QOS system. In another implementation, the sending end of the service is a device in the above-mentioned QOS system, and the receiving end of the service can be another device in the above-mentioned QOS system or a router in the communication system.
[0049] Services are carried on links. Links can include switching nodes, such as link 41 between mobile phones 11 and 12, which can include a switching node, such as a router. Links can also include no switching nodes, such as in Wi-Fi direct connections, such as link 42 between mobile phone 11 and large-screen device 14, and link 43 between mobile phone 12 and large-screen device 14.
[0050] Services running in the application layer can be divided into two types: real-time services and file services. Real-time services have higher transmission latency requirements than file services. The following describes the two types of services:
[0051] (1) Real-time services: Data to be transmitted is generated at a fixed period. For example, screen projection services typically generate a video frame every 16 milliseconds. To ensure the real-time transmission of services, such services typically require a small average transmission delay.
[0052] (2) File service: When the service is initiated, the content and amount of data to be transmitted can be clearly specified, and requirements can also be placed on the data transmission completion time (i.e., the average transmission rate).
[0053] It can be understood that the application layer can identify the service type of each service based on the characteristics of each service mentioned above.
[0054] Exemplarily, real-time services may include screen projection services, etc., and file services may include video file transmission services, text file transmission services, image file transmission services, etc.
[0055] For example, Figure 1B In the example, mobile phone 11 sends a video file to notebook 13 and an image to large-screen device 14. Then link 41 carries the file service D1 sent by mobile phone 11 to notebook 13, and link 42 carries the file service D2 sent by mobile phone 11 to large-screen device 14; mobile phone 12 projects the screen to large-screen device 14, and link 43 carries the screen projection service P1 (P1 is a real-time service); notebook 13 projects the screen to large-screen device 14, and link 44 carries the screen projection service P2 (P2 is a real-time service).
[0056] The above examples illustrate the services carried by each link. It should be understood that one link can carry one or more services.
[0057] The following embodiments of this application are described using WiFi communication as an example for short-range communication. It should be understood that in other embodiments, the short-range communication method may also be Bluetooth, near-field communication (NFC), etc. The short-range communication method may also include multiple methods. For example, the links 41 and 42 are established via WiFi and both operate in the 2.4 GHz frequency band, and the links 43 and 44 are established via Bluetooth and both operate in the 2.4 GHz frequency band.
[0058] It should be understood that the above Figure 1B The devices, services, links, etc. are only exemplary. In other embodiments, the QOS system may include more or fewer electronic devices, the types of electronic devices may be replaced with other devices, and the services between electronic devices may be other services.
[0059] The electronic device may be a smart terminal device, which may be of various types, and the embodiments of the present application do not limit the specific types thereof. For example, it may be a mobile phone, and may 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 may also be an Internet of Things (IOT) device or a smart home device such as a smart TV, etc. Without being limited thereto, it may also include a laptop computer with a touch-sensitive surface or touch panel, a desktop computer with a touch-sensitive surface or touch panel, and other non-portable terminal devices.
[0060] Since there are interactions between multiple electronic devices in the QOS system, and multiple electronic devices may have multiple services, in order to make the above QOS system work better, such as Figure 1C As shown, an electronic device with a certain level of computing power in the QoS system is used as a controller, and electronic devices other than the controller are used as agents. The controller can exchange signals with other WiFi devices (agents). The agent is deployed on each schedulable WiFi device. The controller and the agent exchange information to obtain the status of various services (for example, data already sent or remaining data to be sent) and channel status.
[0061] The Agent and Agent can directly interact with each other, for example Figure 1B In the example, the mobile phone 11 is an agent and the large screen device 14 is also an agent. The mobile phone 11 can project its screen to the large screen device 14 through the link 42. The agent can interact with the controller and the agent for business, for example Figure 1B In the figure, the mobile phone 11 is the agent, the large-screen device 14 is also the agent, and the notebook 13 is the controller. The mobile phone 11 can send the data of the screen projection service to the notebook 13 through the link 41, and the notebook 14 then sends it to the large-screen device 14 through the link 44.
[0062] The channel status acquired by the controller can specifically be the RTT of each real-time service in the channel. This RTT can be sent by the agent to the controller. For example, Agent 1 is the sender and the controller is the receiver. Agent 1 sends a data packet to the controller and records the timestamp t1. The controller sends an ACK to Agent 1, and Agent 1 records the time of receipt t2. Agent 1 then determines the RTT based on t2 and t1 and sends the determined RTT to the controller.
[0063] Alternatively, Agent 1 acts as the sender and Agent 2 as the receiver. Agent 1 sends a data packet to Agent 2 and records the timestamp t1. Agent 2 sends an ACK to Agent 1 and records the received time t2. Agent 1 determines the RTT based on t2 and t1 and sends the determined RTT to the Controller.
[0064] Multiple electronic devices operating in the same frequency band or channel share bandwidth. Bandwidth resources are limited, and file services and real-time services can coexist on the same channel. Therefore, it is crucial to ensure that real-time services on the channel do not time out. This means that the RTT of real-time services on the channel does not exceed the timeout threshold. However, in actual transmission, a real-time service may time out due to various reasons. For example, environmental interference and other factors may cause one or more real-time services on the channel to time out.
[0065] Therefore, in order to ensure the delay of real-time services, this application provides a speed limiting method. By multiple speed limits on file services and real-time services in the channel, the RTT of real-time services in the channel is reduced, that is, the delay requirements of real-time services in the channel are met.
[0066] The following is a further introduction to the speed limiting method provided in the embodiment of the present application: Figure 2 As shown, Figure 2 This is a flow chart of a speed limiting method provided in an embodiment of the present application. The speed limiting method includes the following steps 201 to 204. Figure 2 The method shown may be performed by an electronic device. Figure 2 The execution subject of the method shown can be a chip or chip system in an electronic device, which is not limited in the embodiments of the present application. Figure 2 The method is described by taking an electronic device as an example of an execution subject.
[0067] It should be noted that the execution subject can be specifically the Controller mentioned above.
[0068] 201. At a first moment, if a first channel includes a first real-time service, the electronic device limits the data rate of a first file service in the first channel based on a first rate limit ratio. The first real-time service is a real-time service in the first channel whose round-trip time (RTT) is greater than a timeout threshold.
[0069] The first channel can be a channel between two agents or a channel between an agent and a controller. Similarly, the real-time service can be a service between two agents, between an agent and a controller, or between an agent and another agent through a controller.
[0070] Optionally, the data rate may be the amount of data transmitted per unit time. For example, if the data rate is 100 KB / S, 100 KB of data of the first file service is transmitted in the first channel per second.
[0071] Optionally, the RTT of the first real-time service may be the average RTT of all data packets historically sent by the first real-time service. For example, the first real-time service is divided into 30 data packets (specifically, UDP data packets) for transmission. At a first moment, the first real-time service transmits 10 data packets, each of which corresponds to 10 RTTs (the sender of each data packet records the timestamp of the transmission and the timestamp of the ACK received). The RTT of the first real-time service at the first moment is the average RTT of the ten data packets.
[0072] Optionally, the RTT of the first real-time service can be the average RTT of some data packets historically sent by the first real-time service. For example, the first real-time service is divided into 30 data packets (specifically, UDP packets) for transmission. At a first moment, the first real-time service transmits 10 data packets. The RTTs of these 10 data packets are determined at equal intervals. For example, the RTTs of the first data packet, the third data packet, the fifth data packet, the seventh data packet, and the ninth data packet are recorded by the sender. The RTT of the first real-time service at the first moment is the average RTT of these five data packets.
[0073] Optionally, the RTT of the first real-time service described above is the average of the RTTs of the data packets. In addition to the average, the RTT of the first real-time service can also be the median of the RTTs of multiple data packets, etc. This application does not impose any restrictions.
[0074] Optionally, the timeout threshold may be preset, and when the RTT of the real-time service is greater than the timeout threshold, the real-time service is considered to have timed out.
[0075] Optionally, the first channel may include one or more first real-time services. For example, the first channel includes the following real-time services: real-time service A, real-time service B, and real-time service C. If the RTT of real-time service B and real-time service C is greater than the timeout threshold, then the real-time service B and real-time service C are first real-time services.
[0076] Optionally, the first speed limit ratio is a preset speed limit ratio, for example, the first speed limit ratio is 0.2.
[0077] Optionally, the first file service is all file services in the first channel. For example, the first channel includes the following file services: file service A, file service B, and file service C. The speeds of file services A, B, and C are limited based on the first speed limit ratio.
[0078] Exemplarily, the first channel includes the following real-time services: real-time service A, real-time service B, and real-time service C. The first channel also includes the following file services: file service A, file service B, and file service C. Assume that the data rate of file service A is T1, the data rate of file service B is T2, the data rate of file service C is T3, and the first speed limit ratio is a1. Among them, the RTT of real-time service B and real-time service C is greater than the timeout threshold (real-time service B and real-time service C are the first real-time services). After the file services are speed-limited based on the first speed limit ratio, the data rate of file service A is (1-a1)T1, the data rate of file service B is (1-a1)T2, and the data rate of file service C is (1-a1)T3.
[0079] Optionally, the data rate of the first file service after speed limiting is the product of (1-a1) and the original data rate (for example, (1-a1)T2). The data rate of the first file service after speed limiting can also be the product of the first speed limit ratio and the original data rate (for example, a1*T2).
[0080] Optionally, the first file service may be any file service in the first channel. For example, the first channel includes the following file services: file service A, file service B, and file service C. The first file service is file service A, and the speed of file service A is limited based on the first speed limit ratio.
[0081] In a possible embodiment, the first file service is a file service in which the amount of remaining data to be transmitted in the first channel is greater than a file rate limit threshold.
[0082] Exemplarily, the first channel includes the following file services: file service A, file service B, and file service C, where file service A has 6KB left to be transmitted, file service B has 200KB left to be transmitted, and file service C has 120KB left to be transmitted. The file speed limit threshold is 10KB, then only file service B and file service C are speed limited, and file service A is not speed limited.
[0083] The speed of the small data file service is not limited, so that the small data file service can be quickly transmitted, releasing more transmission resources in the first channel, so that the real-time service in the first channel can have more transmission resources for transmission.
[0084] 202. At the second moment, if the first channel still includes the first real-time service, the electronic device limits the data rate of the first file service based on the second speed limit ratio, wherein the second speed limit ratio is greater than the first speed limit ratio, and the size of the speed limit ratio is inversely proportional to the size of the data rate after the speed limit.
[0085] Optionally, the first real-time service at the second moment may be the same as the first real-time service at the first moment, or the number of the first real-time services at the second moment is less than the number of the first real-time services at the first moment, or the first real-time service at the second moment is different from the first real-time service at the first moment, or the first real-time service at the second moment is partially the same as the first real-time service at the first moment.
[0086] For example, the first real-time service at the first moment is: real-time service A and real-time service B. After the first speed limit at the first moment, the RTT of real-time service B is less than or equal to the timeout threshold. The first real-time service at the second moment is: real-time service A.
[0087] Alternatively, the first real-time services at the first moment are: real-time services A and real-time services B. After the first speed limit at the first moment, other real-time services in the first channel time out due to new interference. The first real-time service at the second moment is: real-time service C.
[0088] Alternatively, the first real-time services at the first moment are: real-time services A and real-time services B. After the first speed limit at the first moment, more real-time services in the first channel time out due to new interference. The first real-time services at the second moment are: real-time services A, real-time services B and real-time services C.
[0089] Alternatively, the first real-time services at the first moment are: real-time service A and real-time service B. After the first speed limit at the first moment, the RTT of real-time service B is still higher than the timeout threshold, and new interference is added at this time, causing real-time service C to also exceed the timeout threshold. The first real-time services at the second moment are: real-time service B and real-time service C.
[0090] Among them, the size of the second speed limit ratio is inversely proportional to the size of the data rate after the speed limit, and the second speed limit ratio is greater than the first speed limit ratio, so the data rate of the first file business after the speed limit at the second moment is less than the data rate of the first file business after the speed limit at the first moment.
[0091] Exemplarily, the first channel includes the following real-time services: real-time service A, real-time service B, and real-time service C, and the first channel also includes the following file services: file service A, file service B, and file service C. Assume that the data rate of file service A is T1, the data rate of file service B is T2, and the data rate of file service C is T3, the first speed limit ratio is a1, and the second speed limit ratio is a2. After speed limiting the file services based on the first speed limit ratio, the data rate of file service A is (1-a1)T1, the data rate of file service B is (1-a1)T2, and the data rate of file service C is (1-a1)T3. After speed limiting the file services based on the second speed limit ratio, the data rate of file service A is (1-a2)T1, the data rate of file service B is (1-a2)T2, and the data rate of file service C is (1-a2)T3. Among them, (1-a2)T1 is less than (1-a1)T1, (1-a2)T2 is less than (1-a1)T2, and (1-a2)T3 is less than (1-a1)T3.
[0092] Optionally, at the second moment mentioned above, the data rate of the first file service after speed limiting is the product of (1-a2) and the original data rate (for example, (1-a2)T2). The data rate of the first file service after speed limiting can also be the product of the second speed limit ratio and the original data rate (for example, a2*T2). In this case, the size of the speed limit ratio is proportional to the size of the data rate after speed limiting, and the second speed limit ratio is smaller than the first speed limit ratio. For example, the first speed limit ratio is 0.8, and the second speed limit ratio is 0.6. The data rate of the first file service is 100KB / S. After speed limiting based on the first speed limit ratio at the first moment, it is 80KB / S. After speed limiting based on the second speed limit ratio at the second moment, it is 60KB / S.
[0093] The speed limit at the second moment mentioned above is based on the second speed limit ratio and the original data rate of the first file service. Optionally, the speed limit at the second moment can also be based on the second speed limit ratio and the data rate of the first file service after speed limiting based on the first speed limit ratio. In other words, the speed limit at the second moment can be a speed limit based on the data rate after speed limiting at the first moment. That is, the data rate of the file service after speed limiting at the first moment is (1-a1)T1, and the data rate of file service A after speed limiting at the second moment is (1-a1)(1-a2)T1. At this time, the second speed limit ratio can be greater than or equal to the first speed limit ratio, or the second speed limit ratio can also be less than the first speed limit ratio.
[0094] For example, the first rate limit ratio is 0.8, the second rate limit ratio is 0.9, and the data rate of the first file service is 100KB / S. The data rate is 80KB / S at the first moment and 72KB / S at the second moment.
[0095] 203. At a third moment, if the first channel further includes the first real-time service, the electronic device determines a third rate limit ratio corresponding to the first real-time service.
[0096] Among them, the third speed limit ratio is the speed limit ratio for the first real-time service in the first channel. That is to say, after the file service in the first channel is speed-limited multiple times, if the first real-time service still times out, the first real-time service is speed-limited to avoid timeout of the first real-time service by reducing the data rate of the real-time service.
[0097] Optionally, the first real-time service at the third moment and the first real-time service at the second moment may be the same, or the number of the first real-time services at the third moment is less than the number of the first real-time services at the second moment, or the first real-time service at the third moment is different from the first real-time service at the second moment, or the first real-time service at the third moment is partially the same as the first real-time service at the second moment.
[0098] In a possible embodiment, the electronic device determines a third speed limit ratio corresponding to the first real-time service, including: the electronic device obtains a first RTT and a second RTT, the first RTT being the RTT corresponding to the real-time service in the first channel after speed limit at the first moment, and the second RTT being the RTT corresponding to the real-time service in the first channel after speed limit at the second moment; based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT and the timeout threshold corresponding to the first real-time service, the third speed limit ratio corresponding to the first real-time service is determined.
[0099] The first RTT is the RTT of the first real-time service in the first channel after the first file service in the first channel is rate-limited at the first moment. The RTT of the first real-time service can be found in the above description and is not further described in this application. Similarly, the second RTT is the RTT of the first real-time service in the first channel after the first file service in the first channel is rate-limited at the second moment.
[0100] Optionally, the local RTT and the second RTT may be sent by the Agent to the Controller.
[0101] Optionally, if there are multiple first real-time services, there may also be multiple timeout thresholds corresponding to the first real-time services, and the timeout thresholds corresponding to different first real-time services may be the same or different.
[0102] Optionally, the timeout threshold may be a timeout period, for example, the timeout threshold is 20ms.
[0103] In a possible embodiment, the electronic device determines a third speed limit ratio corresponding to the first real-time service based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT, and the timeout threshold corresponding to the first real-time service, including: the electronic device determines a fitting curve corresponding to the first real-time service based on the first speed limit ratio, the second speed limit ratio, the first RTT, and the second RTT, the fitting curve being used to represent the relationship between the speed limit ratio and the RTT; and determines the third speed limit ratio corresponding to the first real-time service based on the fitting curve and the timeout threshold corresponding to the first real-time service.
[0104] Optionally, the fitting function is a linear (first-order) function. The speed limit ratio and the RTT in the fitting function may be inversely proportional, that is, the larger the speed limit ratio, the smaller the RTT.
[0105] Because the data rate of the first real-time service is too low, the total transmission time required is long. For example, if the first real-time service contains 1000KB of data, if the data rate is 100KB / s, it will take 10 seconds to transmit. If the data rate is 10KB / s, it will take 100 seconds to transmit. Therefore, in order to ensure that the first real-time service is transmitted as quickly as possible without timing out, it is necessary to determine a third speed limit ratio based on the fitting curve and the timeout threshold corresponding to the first real-time service. In other words, this third speed limit ratio is a relatively appropriate speed limit ratio. After speed limiting the first real-time service based on this third speed limit ratio, it can both avoid timeouts and complete transmission quickly.
[0106] In a possible embodiment, the first speed limit ratio is denoted as β 1 =α1, the second speed limit ratio is recorded as β 2 =α2, the first RTT of M real-time services is recorded as The second RTT of M real-time services is recorded as The timeout threshold of Brother M's real-time service is recorded as The fitting curve satisfies the following formula 1:
[0107]
[0108] in, For example, for
[0109] In a possible embodiment, the third speed limit ratio satisfies the following formula 2:
[0110]
[0111] It should be noted that in the above embodiment, the first real-time service in the first channel is speed-limited after the first file service in the first channel is speed-limited twice. Alternatively, the first real-time service in the first channel may be speed-limited after the first file service in the first channel is speed-limited once. Alternatively, the first real-time service in the first channel may be speed-limited after the first file service in the first channel is speed-limited three or more times.
[0112] 204. The electronic device limits the data rate of the first real-time service based on the third rate limit ratio.
[0113] Optionally, different first real-time services correspond to different third speed limit ratios. For example, the first channel includes the following first real-time services: real-time service A, real-time service B, and real-time service C. The third speed limit ratio determined by the above formula 1 and formula 2 for real-time service A is speed limit ratio A. Similarly, the third speed limit ratio determined by real-time service B is speed limit ratio B, and the third speed limit ratio determined by real-time service C is speed limit ratio C. Real-time service A is speed-limited based on speed limit ratio A, real-time service B is speed-limited based on speed limit ratio B, and real-time service C is speed-limited based on speed limit ratio C. After speed limit, real-time service A, real-time service B, and real-time service C will not time out.
[0114] In a possible embodiment, the electronic device limits the data rate of the first real-time service based on the third speed limit ratio, including: the electronic device uses the largest speed limit ratio among the third speed limit ratios as the fourth speed limit ratio; and uses the fourth speed limit ratio to limit the data of all first real-time services in the first channel.
[0115] Optionally, the size of the speed limit ratio is inversely proportional to the size of the data rate after the speed limit.
[0116] Since the fourth speed limit ratio is the largest speed limit ratio among all speed limit ratios, all first real-time services will not time out after being speed-limited by the fourth speed limit ratio. For example, the first channel includes the following first real-time services: real-time service A, real-time service B, and real-time service C. The third speed limit ratio determined by the above formulas 1 and 2 for real-time service A is speed limit ratio A. Similarly, the third speed limit ratio determined by real-time service B is speed limit ratio B, and the third speed limit ratio determined by real-time service C is speed limit ratio C. Speed limit ratio C is the largest speed limit ratio. Real-time service A is speed-limited based on speed limit ratio C, real-time service B is speed-limited based on speed limit ratio C, and real-time service C is speed-limited based on speed limit ratio C. After speed limiting, real-time service A, real-time service B, and real-time service C will not time out.
[0117] Optionally, if the speed limit ratio is proportional to the speed of the data rate after speed limit, the fourth speed limit ratio is the smallest speed limit ratio among the third speed limit ratios.
[0118] In a possible embodiment, the electronic device limits the data rate of the first real-time service based on the third speed limit ratio. Specifically, the electronic device sends the third speed limit ratio to the Agent, which is the sending end of the real-time service, and the Agent transmits the first real-time service according to the third speed limit ratio.
[0119] above Figure 2The speed limiting method is to first limit the speed of the file service in the first channel multiple times. If there is still a timed-out real-time service in the first channel, the real-time service is then limited. The application also provides a method for calculating the speed limit ratio of the file service based on the simulator. The simulator obtains the relationship between the RTT of the file service and the real-time service, and gives the current speed limit ratio of the file service to prevent the real-time service from timing out.
[0120] In a possible embodiment, if the first channel of the electronic device includes a first real-time service, the relationship between the data rate of the first file service and the RTT of the first real-time service is obtained through an emulator; based on the relationship between the data rate of the first file service and the RTT of the first real-time service, and the timeout threshold corresponding to the first real-time service, the first file service is speed-limited.
[0121] Optionally, when there is a first real-time service in the first channel, the above steps are started to limit the rate of the first file service. Alternatively, when new interference is detected, the above steps are started.
[0122] In a possible embodiment, based on the relationship between the data rate of the first file service and the RTT of the first real-time service, the data rate corresponding to the first file service corresponding to the timeout threshold is selected.
[0123] In a possible embodiment, if the first real-time service still exists in the first channel after the speed limit is performed based on the simulator, the above Figure 2 Alternatively, if the first real-time service still exists in the first channel after the speed limit is performed based on the simulator, the first real-time service can be Figure 2 The described rate limiting method limits the rate of real-time services in the first channel.
[0124] The following describes how to enable the simulator to learn the relationship between the data rate of the first file service and the RTT of the first real-time service:
[0125] In a possible embodiment, the electronic device allows the simulator to simulate the system status before and after the new interference, so as to allow the simulator to learn the relationship between the data rate of the file service and the RTT of the real-time service; wherein, the system status before the new interference is a state in which the first real-time service does not exist in the first channel, and the system status after the new interference is a state in which the first real-time service exists in the first channel.
[0126] Optionally, first adjust the simulator to simulate the system state before the interference increase. Specifically, adjust the overhead transmission ratio in the simulator so that the file service data rate in the simulator roughly matches the measured data rate. This means that the simulator simulates the file service data rate under actual conditions before the interference increase. Then, record the RTT of the real-time service at this time, i.e., the RTT of the real-time service before the interference increase.
[0127] Then, the amount of newly added interference data in the simulator is adjusted so that the file service data rate in the simulator roughly matches the measured data rate after the increased interference. In other words, the simulator simulates the file service data rate under actual conditions after the increased interference. The real-time service RTT at this time is also recorded. This allows the simulation to learn the relationship between the file service data rate and the real-time service RTT.
[0128] In addition to the above Figure 2 In addition to the speed limiting method described above and the simulator-based speed limiting method, this application also provides a simple speed limiting method. Specifically, the simple speed limiting method is as follows: if a first real-time service exists on the first channel, the data rate of the first file service is halved. For example, if the data rate of the first file service is 100 KB / s, then when the first real-time service exists on the first channel, the data rate of the first file service is adjusted to 50 KB / s.
[0129] In one possible embodiment, if a second real-time service exists on the first channel but no first real-time service exists, the data rate of the first file service remains unchanged. That is, the first file service is not rate-limited. The second real-time service is a real-time service on the first channel whose RTT exceeds an RTT busy threshold. The RTT busy threshold is greater than a timeout threshold. This means that no real-time service on the first channel has timed out, but the real-time service on the first channel is busy.
[0130] In a possible embodiment, if the RTTs of all real-time services in the first channel are less than the corresponding RTT busy thresholds, the data rate of the first file service is increased based on a preset step size.
[0131] The preset compensation may specifically be 5% of a Modulation and Coding Scheme (MCS) negotiated rate.
[0132] Optionally, if the RTT of all real-time services in the first channel is less than the corresponding RTT busy threshold, then after increasing the data rate of the first file service once, if the RTT of all real-time services in the first channel is still less than the corresponding RTT busy threshold, then the data rate by which the step size was increased once is increased again, until the RTT of any real-time service in the first channel is greater than the busy threshold.
[0133] The following is an introduction to the hardware of the electronic device involved in this application. Figure 3 FIG2 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be a mobile phone, notebook, large-screen device, etc., and is used to execute the methods executed by each device in the above method embodiments.
[0134] The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, an antenna 103A, an antenna 104A, etc. The wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above-mentioned multiple components may transmit data via a bus.
[0135] 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). The different processing units may be independent devices or integrated into one or more processors.
[0136] The memory 102 can be used to store computer executable program codes, which may include instructions. The processor 101 executes the instructions stored in the memory 102 to execute various functional applications and data processing of the electronic device 100, such as executing various methods provided in the embodiments of the present application.
[0137] The wireless communication function of the electronic device 100 can be implemented through the antenna 103A, the antenna 104A, the mobile communication module 104, the wireless communication module 103, the modem processor and the baseband processor.
[0138] Antenna 103A and antenna 104A can be used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 103A can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0139] The mobile communication module 104 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 104 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 104 can receive electromagnetic waves through the 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 and radiated out through the antenna 104A. In some embodiments, at least some of the functional modules of the mobile communication module 104 can be set in the processor 101. In some embodiments, at least some of the functional modules of the mobile communication module 104 can be set in the same device as at least some of the modules of the processor 101.
[0140] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 101 and be provided in the same device as the mobile communication module 104 or other functional modules.
[0141] The wireless communication module 103 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 103 receives electromagnetic waves via the antenna 103A, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 101. The wireless communication module 103 can also receive the signal to be sent from the processor 101, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 103A.
[0142] 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 technology.
[0143] It should 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0144] In the embodiment of the present application, the wireless communication module 103 can be used for WiFi connection between electronic devices, and transmission of data such as data or instructions.
[0145] The operations performed by the various components in the electronic device 100 may be specifically referred to the relevant description of the above method embodiment, which will not be elaborated here.
[0146] For example, Figure 4 The software and hardware architecture of the electronic device 100 provided in an embodiment of the present application is shown.
[0147] like Figure 4 As shown, the software architecture of the electronic device can adopt a layered architecture, which 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, namely, the application layer, the application framework layer (framework), the system library and the Android runtime (android runtime), the hardware abstraction layer (HAL), and the driver layer hardware layer. Among them: the application framework layer, the system library and the Android runtime, the hardware abstraction layer, not shown in Figure 4 Shown in.
[0148] The application layer (application) can include a series of applications. For example, the application package can include WLAN applications, Bluetooth applications, application connection, call sharing, notification sharing, keyboard and mouse sharing, file sharing, screen projection, video and gallery applications, as well as other applications not shown, such as music, camera, browser, WeChat, etc. TM ,Tik Tok TM and other applications.
[0149] Among them, the WLAN application is mainly used to realize the opening, connection and setting of WLAN, etc., and the Bluetooth application is used to realize the opening, connection and setting of Bluetooth, etc. The application continuation application is used to realize the content and usage status of the application between this electronic device and nearby devices. The call sharing application is used to realize that nearby devices answer and continue calls from this electronic device. For example, the smart screen can answer calls from this electronic device, and tablets and computers also support making calls. Notification sharing is used to realize that nearby devices receive notifications from this electronic device and support processing on these devices. Keyboard and mouse sharing is used to share input devices with this electronic device and nearby computers, or the mouse, keyboard and touchpad of the computer or tablet are shared with this electronic device. It can also realize cross-device file transfer and cross-device window display and use. The file sharing application is used to realize wireless sharing of files with other electronic devices in the same network, and realize extremely fast sharing or printing of files. The screen projection application is used to realize the linking of this electronic device with a large-screen device to realize the display of videos and other content displayed on this electronic device through the large-screen device, or to realize the linking of this electronic device with a small-screen device to realize the display of videos and other content displayed on the small-screen device through the large screen of this electronic device. Here, "large screen" and "small screen" refer to the relative sizes of the display screens of electronic devices.
[0150] The application layer also includes a video transmission service interface, a message transmission service interface, an audio transmission service interface, a file transfer service interface, a keyboard and mouse transmission service interface, and a file stream transmission service interface, as well as the services corresponding to these interfaces, including video transmission service, message transmission service, audio transmission service, file transfer service, keyboard and mouse transmission service, and file stream transmission service. Among them, the video transmission service, message transmission service, audio transmission service, file transfer service, keyboard and mouse transmission service, and file stream transmission service are used to implement video transmission, message transmission, audio transmission, file transfer, keyboard and mouse transmission, and file stream transmission, respectively. The upper-layer application realizes the transmission of business data of the business it creates by calling these interfaces. For example, after creating the screen projection service, the upper-layer application "screen projection" calls the video transmission service interface, and the video transmission service responds to the call to realize the transmission of business data of the screen projection service.
[0151] The application layer may also include a QoS control engine, which may be an application invisible to the user and may include some or all of the following functional modules: bandwidth management system, information update system, QoS scheduling system, QoS bandwidth allocation system, sending system, and QoS monitoring system.
[0152] When creating a service, an application sends a connection request or service creation request to the bandwidth management system, along with the requested bandwidth for the service.
[0153] The bandwidth management system is used to calculate the remaining bandwidth after receiving the bandwidth request from the upper-layer application and determine whether the remaining bandwidth can meet the needs of the service to be established. The bandwidth management system is also used to establish links.
[0154] The information update system is used to collect its own service and link information, and receive service and link information from other devices in the QoS system. Upon receiving notifications or instructions from other devices to reschedule QoS, or upon identifying updates, additions, or reductions in service or link information in the QoS system, it sends a scheduling request to the QoS scheduling system to trigger QoS rescheduling. Service information includes service bandwidth requirements, and link information includes the maximum effective link rate.
[0155] The QOS scheduling system is used to respond to scheduling requests, determine whether the current QOS system includes file transfer services or whether the electronic device itself includes file transfer services. When the file transfer service is included, the speed limit value of the file transfer service is recalculated, and the requested bandwidth of its own non-file transfer service and the speed limit value of the file transfer service are sent to the QOS bandwidth allocation system.
[0156] The QOS bandwidth allocation system is used to allocate bandwidth to non-file transfer services based on the bandwidth requested by the non-file transfer services received, and to allocate bandwidth to non-file transfer services based on the speed limit value of the file transfer services, and to send the allocated bandwidth to each service to the sending system.
[0157] The sending system is used to send the service data of the service in the respective allocated bandwidth.
[0158] The QOS monitoring system is used to monitor changes in the service information of the service and the link information of the link, so as to trigger the information update system to update the service information and link information of the QOS system when changes occur.
[0159] In some embodiments, the information update system is further configured to implement measurement of the highest effective rate of a link in the QOS system.
[0160] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The framework layer includes some predefined functions. For example, it may include an activity manager, a window manager, a view system, a resource manager, a notification manager, an audio service, a camera service, etc., which are not limited in this embodiment of the application.
[0161] The system library can include multiple functional modules, such as surface manager, media libraries, OpenGL ES, SGL, etc.
[0162] The Hardware Abstraction Layer (HAL) is an interface layer between the operating system kernel and the hardware circuitry. Its purpose is to abstract the hardware. It hides the details of the platform-specific hardware interfaces and provides the operating system with a virtual hardware platform, making it hardware-independent and portable across multiple platforms. From the perspective of software and hardware testing, both hardware and software testing can be performed independently within the HAL, enabling parallel testing of both software and hardware.
[0163] The driver layer includes drivers for various hardware. The driver layer can include Bluetooth drivers, Wi-Fi drivers, etc. Among them, the Bluetooth driver is used to drive the Bluetooth module. The Wi-Fi driver is used to drive the Wi-Fi module.
[0164] Based on the above Figure 4 The software architecture is combined with Figure 5 The speed limiting method provided by this application is further introduced. Figure 5 As shown, Figure 5 The following example illustrates a method for limiting the rate of data sent from Agent 1 (sender) to Agent 2 (receiver) in a QOS system. There is a first channel between Agent 1 and Agent 2, which includes real-time services and file services. The rate limiting method includes, but is not limited to:
[0165] 501. The information update system of Agent 1 sends service information and channel information to the system update system of the Controller.
[0166] The service information includes, but is not limited to, the remaining data volume of the file service being transmitted and the data rate of the real-time service being transmitted. The channel information includes the RTT of each real-time service in the channel and the relationship between the RTT of the real-time service and the timeout threshold.
[0167] 502. The Controller's system updates the system to obtain channel status and service information.
[0168] 503. The system update system of the Controller sends service information and channel status to the QOS scheduling system of the Controller.
[0169] 504. The QOS scheduling system of the Controller determines whether the channel includes a timed-out real-time service.
[0170] The QoS scheduling system of the controller can determine whether a real-time service in the channel has timed out based on the channel status and timeout threshold.
[0171] 505. If the timeout service is included, the QoS scheduling system of the controller sends a first speed limit ratio to the Wi-Fi driver of the controller.
[0172] The first speed limit ratio is used to limit the speed of the file service, and the relevant information of the file service is carried in the service information in the above step 501.
[0173] 506. The WIFI driver of the Controller sends the first speed limit ratio to the information update system of Agent 1.
[0174] 507 . The information update system of Agent 1 determines a transmission rate A1 of the file service D1 based on the first rate limit ratio.
[0175] The file service D1 may be all file services located on the first channel sent by Agent1. The method for determining the transmission rate A1 may refer to the introduction in the above step 201.
[0176] 508 . The WIFI driver of Agent 1 sends the data of the file service D1 to the WIFI driver of Agent 2 based on the transmission rate A1 .
[0177] 511. The information update system of Agent 1 sends service information and channel information to the system update system of the Controller.
[0178] Among them, the step 511 can refer to the introduction in the above step 501, and this application will not elaborate on it here.
[0179] 512. The Controller's system updates the system to obtain channel status and service information.
[0180] Among them, the step 512 can refer to the introduction in the above step 502, and this application will not elaborate on it here.
[0181] 513. The system update system of the Controller sends service information and channel status to the QOS scheduling system of the Controller.
[0182] Among them, the step 513 can refer to the introduction in the above step 503, and this application will not elaborate on it here.
[0183] 514. The QoS scheduling system of the Controller determines whether the channel includes a timed-out real-time service.
[0184] Among them, the step 514 can refer to the introduction in the above step 504, and this application will not elaborate on it here.
[0185] 515. If the timeout service is included, the QoS scheduling system of the controller sends a second speed limit ratio to the Wi-Fi driver of the controller.
[0186] Among them, the step 515 can refer to the introduction in the above step 505, and this application will not elaborate on it here.
[0187] 516. The Wi-Fi driver of the Controller sends the second speed limit ratio to the information update system of Agent 1.
[0188] Among them, the step 516 can refer to the introduction of the above step 506, and this application will not elaborate on it here.
[0189] 517. The information update system of Agent 1 determines the transmission rate A2 of the file service D1 based on the second speed limit ratio.
[0190] Among them, the step 517 can refer to the introduction in the above step 507, and this application will not elaborate on it here.
[0191] 518. The WIFI driver of Agent 1 sends the data of the file service D1 to the WIFI driver of Agent 2 based on the transmission rate A2.
[0192] Among them, the step 518 can refer to the introduction in the above step 508, and this application will not elaborate on it here.
[0193] 521. The information update system of Agent 1 sends service information and channel information to the system update system of the Controller.
[0194] Among them, the step 521 can refer to the introduction in the above step 501, and this application will not elaborate on it here.
[0195] 522. The Controller's system updates the system to obtain channel status and service information.
[0196] Among them, the step 522 can refer to the introduction in the above step 502, and this application will not elaborate on it here.
[0197] 523. The system update system of the Controller sends service information and channel status to the QOS scheduling system of the Controller.
[0198] Among them, the step 523 can refer to the introduction in the above step 503, and this application will not elaborate on it here.
[0199] 524. The QoS scheduling system of the Controller determines whether the channel includes a timed-out real-time service.
[0200] Among them, the step 524 can refer to the introduction in the above step 504, and this application will not elaborate on it here.
[0201] 525. If the timeout service is included, the QoS scheduling system of the controller sends a third speed limit ratio to the Wi-Fi driver of the controller.
[0202] Among them, the step 525 can refer to the introduction in the above step 505, and this application will not elaborate on it here.
[0203] 526. The Wi-Fi driver of the Controller sends the third speed limit ratio to the information update system of Agent 1.
[0204] Among them, the step 526 can refer to the introduction of the above step 506, and this application will not elaborate on it here.
[0205] 527. The information update system of Agent 1 determines a transmission rate A3 of the real-time service P1 based on the second rate limit ratio.
[0206] The real-time service P1 is a real-time service that has timed out in the channel. The real-time service P1 and the above-mentioned file service D1 are transmitted in the same channel.
[0207] 528. The WIFI driver of Agent 1 sends the data of the real-time service P1 to the WIFI driver of Agent 2 based on the transmission rate A3.
[0208] The sending of the real-time service P1 data to the WIFI driver of Agent2 based on the transmission rate A3 can be referred to the introduction in the above step 204, which will not be elaborated herein.
[0209] See Figure 6 , Figure 6 This is a structural diagram of a speed limiting device 600 provided in an embodiment of the present application. Figure 6 The speed limiting device shown may be an electronic device, a device within an electronic device, or a device that can be used in conjunction with an electronic device. Figure 6 The speed limiting device shown may include a speed limiting unit 601 and a processing unit 602.
[0210] A rate limiting unit 601 is configured to, at a first moment, limit the data rate of a first file service in the first channel based on a first rate limiting ratio if the first channel includes a first real-time service, where the first real-time service is a real-time service in the first channel whose round-trip time (RTT) is greater than a timeout threshold;
[0211] The rate limiting unit 601 is further configured to, at a second moment, if the first channel still includes the first real-time service, limit the data rate of the first file service based on a second rate limiting ratio, wherein the second rate limiting ratio is greater than the first rate limiting ratio, and the magnitude of the rate limiting ratio is inversely proportional to the magnitude of the data rate after the rate limiting;
[0212] The processing unit 602 is configured to determine, at a third moment, a third rate limit ratio corresponding to the first real-time service if the first channel further includes the first real-time service;
[0213] The rate limiting unit 601 is further configured to limit the data rate of the first real-time service based on the third rate limiting ratio.
[0214] In one possible implementation, the processing unit 602 is also used to obtain a first RTT and a second RTT, where the first RTT is the RTT corresponding to the real-time service in the first channel after speed limiting at the first moment, and the second RTT is the RTT corresponding to the real-time service in the first channel after speed limiting at the second moment; based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT and the timeout threshold corresponding to the first real-time service, the third speed limit ratio corresponding to the first real-time service is determined.
[0215] In one possible implementation, the processing unit 602 is further used to determine a fitting curve corresponding to the first real-time service based on the first speed limit ratio, the second speed limit ratio, the first RTT, and the second RTT, where the fitting curve is used to represent the relationship between the speed limit ratio and the RTT; and to determine a third speed limit ratio corresponding to the first real-time service based on the fitting curve and the timeout threshold corresponding to the first real-time service.
[0216] In one possible implementation, the processing unit 602 is further configured to use the largest speed limit ratio among the third speed limit ratios as the fourth speed limit ratio; the speed limit unit 601 is further configured to use the fourth speed limit ratio to limit the speed of all first real-time service data in the first channel.
[0217] In a possible implementation, the first file service is a file service in which the amount of remaining data to be transmitted in the first channel is greater than a file rate limit threshold.
[0218] In one possible implementation, the processing unit 602 is further used to obtain, through an emulator, the relationship between the data rate of the first file service and the RTT of the first real-time service if the first channel includes the first real-time service; the rate limiting unit 601 is further used to limit the rate of the first file service based on the relationship between the data rate of the first file service and the RTT of the first real-time service, and the timeout threshold corresponding to the first real-time service.
[0219] In one possible implementation, the processing unit 602 is also used to allow the simulator to learn the relationship between the data rate of the file service and the RTT of the real-time service by allowing the simulator to simulate the system status before and after the new interference; wherein, the system status before the new interference is a state in which the first real-time service does not exist in the first channel, and the system status after the new interference is a state in which the first real-time service exists in the first channel.
[0220] In a possible implementation, the processing unit 602 is further configured to increase the data rate of the first file service based on a preset step size if the RTTs of all real-time services in the first channel are less than the corresponding RTT busy threshold.
[0221] For the case where the speed limiting device may be a chip or chip system, see Figure 7 Schematic diagram of the chip structure shown. Figure 7 The chip 700 shown includes a processor 701 and an interface 702. Optionally, it may also include a memory 703. The number of processors 701 may be one or more, and the number of interfaces 702 may be multiple.
[0222] For the case where the chip is used to implement the electronic device in the embodiment of the present application:
[0223] The interface 702 is used to receive or output signals;
[0224] The processor 701 is used to perform data processing operations of the electronic device.
[0225] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0226] It is understood that some optional features in the embodiments of the present application may, in certain scenarios, be implemented independently of other features, such as the solution on which they are currently based, to solve corresponding technical problems and achieve corresponding effects. They may also be combined with other features in certain scenarios as needed. Accordingly, the audio data archiving device provided in the embodiments of the present application may also implement these features or functions accordingly, which will not be described in detail here.
[0227] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
[0228] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0229] The present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed on an electronic device, the functions of any of the above method embodiments are implemented.
[0230] The present application also provides a computer program product, which, when executed on a computer, enables the computer to implement the functions of any of the above method embodiments.
[0231] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0232] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A speed limiting method, characterized in that: The method comprises: At a first moment, if a first channel includes a first real-time service, limiting the data rate of a first file service in the first channel based on a first rate limit ratio, wherein the first real-time service is a real-time service in the first channel whose round-trip time (RTT) is greater than a timeout threshold; At the second moment, if the first channel still includes the first real-time service, the data rate of the first file service is limited based on a second rate limit ratio, where the second rate limit ratio is greater than the first rate limit ratio, and the size of the rate limit ratio is inversely proportional to the size of the data rate after the rate limit; At a third moment, if the first channel still includes the first real-time service, determining a third rate limit ratio corresponding to the first real-time service; The data rate of the first real-time service is limited based on the third rate limit ratio.
2. The method according to claim 1, characterized in that The determining a third rate limit ratio corresponding to the first real-time service includes: Obtain a first RTT and a second RTT, where the first RTT is the RTT corresponding to the real-time service in the first channel after the speed limit at the first moment, and the second RTT is the RTT corresponding to the real-time service in the first channel after the speed limit at the second moment; A third speed limit ratio corresponding to the first real-time service is determined based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT, and a timeout threshold corresponding to the first real-time service.
3. The method according to claim 2, characterized in that The determining, based on the first speed limit ratio, the second speed limit ratio, the first RTT, the second RTT, and a timeout threshold corresponding to the first real-time service, a third speed limit ratio corresponding to the first real-time service includes: Determining a fitting curve corresponding to the first real-time service based on the first speed limit ratio, the second speed limit ratio, the first RTT, and the second RTT, where the fitting curve is used to represent a relationship between the speed limit ratio and the RTT; A third rate limit ratio corresponding to the first real-time service is determined based on the fitting curve and a timeout threshold corresponding to the first real-time service.
4. The method according to any one of claims 1 to 3, characterized in that The limiting the data rate of the first real-time service based on the third rate limit ratio includes: The largest speed limit ratio among the third speed limit ratios is used as the fourth speed limit ratio; The fourth rate limit ratio is used to limit the rate of data of all the first real-time services in the first channel.
5. The method according to any one of claims 1 to 4, characterized in that The first file service is a file service in which the amount of remaining data to be transmitted in the first channel is greater than a file rate limit threshold.
6. The method according to claim 1, characterized in that The method further comprises: If the first channel includes a first real-time service, obtaining, through an emulator, a relationship between a data rate of the first file service and an RTT of the first real-time service; Based on the relationship between the data rate of the first file service and the RTT of the first real-time service, and a timeout threshold corresponding to the first real-time service, the first file service is rate-limited.
7. The method according to claim 6, characterized in that The method further comprises: By allowing the simulator to simulate the system state before and after the added interference, the simulator learns the relationship between the data rate of the file service and the RTT of the real-time service; The system state before the added interference is a state in which no first real-time service exists in the first channel, and the system state after the added interference is a state in which the first real-time service exists in the first channel.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: If the RTTs of all real-time services in the first channel are less than the corresponding RTT busy thresholds, the data rate of the first file service is increased based on a preset step size.
9. An electronic device comprising one or more memories and one or more processors, characterized in that: The memory is used to store a computer program; the processor is used to call the computer program, so that the electronic device executes the method according to any one of claims 1 to 8.
10. A chip system, applied to electronic equipment, characterized in that: The chip system includes at least one processor and an interface, wherein the interface is used to receive instructions and transmit them to the at least one processor; the at least one processor executes the instructions so that the electronic device executes the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.