WO2017041652A1 - Procédé, appareil et système de commande de quota d'utilisation de ressources de réseau - Google Patents

Procédé, appareil et système de commande de quota d'utilisation de ressources de réseau Download PDF

Info

Publication number
WO2017041652A1
WO2017041652A1 PCT/CN2016/097496 CN2016097496W WO2017041652A1 WO 2017041652 A1 WO2017041652 A1 WO 2017041652A1 CN 2016097496 W CN2016097496 W CN 2016097496W WO 2017041652 A1 WO2017041652 A1 WO 2017041652A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
network resource
server
quota
usage quota
Prior art date
Application number
PCT/CN2016/097496
Other languages
English (en)
Chinese (zh)
Inventor
周洲
孙廷韬
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017041652A1 publication Critical patent/WO2017041652A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/826Involving periods of time

Definitions

  • the present application belongs to the field of Internet technologies, and in particular, to a method, device, and system for controlling a usage limit of a network resource.
  • a local or global control method is generally used for the quota of network system resources.
  • the quota command can be used to check the current resource usage of each user equipment.
  • the present application provides a method, a device, and a system for controlling a usage limit of a network resource, which can solve the problem that the control method of the existing network resource quota has inaccurate control.
  • the first aspect of the present application provides a method for controlling a usage limit of a network resource, including:
  • the client counts the amount of use of network resources in the current interval t;
  • a dynamic usage quota if it is determined that the client uses the network resource usage quota within the current interval time t If the first dynamic usage quota is greater than the first dynamic usage quota, the time length of the network resource is disabled to the client;
  • the client collects the usage quota of the network resource in the current interval t
  • the client further includes:
  • the client uses a dynamic usage quota of the network resource to enable the server to send the first dynamic usage to the client when determining that the second dynamic usage quota is inconsistent with the first dynamic usage quota Limit
  • the client updates the second dynamic usage quota of the network resource by the client to the first dynamic usage quota according to the first dynamic usage quota sent by the server.
  • the client collects the usage quota of the network resource in the current interval t
  • the client further includes:
  • the client sets the usage quota for using network resources to zero.
  • the method further includes:
  • the method further includes:
  • the client uses the network resource in the next interval t, if it is determined that the current time is after the forbidden end time of the network resource, the network resource is used, and the usage quota of the network resource is used. If it is determined that the current time is before the prohibition end time of the network resource, the use of the network resource is prohibited.
  • the embodiment of the invention further provides a method for controlling a usage limit of a network resource, including:
  • the client If it is determined that the usage quota of the network resource used by the client in the current interval t is greater than the first dynamic usage quota, sending a disable duration of the network resource to the client, so that the client is configured according to the Determining the length of time of the network resource sent by the server, starting from the moment of receiving the disabled duration, prohibiting the use of the network resource within the disabled duration.
  • the server determines a first dynamic usage quota of the network resource used by the client at a current time, include:
  • the server determines, according to the default quota of the network resource that is used by the client, and the number of clients that currently use the network resource, to determine a first dynamic usage quota of the network resource used by the client at a current time.
  • the server determines, according to the default quota of the network resource that is used by the client, and the number of clients that currently use the network resource, to determine a first dynamic of the network resource used by the client at a current time.
  • Use limits including:
  • the DefaultQuota indicates that the client presets a default quota for using the network resource
  • the aliveAgentCount indicates the number of clients currently using the network resource
  • ImpactFactor is a preset constant.
  • the method further includes:
  • the server determines that the second dynamic usage quota is inconsistent with the first dynamic usage quota
  • the server sends the first dynamic usage quota to the client, so that the client sends the server according to the server.
  • the first dynamic usage quota is used to update the second dynamic usage quota of the network resource by the client to the first dynamic usage quota.
  • the embodiment of the invention further provides a device for controlling the usage limit of the network resource, which is located at the client, and includes:
  • the statistics module is configured to collect the usage quota of the network resource in the current interval t;
  • a sending module configured to send, to the server, information about the usage quota of the network resource used by the client during the current interval time t at the end of the current interval time t; so that the server determines that the client uses the network resource at the current time a first dynamic usage quota, if it is determined that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota, sending a disable duration of the network resource to the client;
  • a receiving module configured to receive a disabled duration of the network resource sent by the server
  • the sending module is further configured to send, to the server, a second dynamic usage quota of the network usage resource of the client, when the current interval time t ends, where the second dynamic usage quota is The client uses a dynamic usage quota of network resources calculated at the end of the last interval t; such that the server, when determining that the second dynamic usage quota is inconsistent with the first dynamic usage quota, to the client Sending the first dynamic usage quota;
  • the receiving module is further configured to receive the first dynamic usage quota sent by the server;
  • the device also includes:
  • an update module configured to update, according to the first dynamic usage quota received by the receiving module, the second dynamic usage quota of the network resource by the client to the first dynamic usage quota.
  • the device further includes:
  • a setting module is used to set the usage quota of the network resource to be zero at the end of the current interval time t.
  • the disabling module is configured to set, according to the disabled duration of the network resource sent by the server, a time for receiving the disabled duration as a forbidden start time for prohibiting use of the network resource, where The time when the prohibition start time starts at the end of the disable duration is set to prohibit the use of the network resource's prohibition end time.
  • the device further includes:
  • a determining module configured to use the network resource when the network resource is used in the next interval t, and if the current time is determined to be after the forbidden end time of the network resource, use the network resource, and use the network resource usage quota If the current time is determined to be before the prohibition end time of the network resource, the use of the network resource is prohibited.
  • the embodiment of the invention further provides a device for controlling the usage limit of the network resource, which is located at the server, and includes:
  • a receiving module configured to receive, by the client, information about a usage quota of the network resource used by the client during a current interval t;
  • a determining module configured to determine a first dynamic usage limit of the network resource used by the client at a current time
  • a determining module configured to determine whether the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota
  • a sending module configured to determine, by the determining module, that the client uses network resources within a current interval t The usage duration of the network resource is sent to the client when the usage quota is greater than the first dynamic usage quota; so that the client is in accordance with the disabled duration of the network resource sent by the server, from the receiving station The time of the disabled duration begins, and the use of the network resource is prohibited during the disabled duration.
  • the determining module is specifically configured to:
  • the information about the usage quota of the network resource that is sent by the client and the other client that is received by the current time where the information carries the identifier information of the client and the other client, and determines that the current usage is The number of clients of network resources;
  • the determining module is specifically configured to:
  • the DefaultQuota indicates that the client presets a default quota for using the network resource
  • the aliveAgentCount indicates the number of clients currently using the network resource
  • ImpactFactor is a preset constant.
  • the receiving module is further configured to receive, by the client, a second dynamic usage quota of the network usage resource used by the client to the server at the end of the current interval t, the second dynamic use The quota is a dynamic usage limit of the client using network resources calculated by the server at the end of the last interval t;
  • the determining module is further configured to determine whether the second dynamic usage quota is consistent with the first dynamic usage quota
  • the sending module is further configured to: when the determining module determines that the second dynamic usage quota is inconsistent with the first dynamic usage quota, send the first dynamic usage quota to the client;
  • the client updates the second dynamic usage quota of the network resource by the client to the first dynamic usage quota according to the first dynamic usage quota sent by the server.
  • An embodiment of the present invention further provides a control system for a network resource usage quota, including: a client and a server;
  • the client includes the above-mentioned control device for the usage quota of the network resource
  • the server includes the above-described control device for the usage quota of the network resource.
  • the time window size of the server for controlling the network resource quota in the embodiment of the present invention is far greater than the interval of the use of the network resource by the client.
  • the time that the client reports the default data falls on the server.
  • the time window of the control of the network resource quota, and the embodiment of the present invention adopts that the use of the network resource is prohibited within the disabled time period from the moment when the client receives the disabled duration, instead of issuing a resource disable command according to the server. Time is used as a reference to prohibit the use of the network resources, so that even when the client and server time are not synchronized, the network resource quota can be effectively controlled; thus, the client and server time can be prevented from being out of synchronization. The resulting limit control of network resources is inaccurate.
  • the server when receiving the information about the network resource usage quota reported by the client, determines the first dynamic usage quota of the network resource used by the client at the current time, and then uses the network resource by the client.
  • the usage quota is compared with the currently determined first dynamic usage quota, and is sent to the client when it is determined that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota.
  • the length of time the network resource is disabled. Since the first dynamic usage limit is the number of clients and other clients that the server uses according to all current network resources (which may also be referred to as the number of active clients currently using network resources), and the client presets to use the network.
  • the default quota of the resource, the calculated first dynamic usage quota of the network resource used by the client, the first dynamic usage quota can effectively and reasonably allocate the network resources used by each client, and does not cause network resource allocation to be inaccurately caused by network resources. Waste problem.
  • FIG. 1 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application
  • FIG. 5 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of a device for controlling a usage limit of a network resource according to an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of a device for controlling a usage limit of a network resource according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a control system for using a network resource quota according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • first device if a first device is coupled to a second device, the first device can be directly electrically coupled to the second device, or electrically coupled indirectly through other devices or coupling means. Connected to the second device.
  • the description of the specification is intended to be illustrative of the preferred embodiments of the invention. The scope of protection of the application is subject to the definition of the appended claims.
  • the inventors found that most systems (such as distributed systems or multi-user systems) generally adopt local or global control methods for network resource quotas, wherein the local control method is to use network resources.
  • the quota is divided into users according to certain rules, and each user has its own resource limit.
  • the local control method will bring inconvenience to the user, because the user consumes different resources, and some users will allocate the resources allocated to them. Some users are likely to have a large amount of resources left without consumption, which leads to inaccurate resource allocation. The cost of resources.
  • the global control method generally uses the upper limit of the resource usage per minute configured by the server.
  • the global control method relies heavily on the time synchronization between the server and the client. That is, the resource usage reported by the client to the server is strictly required to fall on the server. Within the time window of resource statistics, otherwise the reported data will be cut or discarded.
  • the server-issued resource disable command is based on the server's time. If the client and server time are not synchronized, the network resource quota control may be inaccurate.
  • the embodiment of the present invention provides a method for controlling the usage quota of the network resource.
  • the method provided by the embodiment of the present invention can be applied to a distributed system or a multi-user system, wherein each client packages the usage of various resources to the server at intervals t, and the server summarizes the reports of the clients.
  • Resource usage calculate the dynamic limit of each resource used by each client, and verify whether the resource usage reported by the client exceeds the calculated dynamic usage limit of the resource, and if it exceeds, return
  • the response will include a disable command for the overrun resource.
  • the disable command contains the length of time the client is disabled for the resource. After the client receives the disable command, the current time is added to the resource that exceeds the limit. Disable the duration as the time to disable.
  • the embodiment of the present invention adopts that the use of the network resource is prohibited within the disabled time period from the moment when the client receives the disable duration, instead of using the time when the server issues the resource disable command as a reference for prohibiting the use of the network resource. Therefore, even when the client and the server time are not synchronized, the quota of the network resources can be effectively controlled accurately; therefore, the inaccuracy of the limit control of the network resources caused by the unsynchronized client and server time can be prevented.
  • the dynamic usage limit is the number of clients that the server uses according to all current network resources (also referred to as the number of active clients currently using network resources), and each client presets. Using a default quota of a certain network resource, each client calculated uses a dynamic usage quota of the network resource, and the dynamic usage quota can effectively and uniformly allocate network resources used by each client, and does not cause inaccurate network resource allocation. Causes waste of network resources.
  • the time window size of the server for controlling the network resource quota is w
  • the interval for the client to use the network resource usage is t, where w is much larger than t, so that the client
  • the data reported by the terminal defaults to the time window in which the server currently controls the network resource quota.
  • FIG. 1 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application. The method is performed on a client, as shown in FIG.
  • the client collects the usage quota of the network resource in the current interval t.
  • the client needs to use the usage information (such as the usage quota) of the network resource in every interval time t.
  • the client sets the usage quota of the network resource to zero.
  • the client has a statistical time window, and the network resources consumed by the client request arriving in the window time interval are accumulated into the time window, assuming that the time window is W, W time
  • the client reports the network resource usage to the server multiple times, and the reporting interval t is much smaller than W.
  • the client sends, to the server, the information about the usage quota of the network resource used by the client during the current interval time t at the end of the current interval time t, so that the server determines the current time that the client uses the network resource.
  • a dynamic usage quota if it is determined that the usage quota of the network resource used by the client in the current interval t is greater than the first dynamic usage quota, sending the network resource to the client for a disabled duration;
  • a packet timer is set in the client, and at the end of each interval time t, the packet timer signal is triggered, so that the client uses the network resource usage quota in the interval time t counted in step 101.
  • the information is packaged, wherein the packaged information carries the identifier of the network resource, the identifier of the client, and the usage quota of the network resource used by the client.
  • the server receives the information about the usage quota of the network resource sent by the client.
  • the client uses the network resource
  • other clients may also use the network resource, so
  • the server determines, according to the default quota of the network resource that is used by the client, and the number of clients that currently use the network resource, to determine the first dynamic of the client to use the network resource at the current time.
  • the quota is used; wherein the default quota of the network resource preset by the client can be saved in the database, for example, the client and the server can share the database, and the server and the client can obtain the client preset from the database. Use the default quota for the network resource.
  • the server sends a disable duration of the network resource to the client after determining that the usage quota of the network resource used by the client in the current interval t is greater than the first dynamic usage quota.
  • the server has a statistical window of the first dynamic usage quota, which is generally one minute. If the network resource usage exceeds the first dynamic usage quota at a certain moment in the statistical window interval, the request for the network resource after the arrival request is disabled.
  • the disabled duration is the time at the end of the statistics window minus the current time.
  • the client receives the disabled duration of the network resource sent by the server, and according to the disabled duration, prohibits the use of the network resource within the disabled duration from the moment of receiving the disabled duration.
  • the client sets the time for receiving the disabled duration to the forbidden start time of using the network resource according to the duration of the network resource sent by the server, and The time when the prohibition start time starts at the end of the disable duration is set to prohibit the use of the network resource's prohibition end time.
  • the client uses the network resource in the next interval t, if it is determined that the current time is after the forbidden end time of the network resource, the network resource is used, and the usage is counted.
  • the usage quota of the network resource if it is determined that the current time is before the prohibition end time of the network resource, the use of the network resource is prohibited.
  • the time window size of the server for controlling the network resource quota in the embodiment of the present invention is far greater than the interval of the use of the network resource by the client.
  • the time that the client reports the default data falls on the server.
  • the time window of the control of the network resource quota, and the embodiment of the present invention adopts that the use of the network resource is prohibited within the disabled time period from the moment when the client receives the disabled duration, instead of issuing a resource disable command according to the server. Time is used as a reference to prohibit the use of the network resources, so that even when the client and server time are not synchronized, the network resource quota can be effectively controlled; thus, the client and server time can be prevented from being out of synchronization. The resulting limit control of network resources is inaccurate.
  • the server when receiving the information about the network resource usage quota reported by the client, determines the first dynamic usage quota of the network resource used by the client at the current time, and then uses the network resource by the client.
  • the usage quota is compared with the currently determined first dynamic usage quota, and is sent to the client when it is determined that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota. The length of time the network resource is disabled.
  • the first dynamic usage limit is the server based on all current usage
  • the number of clients and other clients of the network resource (which may also be referred to as the number of active clients currently using the network resource), and the default quota used by the client to use the network resource, and the calculated client usage
  • the first dynamic usage quota of the network resource, the first dynamic usage quota can effectively and reasonably allocate the network resources used by each client, and does not cause the network resource to be wasted due to inaccurate network resource allocation.
  • FIG. 2 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application. The method is performed on a client, as shown in FIG. 2, and includes:
  • the client collects the usage quota of the network resource in the current interval t.
  • step 101 in the embodiment shown in FIG. 1 are specifically implemented.
  • the client sends a second dynamic usage quota of the network usage resource of the client to the server at the end of the current interval time t, where the second dynamic usage quota is calculated by the server at the end of the last interval time t.
  • the client uses a dynamic usage quota of the network resource, so that the server sends the first dynamic usage quota to the client when determining that the second dynamic usage quota is inconsistent with the first dynamic usage quota.
  • the client sends information about the usage quota of the network resource used by the client during the last interval t at the end of the last interval t (such as time T1), and the server is in the server.
  • the client receives the information about the usage quota of the network resource in the last interval t, and counts the number of the client and other clients using the network resource at time T1 (ie, the T1 time is used.
  • the number of active clients of the network resource in combination with the default quota of the network resource preset by the client, calculates a dynamic usage limit of the network resource used by the client at time T1 (ie, a second dynamic) Using the quota, the client uses the dynamic usage limit of the network resource at the end of the last interval t);
  • the client sends information about the usage quota of the network resource in the current interval time t to the server at the end of the current interval time t (ie, the current time is T2), and the server is at the current time T2.
  • Calculating the dynamic usage limit of the network resource by the client at the current time T2 (in time, using the number of active clients of the network resource), in combination with the default quota of the network resource preset by the client ( The first dynamic usage limit;
  • the server determines that the second dynamic usage quota is inconsistent with the first dynamic usage quota
  • the first dynamic usage quota is sent to the client, that is, the current time of the client is T2 (the current interval)
  • the dynamic usage limit received from the server using the network resource
  • the client uses the network according to the first dynamic usage quota sent by the server.
  • the second dynamic usage quota of the resource is updated to the first dynamic usage quota.
  • the first dynamic usage quota is a dynamic usage quota of the network resource received by the client from the server at the current time of the client; in contrast, the second dynamic usage quota is the last time the client is from the server.
  • the client uses a dynamic usage quota of the network resource; when the client compares the first dynamic usage quota and the second dynamic usage quota, if it is determined that the two are inconsistent, the second dynamic usage quota is updated to the The first dynamic usage limit.
  • the dynamic usage limit of the network resource used by the client is dynamically changed because the number of clients using the network resource changes every time, and the server recalculates the client at intervals.
  • the use of the network resource's dynamic usage limit is also to effectively and reasonably allocate the network resources used by each client, and does not cause the network resource to be wasted due to inaccurate network resource allocation.
  • the server when the server receives the information about the usage quota of the network resource sent by the client, the server recalculates the dynamic usage limit of the network resource used by the client at the time (ie, the current time) when the usage information is received, where
  • the role of the dynamic usage limit is that when the system crashes, the client will receive the latest dynamic usage limit sent by the server as the temporary resource usage limit of the network resources used by the client, which can prevent users from abusing network resources when the system crashes. Guarantee the user's network resource usage experience.
  • FIG. 3 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application. The method is performed by a server, as shown in FIG. 3, and includes:
  • the server receives, by the client, information about the usage quota of the network resource used by the client in the current interval time t;
  • the client needs to count usage information (such as usage quota) of using network resources at every interval t.
  • usage information such as usage quota
  • a packet timer is set in the client, and at the end of each interval t, the packet timer signal is triggered, so that the client packs the statistical information of the usage quota of the network resource in the interval t.
  • the packaged information carries the identifier of the network resource, the identifier of the client, and the usage quota of the network resource used by the client.
  • the information about the usage quota of the network resource sent by the client and other clients received by the server according to the current time the information carrying the identification information of the client and the other client Determine the number of clients currently using the network resource.
  • the server determines a first dynamic usage quota of the network resource used by the client at a current time
  • the server receives the information about the usage quota of the network resource sent by the client. Afterwards, the server may, for example, receive information about the usage quota of the network resource sent by the client and other clients that are received by the current time, where the information carries the identification information of the client and the other client. Determining the number of clients currently using the network resource;
  • the server determines, according to the default quota of the network resource that is used by the client, and the number of clients that currently use the network resource, to determine a first dynamic usage quota of the network resource used by the client at the current time. For example, it can be based on a calculation formula:
  • DefaultQuota indicates that the client presets a default quota for using the network resource
  • aliveAgentCount indicates the number of clients currently using the network resource
  • ImpactFactor is a preset constant. This constant is an empirical value, generally greater than 1, and the effect is to amplify the calculation result. For example, in the case of server downtime, DefaultQuota will be evenly distributed to the active client (aliveAgent), but which client may be uneven, in order to ensure the quality of service, each aliveAgent is allocated. Resources will be enlarged a bit.
  • the client sets the time for receiving the disabled duration to the forbidden start time for prohibiting the use of the network resource according to the disabled duration of the network resource sent by the server, and the forbidden start time is The time at which the end of the disable duration begins is set to prohibit the use of the network resource's forbidden end time.
  • the client uses the network resource in the next interval t, if it is determined that the current time is after the forbidden end time of the network resource, the network resource is used, and the usage is counted.
  • the usage quota of the network resource if it is determined that the current time is before the prohibition end time of the network resource, the use of the network resource is prohibited.
  • the embodiment of the present invention is to prohibit the use of the network resource within the disabled time period from the moment when the client receives the disabled duration, instead of using the network resource according to the time when the server issues the resource disable command. Therefore, even when the client and server time are not synchronized, the network resource quota can be effectively controlled; therefore, the network resources caused by the client and server time synchronization can be prevented.
  • the limit control is not accurate.
  • the server when receiving the information about the network resource usage quota reported by the client, determines the first dynamic usage quota of the network resource used by the client at the current time, and then uses the network resource by the client.
  • the usage quota is compared with the currently determined first dynamic usage quota, and is sent to the client when it is determined that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota.
  • the length of time the network resource is disabled. Since the first dynamic usage limit is the number of clients and other clients that the server uses according to all current network resources (which may also be referred to as the number of active clients currently using network resources), and the client presets to use the network.
  • the default quota of the resource, the calculated first dynamic usage quota of the network resource used by the client, the first dynamic usage quota can effectively and reasonably allocate the network resources used by each client, and does not cause network resource allocation to be inaccurately caused by network resources. Waste problem.
  • FIG. 4 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present application. The method is performed by a server, as shown in FIG. 4, and includes:
  • the server receives a second dynamic usage quota of the client that uses the network resource that is sent by the client at the end of the current interval time t, where the second dynamic usage quota is calculated by the server at the end of the last interval time t.
  • the client uses a dynamic usage limit of network resources;
  • the calculation method of the second dynamic usage quota may refer to the calculation method of the first dynamic usage quota in step 402.
  • the server determines a first dynamic usage quota of the network resource used by the client at a current time
  • the client sends information about the usage quota of the network resource used by the client during the last interval t at the end of the last interval t (such as time T1), and the server is in the server.
  • the client receives the information about the usage quota of the network resource in the last interval t, and counts the number of the client and other clients using the network resource at time T1 (ie, the T1 time is used.
  • the number of active clients of the network resource in combination with the default quota of the network resource preset by the client, calculates a dynamic usage limit of the network resource used by the client at time T1 (ie, a second dynamic) Using the quota, the client uses the dynamic usage limit of the network resource at the end of the last interval t);
  • the client sends information about the usage quota of the network resource in the current interval time t to the server at the end of the current interval time t (ie, the current time is T2), and the server is at the current time T2.
  • the default quota of the resource, and the dynamic usage limit of the network resource used by the client at the current time T2 is calculated (ie, the first dynamic usage quota;
  • the server may be based on, for example, a calculation formula:
  • the DefaultQuota indicates that the client presets a default quota for using the network resource
  • the aliveAgentCount indicates the number of clients currently using the network resource
  • ImpactFactor is a preset constant.
  • the server sends the first dynamic usage quota to the client when determining that the second dynamic usage quota is inconsistent with the first dynamic usage quota, so that the client sends the server according to the server.
  • the first dynamic usage quota is used to update the second dynamic usage quota of the network resource by the client to the first dynamic usage quota.
  • the server when the server receives the information about the usage quota of the network resource sent by the client, the server recalculates the dynamic usage limit of the network resource used by the client at the time (ie, the current time) when the usage information is received, where
  • the role of the dynamic usage limit is that when the system crashes, the client will receive the latest dynamic usage limit sent by the server as the temporary resource usage limit of the network resources used by the client, which can prevent users from abusing network resources when the system crashes. Guarantee the user's network resource usage experience.
  • the present invention is divided into two parts: a client and a server. It is assumed that there are four resources a, b, c, and d. In a distributed system, multiple clients simultaneously perform four resources of a, b, c, and d. Consumption, the client packs the usage of the four resources a, b, c, and d to the server at intervals t, and the server summarizes the resource usage reported by the client, and verifies whether the client uses a certain resource.
  • FIG. 5 is a schematic flowchart of a method for controlling a usage limit of a network resource according to an embodiment of the present disclosure. The method is performed on a client and a server, as shown in FIG. 5, and includes:
  • the client refers to one of a plurality of clients in the distributed system.
  • the network resource usage information includes information such as identification information of the client, identification information of the network resource, and usage quota of the network resource.
  • the data structure of the data packet reported by the client to the server regarding network resource usage information is as follows:
  • Int32_t resourceID indicates the network resource number
  • Uint64_t resourceUsage indicates the usage of the resource within the reporting interval t;
  • Uint64_t dynamicQuota indicates dynamic usage limit
  • ResourceUsage is used to indicate the usage information of a single network resource. It does not include the start and end time of the reporting interval. The data reported to the server by default falls in the current statistics window of the server.
  • ResourceUsage reports the dynamicQuota of the server calculation received by the server's dynamicQuota client last time.
  • RequestPackage is used to represent the summary of multiple network resource usage information
  • agentIP and agentProcessID in the RequestPackage are used to identify the information of the reported client.
  • the network resources will be divided according to certain rules, and the resources falling in the same interval will be marked in the same data packet, all clients and servers.
  • the same division rule is shared, for example, the resource identifier is divided according to the resource identifier (resourceID), for example, the resourceID is [0, 99] and is marked as one data packet, and the resourceID is [100, 199] into another data packet. If the resources in the same data packet in the client are not used during the packaging time interval, the client will package the first network resource usage information that falls in the data packet, and the resource usage quota is 0. .
  • the server calculates, according to the network resource usage information reported by the client, that the client can currently use the network.
  • the dynamic usage limit of the resource is the dynamic usage limit of the resource.
  • the server counts the active use of a certain network resource (for example, any one of the resources a, b, c, and d) within a certain period according to the identifier information (agentProcessID) of the client in the data packet reported by the client.
  • agentProcessID the identifier information of the client in the data packet reported by the client.
  • DefaultQuota indicates the default usage limit of the network resources preset by the client.
  • aliveAgentCount indicates the number of active clients in a period of time.
  • ImpactFactor is a preset constant, which is usually used to amplify the calculation result.
  • the server returns a response message for using the network resource to the client.
  • the server when it is found that the dynamicQuota reported by the client is inconsistent with the dynamicQuot calculated by the server, the dynamicQuota calculated by the server is sent back to the client.
  • the client is sent the client to disable the use of the network resource.
  • the data structure of the server's response message is as follows:
  • Int32_t resourceID indicates the network resource number
  • Uint64_t disableDuration indicates the length of time that the network resource will be disabled, that is, the length of time that the client prohibits the use of the network resource.
  • Uint64_t dynamicQuota indicates the server's latest calculated dynamic usage limit
  • steps 503 and/or 504 are included:
  • the client according to the disabled duration included in the response message sent by the server, adds the current time plus the disabled duration as the time when the resource is disabled.
  • the client updates the local dynamic usage quota according to the dynamic usage limit included in the response message sent by the server.
  • dynamicQuota when the server crashes, the client will use the dynamicQuota sent by the server as the temporary resource usage limit of the client.
  • the advantage of using dynamicQuota is to prevent users from abusing resources when the server crashes, and to greatly guarantee the user experience.
  • the client is often the front-end machine, and the server is in the same cluster, and the resource quota is controlled at the minute level, so the network delay can be ignored.
  • the purpose of using disableDuration is to prevent inaccurate control caused by unsynchronized client and server time.
  • the server first updates the number of active clients according to the received data reported by the client, and the statistics of the active clients are based on different client identification information (such as agentIP, agentProcessID) in a certain period of time. Then the server updates the usage of the network resources, and calculates the dynamic usage quota (dynamicQuota) of each network resource used by each client. If the client uses the network resource to exceed the dynamic usage quota, the client is prohibited from using the network resource. The duration, in addition, if the calculated dynamic usage limit of one of the clients is inconsistent with the dynamic usage quota reported by the client, the calculated dynamic usage quota (dynamicQuota) and the disabled duration information are returned to the client together.
  • client identification information such as agentIP, agentProcessID
  • the embodiment of the present invention solves the problem that the use of the limit control is inaccurate due to the asynchronous and non-synchronized time of the server and the client by returning the disabled duration and the data reported by the default report on the current statistical window of the server.
  • FIG. 6 is a schematic structural diagram of a device for controlling a usage limit of a network resource according to an embodiment of the present application, where the client is located, as shown in FIG. 6, and includes:
  • the statistics module 61 is configured to collect the usage quota of the network resource in the current interval time t;
  • the sending module 62 is configured to send, to the server, information about the usage quota of the network resource used by the statistics module during the current interval time t at the end of the current interval time t, so that the server determines the current time of the client.
  • the first dynamic usage quota of the network resource is used, and if it is determined that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota, sending the network resource to the client Disabled time;
  • the receiving module 63 is configured to receive a disabled duration of the network resource sent by the server;
  • the disabling module 64 is configured to prohibit use of the network resource within the disabled duration from the moment of receiving the disabled duration according to the disabled duration.
  • the sending module 61 is further configured to send, to the server, a second dynamic usage quota of the network usage resource of the client, when the current interval time t ends, where the second dynamic usage quota is the server Calculating, by the end of an interval t, the dynamic usage quota of the network resource by the client, so that the server, when determining that the second dynamic usage quota is inconsistent with the first dynamic usage quota, to the client Sending the first dynamic usage limit;
  • the receiving module 63 is further configured to receive the first dynamic usage quota sent by the server;
  • the device also includes:
  • the update module 65 is configured to update, according to the first dynamic usage quota received by the receiving module 63, the second dynamic usage quota of the network resource by the client to the first dynamic usage quota.
  • the device further includes:
  • the setting module 66 is configured to: when the current interval time t ends, the statistics module 61 collects the usage quota of the used network resource after the current interval time t is used, and sets the usage quota of the used network resource to zero.
  • the disabling module 64 is configured to set, according to the disabled duration of the network resource sent by the server, a time for receiving the disabled duration as a forbidden start time for prohibiting use of the network resource, where The time when the prohibition start time starts at the end of the disable duration is set to prohibit the use of the network resource's prohibition end time.
  • the device further includes:
  • the determining module 67 is configured to use the network resource and determine the use of the network resource if the current time is after the forbidden end time of the network resource, when the network resource is used in the next interval time t The quota; if it is determined that the current time is before the prohibition end time of the network resource, the use of the network resource is prohibited.
  • the apparatus described in the embodiment shown in FIG. 6 can be used to perform the method described in the embodiment shown in FIG. 1 and FIG. 2, and the implementation principle and technical effects are not described again.
  • FIG. 7 is a schematic structural diagram of a device for controlling a usage limit of a network resource according to an embodiment of the present application.
  • the server is located on the server, as shown in FIG. 7, and includes:
  • the receiving module 71 is configured to receive, by the client, information about the usage quota of the network resource used by the client during the current interval time t;
  • a determining module 72 configured to determine a first dynamic usage limit of the network resource used by the client at a current time
  • the determining module 73 is configured to determine whether the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota;
  • the sending module 74 is configured to: when the determining module 73 determines that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota, send the network resource to the client Disabling the duration; in order for the client to disable the use of the network resource within the disabled duration from the moment of receiving the disabled duration according to the disabled duration of the network resource sent by the server.
  • the determining module 72 is specifically configured to:
  • the information about the usage quota of the network resource that is sent by the client and the other client that is received by the current time where the information carries the identifier information of the client and the other client, and determines that the current usage is The number of clients of network resources;
  • the determining module 72 is specifically configured to:
  • the DefaultQuota indicates that the client presets a default quota for using the network resource
  • the aliveAgentCount indicates the number of clients currently using the network resource
  • ImpactFactor is a preset constant.
  • the receiving module 71 is further configured to receive, by the client, a second dynamic usage quota of the network usage resource of the client that is sent to the server by the end of the current interval t, the second dynamic The usage limit is a dynamic usage limit of the client using network resources calculated by the server at the end of the last interval t;
  • the determining module 73 is further configured to determine whether the second dynamic usage quota is consistent with the first dynamic usage quota
  • the sending module 74 is further configured to: when the determining module determines that the second dynamic usage quota is inconsistent with the first dynamic usage quota, send the first dynamic usage quota to the client;
  • the client updates the second dynamic usage quota of the network resource by the client to the first dynamic usage quota according to the first dynamic usage quota sent by the server.
  • the apparatus described in the embodiment shown in FIG. 7 can be used to perform the method described in the embodiments shown in FIG. 3 and FIG. 4, and the implementation principle and technical effects are not described again.
  • FIG. 8 is a schematic structural diagram of a control system for a network resource usage quota according to an embodiment of the present application, as shown in FIG. 8, including: a client 81 and a server 82;
  • the client 81 includes a control device for using a network resource as described in the embodiment shown in FIG. 6;
  • the server 82 includes control means for the usage quota of the network resources as described in the embodiment shown in FIG. 6.
  • the system described in the embodiment shown in FIG. 8 can be used to perform the method described in any of the embodiments of FIG. 1 to FIG. 5, and the implementation principle and technical effects are not described again.
  • a method for controlling a usage limit of a network resource, and a control device for using a network resource corresponding to the network resource are provided, and the application further provides a network resource for implementing the foregoing network resource.
  • FIG. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention.
  • the description of the electronic device embodiment is relatively simple. For related parts, refer to the corresponding description of the foregoing method embodiment.
  • the described electronic device embodiments described below are merely illustrative.
  • the electronic device according to the embodiment of the present invention includes: a memory 91 and a processor 92;
  • the memory 91 stores an instruction for implementing a control method of the usage quota of the network resource
  • the processor 92 invokes an execution command in the memory 91 to perform the following steps:
  • the client uses the first dynamic usage quota of the network resource, and if it is determined that the usage quota of the network resource used by the client in the current interval time t is greater than the first dynamic usage quota, sending the network resource to the client Disabled duration;
  • processor 92 can also perform the following steps:
  • the terminal uses a dynamic usage quota of the network resource, so that the server sends the first dynamic usage quota to the client when determining that the second dynamic usage quota is inconsistent with the first dynamic usage quota;
  • the processor 92 invokes an execution command in the memory 91 to perform the following steps:
  • the client If it is determined that the usage quota of the network resource used by the client in the current interval t is greater than the first dynamic usage quota, sending a disable duration of the network resource to the client, so that the client is configured according to the Determining the length of time of the network resource sent by the server, starting from the moment of receiving the disabled duration, prohibiting the use of the network resource within the disabled duration.
  • processor 92 can also perform the following steps:
  • the system described in the embodiment shown in FIG. 9 can be used to perform the method described in any one of FIG. 1 to FIG. 5, and the implementation principle and technical effects are not described again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

L'invention concerne un procédé, un appareil et un système de commande de quota d'utilisation de ressources de réseau. Le procédé comprend : le comptage, par un client, de la quantité d'utilisation d'une ressource de réseau utilisée dans un intervalle de temps courant t ; après que l'intervalle de temps courant t se termine, l'envoi à un serveur des informations concernant la quantité d'utilisation de la ressource de réseau utilisée par le client dans l'intervalle de temps courant t, de façon à permettre au serveur de déterminer un premier quota d'utilisation dynamique de la ressource de réseau utilisée par le client dans le temps courant ; s'il est déterminé que la quantité d'utilisation de la ressource de réseau utilisée par le client dans l'intervalle de temps courant t est supérieure au premier quota d'utilisation dynamique, l'envoi d'une durée de désactivation de la ressource de réseau au client ; et la réception, par le client, de la durée de désactivation de la ressource de réseau envoyée par le serveur, et selon la durée de désactivation, l'interdiction, à partir du temps de réception de la durée de désactivation, de l'utilisation de la ressource de réseau durant la durée de désactivation. Au moyen de la présente invention, l'imprécision de la commande de quota de ressources de réseau provoquée par l'asynchronisme de temps entre un client et un serveur peut être empêchée.
PCT/CN2016/097496 2015-09-09 2016-08-31 Procédé, appareil et système de commande de quota d'utilisation de ressources de réseau WO2017041652A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510571666.7A CN106534231B (zh) 2015-09-09 2015-09-09 一种网络资源的使用限额的控制方法、装置及系统
CN201510571666.7 2015-09-09

Publications (1)

Publication Number Publication Date
WO2017041652A1 true WO2017041652A1 (fr) 2017-03-16

Family

ID=58240547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/097496 WO2017041652A1 (fr) 2015-09-09 2016-08-31 Procédé, appareil et système de commande de quota d'utilisation de ressources de réseau

Country Status (2)

Country Link
CN (1) CN106534231B (fr)
WO (1) WO2017041652A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611123A (zh) * 2019-02-25 2020-09-01 阿里巴巴集团控股有限公司 数据处理方法、数据处理系统及设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768744B (zh) * 2018-06-13 2021-07-27 郑州云海信息技术有限公司 一种对云平台创建网络的管理方法和装置
CN112019445B (zh) * 2020-07-31 2024-02-02 青岛海尔科技有限公司 用于智能设备流量控制的方法及装置、智能设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012037902A1 (fr) * 2010-09-26 2012-03-29 华为终端有限公司 Procédé et appareil de commande d'accès au réseau d'un terminal de machine
CN102624634A (zh) * 2012-04-11 2012-08-01 深圳证券通信有限公司 一种在客户端控制网络带宽的方法及装置
CN103369041A (zh) * 2013-07-09 2013-10-23 北京奇虎科技有限公司 基于云计算的资源分配方法及装置
CN103841129A (zh) * 2012-11-21 2014-06-04 华为技术有限公司 云计算的资源信息采集服务器和客户端、信息处理方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599908B (zh) * 2009-07-15 2011-11-16 杭州华三通信技术有限公司 一种带宽的自动分配方法和设备
CN103731453B (zh) * 2012-10-12 2017-02-08 百度在线网络技术(北京)有限公司 云环境中的服务资源的配额管理方法和装置
CN102916959B (zh) * 2012-10-16 2015-05-06 百度在线网络技术(北京)有限公司 云环境中的黑名单同步方法和装置
US9621439B2 (en) * 2014-02-28 2017-04-11 International Business Machines Corporation Dynamic and adaptive quota shares

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012037902A1 (fr) * 2010-09-26 2012-03-29 华为终端有限公司 Procédé et appareil de commande d'accès au réseau d'un terminal de machine
CN102624634A (zh) * 2012-04-11 2012-08-01 深圳证券通信有限公司 一种在客户端控制网络带宽的方法及装置
CN103841129A (zh) * 2012-11-21 2014-06-04 华为技术有限公司 云计算的资源信息采集服务器和客户端、信息处理方法
CN103369041A (zh) * 2013-07-09 2013-10-23 北京奇虎科技有限公司 基于云计算的资源分配方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611123A (zh) * 2019-02-25 2020-09-01 阿里巴巴集团控股有限公司 数据处理方法、数据处理系统及设备
CN111611123B (zh) * 2019-02-25 2023-06-20 阿里巴巴集团控股有限公司 数据处理方法、数据处理系统及设备

Also Published As

Publication number Publication date
CN106534231B (zh) 2019-12-31
CN106534231A (zh) 2017-03-22

Similar Documents

Publication Publication Date Title
US11546644B2 (en) Bandwidth control method and apparatus, and device
CN107391271B (zh) 一种基于消息队列系统的延时任务触发方法和装置
US6961341B1 (en) Adaptive bandwidth throttling for network services
US10230644B2 (en) Distributed API proxy system and apparatus and method for managing traffic in such system
US10305974B2 (en) Ranking system
WO2017041652A1 (fr) Procédé, appareil et système de commande de quota d'utilisation de ressources de réseau
US20130246507A1 (en) Relay device, information processing system, and computer-readable recording medium
CN106656604A (zh) 微服务请求管理方法、微服务控制器及高并发微服务架构
EP4044525A1 (fr) Procédé et appareil de transmission de données
CN107800574B (zh) 存储qos调节方法、系统、设备及计算机可读存储器
CN110677684B (zh) 视频处理、视频访问方法及分布式存储、视频访问系统
US10554568B2 (en) Technologies for network round-trip time estimation
US9705733B2 (en) Systems and methods for throttling polling
CN109726151B (zh) 用于管理输入输出栈的方法、设备和介质
US7639628B2 (en) Response time detection in a network having shared interfaces
CN109510730A (zh) 分布式系统及其监控方法、装置、电子设备及存储介质
CN108804152B (zh) 配置参数的调节方法及装置
US20180219971A1 (en) Service Processing Method and Device
US20180098327A1 (en) Congestion control method and network element device
CN108924013B (zh) 网络流量精确采集方法及装置
US10091068B1 (en) System for modeling distributed systems
CN114024913A (zh) 一种网络性能优化方法、装置、设备以及存储介质
CN109062706B (zh) 电子装置及其限制进程间通信的方法、存储介质
CN113259975A (zh) 网络游戏连接方法、电子设备和计算机可读介质
WO2019179387A1 (fr) Procédé et système de traitement de données

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16843590

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16843590

Country of ref document: EP

Kind code of ref document: A1