Cloud disk token management method, device, equipment and product for edge computing

By filling tokens in the cloud disk's storage bucket based on a preset filling rate and dynamically adjusting the maximum number of tokens consumed when necessary, the shortcomings of the cloud disk's rate limiting mechanism in dealing with sudden traffic surges are resolved, thereby improving user experience and service quality.

CN120455380BActive Publication Date: 2025-12-26BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510948588.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-12-26
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

In existing technologies, cloud disk rate limiting mechanisms perform poorly when dealing with sudden traffic surges, resulting in user requests being rejected, impacting user experience, and failing to meet the performance needs of different users.

Method used

By filling the cloud disk's storage bucket with tokens based on a preset filling rate, and dynamically adjusting the upper limit of token consumption per unit time when the remaining number of tokens in the storage bucket is greater than or equal to a second preset number, the performance requirements of users can be met.

Benefits of technology

The service quality of the cloud drive has been optimized to handle sudden traffic surges, prevent user requests from being rejected, improve user experience, and meet the data transmission performance needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455380B_ABST
    Figure CN120455380B_ABST
Patent Text Reader

Abstract

A cloud disk token management method, device, equipment and product for edge computing, relating to the technical field of edge computing, cloud disk and computer. The method comprises: filling tokens to the storage bucket of the cloud disk based on a preset filling rate, the preset filling rate being determined based on a first preset number in token configuration information configured by a user; in the case that the remaining number of tokens in the storage bucket is greater than or equal to a second preset number and the number of tokens required by the first data transmission request sent by the user is greater than the first preset number, adjusting the upper limit number of token consumption of the storage bucket in a unit time from the first preset number to the second preset number, the second preset number being greater than the first preset number. The cloud disk deployed in the edge node can be rate-limited according to the user demand, meeting the demand of different users for data transmission performance, and supporting dynamic increase of the upper limit number of token consumption of the storage bucket in a unit time according to the user configuration, to cope with the business scenarios of cloud disk burst traffic.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of edge computing, cloud disk, computer technology, in particular, relates to a cloud disk token management method and device for edge computing, equipment and products. BACKGROUND

[0002] Edge computing realizes efficient processing and storage of data by pre-processing and storing data at edge nodes close to data sources, combined with the powerful storage and computing capabilities of cloud disks.

[0003] In related technologies, the frequency of user requests is controlled by limiting the token filling rate of the storage bucket in the cloud disk, thereby effectively preventing resource overload and service anomalies. However, this speed limiting mechanism often performs poorly in dealing with burst traffic, for example, causing user requests to be rejected, thereby affecting user experience. SUMMARY

[0004] This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed technology, nor is it intended to be used to limit the scope of the claimed technology.

[0005] In a first aspect, the present disclosure provides a cloud disk token management method for edge computing, the cloud disk token management method comprising:

[0006] Filling tokens into a storage bucket of a cloud disk based on a preset filling rate, the cloud disk being deployed at an edge node, the preset filling rate being determined based on a first preset number in token configuration information configured by a user for the storage bucket, the first preset number representing the number of tokens filled into the storage bucket per unit time;

[0007] In a case where the remaining number of tokens in the storage bucket is greater than or equal to a second preset number and the number of tokens required by a first data transmission request sent by the user is greater than the first preset number, adjusting the upper limit number of token consumption of the storage bucket per unit time from the first preset number to the second preset number, the token configuration information including the second preset number, the second preset number being greater than the first preset number.

[0008] In a second aspect, the present disclosure provides a cloud disk token management device for edge computing, the cloud disk token management device comprising:

[0009] The filling module is configured to fill tokens into a storage bucket of a cloud disk based on a preset filling rate, the cloud disk being deployed on an edge node, the preset filling rate being determined based on a first preset number in token configuration information configured by a user for the storage bucket, the first preset number representing a number of tokens filled into the storage bucket per unit time;

[0010] The adjusting module is configured to adjust an upper limit of token consumption of the storage bucket per unit time from the first preset number to a second preset number in a case where a remaining number of tokens of the storage bucket is greater than or equal to the second preset number and a number of tokens required by the first data transmission request sent by the user is greater than the first preset number, the token configuration information including the second preset number, and the second preset number being greater than the first preset number.

[0011] In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program, which, when executed by a processing device, implements the steps of the method in the first aspect.

[0012] In a fourth aspect, the present disclosure provides an electronic device, comprising:

[0013] a storage device having stored thereon a computer program;

[0014] a processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.

[0015] In a fifth aspect, the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method in the first aspect.

[0016] With the above technical solution, tokens can be filled into a storage bucket of a cloud disk based on a preset filling rate, and in a case where a remaining number of tokens of the storage bucket is greater than or equal to a second preset number and a number of tokens required by a first data transmission request sent by a user is greater than the first preset number, an upper limit of token consumption of the storage bucket per unit time can be adjusted from the first preset number to the second preset number. With the above method, the rate of filling tokens into the storage bucket can be determined based on user configuration, so that the cloud disk deployed on the edge node can be rate-limited according to user demand to meet the needs of different users for data transmission performance. In addition, when a user's data transmission request requires more tokens and the storage bucket has the ability to increase the upper limit of token consumption, the upper limit of token consumption of the storage bucket per unit time can also be dynamically increased according to user configuration, so as to improve the processing performance of the cloud disk and optimize the service quality of the cloud disk. For example, in an edge computing scenario, the cloud disk can cope with the business scenario of burst traffic, avoid user requests being rejected, and thus improve user experience.

[0017] Other features and advantages of the present disclosure will be set forth in the detailed description which follows, and in part will be apparent from the detailed description or can be learned by practice of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0018] The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0019] Figure 1 is a schematic flow chart of a cloud disk token management method for edge computing according to an exemplary embodiment of the present disclosure;

[0020] Figure 2 is a process schematic diagram of bucket initialization according to an exemplary embodiment of the present disclosure;

[0021] Figure 3 is a process schematic diagram of token filling according to an exemplary embodiment of the present disclosure;

[0022] Figure 4 is a process schematic diagram of processing of a data transmission request according to an exemplary embodiment of the present disclosure;

[0023] Figure 5 is a process schematic diagram of processing of a data transmission request according to an exemplary embodiment of the present disclosure;

[0024] Figure 6 is a structural schematic diagram of a cloud disk token management apparatus for edge computing according to an exemplary embodiment of the present disclosure;

[0025] Figure 7 is a structural schematic diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. While several embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in many forms and should not be construed as limited to the embodiments set forth herein, but should be construed as including all modifications, equivalents, and substitutes falling within the scope of the present disclosure. It is to be understood that the drawings are designed for the purpose of illustration only and that those skilled in the art will be able to implement the present disclosure without undue experimentation.

[0027] It is to be understood that the various steps of the method embodiments of the present disclosure can be performed in different orders and / or in parallel. Furthermore, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "include" and variations thereof as used herein mean "to include, without limitation." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment." The term "another embodiment" means "at least one additional embodiment." The term "some embodiments" means "at least some embodiments." Related terms shall be construed accordingly.

[0029] It should be noted that the terms "first", "second", etc. mentioned in the disclosure are only used to distinguish different devices, modules or units, and do not limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modification of "one" or "multiple" mentioned in the disclosure is illustrative rather than limiting, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.

[0031] The names of the messages or information exchanged between the plurality of devices in the embodiments of the disclosure are only for illustrative purposes, and are not used to limit the scope of the messages or information.

[0032] It can be understood that, before using the technical solutions disclosed in the embodiments of the disclosure, the type, use range, use scenario, etc. of the personal information involved in the disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0033] For example, in response to receiving the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user. Thus, the user can voluntarily choose whether to provide the personal information to the software or hardware such as electronic device, application program, server or storage medium, etc. that performs the operation of the technical solutions of the disclosure according to the prompt information.

[0034] As an optional but non-limiting implementation manner, in response to receiving the active request of the user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0035] It can be understood that the above notification and user authorization process is only illustrative, and does not limit the implementation manner of the disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation manner of the disclosure.

[0036] Meanwhile, it can be understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and relevant provisions.

[0037] A cloud disk is an online storage service based on cloud computing technology. Users can upload, store and share files on a cloud server through the network, making it convenient to access and manage data anytime and anywhere. For example, Ceph cloud disk is a cloud storage solution based on Ceph distributed storage system, providing elastic block storage services for cloud computing business.

[0038] Edge computing is a distributed computing architecture that preprocesses and stores data on edge nodes close to the data source, reducing data transmission delay and improving data real-time performance. Combining edge computing with the powerful storage and computing power of cloud disk can achieve efficient processing and storage of data, not only reducing delay and improving system response speed, but also optimizing network resource utilization.

[0039] In related technologies, in the case that the cloud disk has no speed limit, a single cloud disk used by a single user may occupy too much IOPS (Input / Output Operations Per Second) performance and bandwidth performance, affecting the service quality of other users using the cloud disk in the edge computing cluster. Or by limiting the token filling rate of the cloud disk to control the frequency of user requests, thereby effectively preventing resource overload and service anomalies. In this limiting mechanism, the number of bytes requested or the number of requests is usually taken as the token unit, and tokens are added to a fixed capacity storage bucket at a fixed rate, and after receiving a data transmission request sent by a user, it is checked whether the current number of tokens in the storage bucket meets the number of tokens required by the data transmission request. If the storage bucket has enough tokens, for example, if the requested data length is 100 bytes and 100 tokens are required, 100 tokens need to be allocated to the data storage request before the data transmission request is sent to the cloud disk for data transmission processing. If there are not enough tokens in the storage bucket, the data transmission request will be rejected or discarded. Therefore, this speed limiting mechanism cannot meet the performance needs of different users, and often performs poorly in dealing with burst traffic, such as causing user requests to be rejected, thereby affecting user experience.

[0040] Therefore, the present disclosure provides a cloud disk token management method, device, equipment and product for edge computing to solve the above technical problems.

[0041] The embodiments of the present disclosure are further explained and described below with reference to the accompanying drawings.

[0042] Figure 1is a flowchart of a cloud disk token management method for edge computing according to an example embodiment of the present disclosure, referring to Figure 1 The cloud disk token management method can include the following steps:

[0043] S101: Fill tokens into the storage bucket of the cloud disk based on a preset filling rate.

[0044] The cloud disk is deployed on an edge node, and the preset filling rate is determined based on a first preset number in token configuration information configured by a user for the storage bucket, the first preset number representing the number of tokens filled into the storage bucket per unit time.

[0045] For example, the cloud disk described above can refer to a cloud disk deployed on an edge node in an edge computing scenario, such as a Ceph cloud disk, which is not limited by the present disclosure. The storage bucket of the cloud disk can store tokens and support token consumption and filling. In this embodiment, a token storage bucket throttling layer can be designed for the cloud disk, and encapsulation capability of service quality can be provided externally, that is, a user of the cloud disk can configure token configuration information required by the token storage bucket throttling layer according to demand, the token configuration information can include a first preset number representing the number of tokens filled into the storage bucket per unit time, and the first preset number can be used to calculate the token filling rate of the storage bucket. The token configuration information can also include a second preset number and a preset burst duration, the second preset number can be understood as an upper limit number of tokens consumed by the storage bucket per unit time during performance burst, and the preset burst duration can be understood as a duration for increasing the upper limit number of tokens consumed by the storage bucket per unit time from the first preset number to the second preset number, the second preset number and the preset burst duration can be used to determine the capacity of the storage bucket, that is, the total number of tokens that can be placed in the storage bucket, and so on, which can be set according to demand, and the present disclosure does not limit this.

[0046] That is, the user can perform rate limiting processing on the cloud disk by configuring the first preset number, and allow the cloud disk to burst in performance by configuring the second preset number and the preset burst duration.

[0047] S102: In the case where the remaining number of tokens in the storage bucket is greater than or equal to the second preset number and the number of tokens required by the first data transmission request sent by the user is greater than the first preset number, adjust the upper limit number of tokens consumed by the storage bucket per unit time from the first preset number to the second preset number.

[0048] The token configuration information includes the second preset number, and the second preset number is greater than the first preset number.

[0049] For example, in a case where the user configures the second preset quantity, it is illustrated that the user configures the related parameters required by the performance burst scenario, and then in a case where the remaining quantity of tokens in the storage bucket is greater than or equal to the second preset quantity, it is illustrated that the current remaining quantity of tokens in the storage bucket can support increasing the upper limit quantity of token consumption of the storage bucket in a unit time period, that is, the ability to cope with performance bursts, and the quantity of tokens filled in the storage bucket in a unit time period is less than the quantity of tokens required by the data transmission request, which indicates that a performance burst occurs, and more tokens need to be consumed to improve the token allocation efficiency of the data transmission request, and therefore the upper limit quantity of token consumption of the storage bucket in a unit time period can be increased, thereby improving the token allocation efficiency of the data transmission request and avoiding user requests being rejected or discarded.

[0050] By using the above method, the rate of filling tokens into the storage bucket can be determined based on the user configuration, so that the cloud disk deployed on the edge node can be rate-limited according to the user demand to meet the data transmission performance requirements of different users. In addition, when the data transmission request of the user needs to consume more tokens and the storage bucket has the ability to increase the upper limit of token consumption, the upper limit quantity of token consumption of the storage bucket in a unit time period can also be dynamically increased according to the user configuration to improve the processing performance of the cloud disk and optimize the service quality of the cloud disk. For example, in an edge computing scenario, the burst traffic business scenario of the cloud disk can be coped with to avoid user requests being rejected, thereby improving the user experience.

[0051] In a possible manner, the filling of tokens into the storage bucket of the cloud disk based on the preset filling rate comprises: for each time interval in a unit time period, filling a quantity of tokens corresponding to the time interval into the storage bucket; wherein the length of the time interval is the greater one of the length obtained by dividing the unit time period by the first preset quantity and the first preset length.

[0052] For example, the unit time period can be divided into a plurality of time intervals, and the length of each time interval is equal, which can be understood as a time interval for filling one token. Generally, filling one token at a time is the ideal state of the smoothest token consumption. The length of the time interval can be calculated by dividing the unit time by the first preset quantity, and the token configuration information can include the length of the calculated time interval, so that the tokens can be uniformly filled into the storage bucket according to the first preset quantity set by the user.

[0053] For example, assuming that the unit time is 1000 milliseconds, if the user sets the first preset number as 1000, the time interval of each time interval is 1 millisecond, which is equivalent to filling a token for 1 millisecond. Considering the performance limitation of the timer, the minimum time interval for token filling can be set, for example, the first preset time is set as 50 milliseconds, that is, the time interval of each time interval is 50 milliseconds. That is, if the time interval calculated according to the first preset number set by the user is less than or equal to the preset time interval, the preset time interval is used as the time interval of each time interval, and if the time interval calculated according to the first preset number set by the user is greater than the preset time interval, the calculated time interval is used as the time interval of each time interval.

[0054] Further, the number of tokens filled in each time interval needs to be calculated in order to uniformly fill the tokens into the storage bucket. For example, in an edge computing scenario, the user request frequency of the cloud disk deployed on the edge node can be controlled according to the user configuration, and the quality of service of the cloud disk deployed on the edge node can be guaranteed.

[0055] In a possible manner, the filling number corresponding to the time interval is determined by: dividing the first preset number by the total number of all time intervals to obtain a first filling number; in the case that the first filling number is an integer, the first filling number is determined as the filling number corresponding to each time interval; in the case that the first filling number is not an integer, for a target time interval in all time intervals, the interval serial number of the target time interval is divided by the total number to obtain a second filling number, the interval serial number of the previous time interval of the target time interval is divided by the total number to obtain a third filling number, and the difference between the integer value of the second filling number and the integer value of the third filling number is obtained as the filling number corresponding to the target time interval.

[0056] For example, the number of tokens filled each time is not allowed to be a decimal number. Continuing to take 1000 milliseconds as the unit time, assuming that the user sets the first preset number as 1000, the default minimum time interval is used, that is, a token is filled every 50 milliseconds, and 20 times of filling are required, and the number of tokens to be filled each time is 1000 / 20=50 tokens, that is, 50 tokens need to be filled in each time interval. That is, in the case that the number of tokens filled in each time interval is an integer, the token delivery can be directly performed according to the calculation result.

[0057] For example, assuming that the user sets the first preset number as 950, the number of tokens to be filled each time is 950 / 20=47.5, which is not an integer, so the integer processing needs to be performed, and the total number of tokens filled in the unit time interval is equal to the first preset number set by the user.

[0058] In the embodiment, in order to solve the non-integer problem, the number of integer tokens that need to be filled in each time interval needs to be calculated. The number of tokens filled in each time interval can be calculated first, and then the difference between the number of tokens filled in the current time interval and the number of tokens filled in the last time interval is taken as the number of tokens that need to be filled in the current time interval.

[0059] For example, the number of tokens filled in the i-th time interval can be obtained based on the number of filled time intervals / total number of intervals x the first preset number, and then be rounded up or rounded down. The number of tokens filled in the i-th time interval is the difference between the number of tokens filled in the i-th time interval and the number of tokens filled in the i-1-th time interval, i is a positive integer. That is, taking rounding down as an example, the number of tokens filled in the first time interval is (1 / 20x950)-(0 / 20x950)=47-0=47; the number of tokens filled in the second time interval is (2 / 20x950)-(1 / 20x950)=95-47=48, and so on. The number of tokens that need to be filled in each time interval is calculated.

[0060] Thus, in a unit of time, whether the first preset number set by the user can be divided by the total number of time intervals or not, tokens can be filled into the storage bucket uniformly according to the time interval. In order to control the user request frequency of the cloud disk according to the user configuration in the edge computing scenario, and guarantee the service quality of the cloud disk.

[0061] It should be noted that the total number of time intervals and the current filled time interval number can be set as corresponding parameters and encapsulated in the token configuration information. The present disclosure does not limit this.

[0062] In the embodiment, taking the edge computing scenario as an example, in order to meet the performance burst demand of the user for the cloud disk, the data structure of the storage bucket can be designed. The data structure of the storage bucket includes a first data field for representing the remaining number of tokens of the storage bucket, a second data field for recording the maximum number of tokens of the storage bucket, a third data field for representing the number of tokens that can be taken away in a unit of time, and a fourth data field for representing the total number of tokens that can be filled in the storage bucket. The specific setting can be made according to the demand, and the present disclosure does not limit this. Through the data structure design of the storage bucket allowing performance burst, the burst performance demand of the user for the cloud disk in the edge computing scenario is met.

[0063] The first data field is updated during the token filling and consumption process. When the user does not set the second preset number, the field value corresponding to the second data field is the first preset number. When the user sets the second preset number, the field value corresponding to the second data field is the second preset number. The initial value of the third data field is equal to the field value corresponding to the second data field, and the third data field is updated during the token filling and consumption process. The field value of the fourth data field is the product of the field value corresponding to the second data field and a preset time length. The preset time length represents the upper limit time length for adjusting the upper limit number of token consumption of the storage bucket in a unit time length from the first preset number to the second preset number. If it is not set, the default value can be 1. In this way, the user can configure according to the burst performance demand, so that the storage bucket can accumulate more tokens than the first preset number, thereby allowing performance bursts.

[0064] For example, as shown in Figure 2 The storage bucket can be initialized according to the first preset number, the second preset number and the preset time length configured by the user. When the second preset number is equal to 0, it indicates that the user does not set the second preset number, and the maximum token number is equal to the first preset number. When the second preset number is not equal to 0, it indicates that the user sets the second preset number, and the maximum token number is equal to the second preset number. Further, based on the maximum token number and the preset time length, the total fillable number is obtained, and the initial token remaining number of the storage bucket is initialized as the fillable number, and the takeable number of the storage bucket is initialized as the maximum token number. Subsequently, the token remaining number and the takeable number of the storage bucket are updated according to the filling and consumption of the token.

[0065] In addition, based on the data structure of the above-mentioned storage bucket, a corresponding method can be designed to update the data field, for example, a method for filling and taking tokens to the storage bucket, a method for updating the metadata in the token bucket, etc. The specific configuration can be set according to the demand, and the present disclosure does not limit this.

[0066] In a possible manner, the cloud disk token management method further includes: in the process of filling tokens to the storage bucket of the cloud disk based on the preset filling rate, updating the token remaining number of the storage bucket and the takeable number of the storage bucket in a unit time length; wherein the upper limit value of the token remaining number of the storage bucket is the total fillable number of the storage bucket, the total fillable number is the product of the second preset number and the second preset time length, the token configuration information includes the second preset time length, the second preset time length represents the upper limit time length for adjusting the upper limit number of token consumption of the storage bucket in a unit time length from the first preset number to the second preset number, and the upper limit value of the takeable number is the smaller one of the updated token remaining number and the preset upper limit value.

[0067] For example, as shown in Figure 3As shown, the storage bucket can be filled with tokens in sequence based on the number of tokens needed to be filled in each time interval calculated above. In the case that the sum of the remaining number of tokens in the storage bucket and the number of tokens is less than or equal to the total fillable number of the storage bucket, the sum of the remaining number of tokens in the storage bucket and the number of tokens is taken as the new remaining number of tokens of the storage bucket. In the case that the sum of the remaining number of tokens in the storage bucket and the number of tokens is greater than the total fillable number of the storage bucket, the total fillable number of the storage bucket is taken as the new remaining number of tokens of the storage bucket.

[0068] Further, in the case that the new remaining number of tokens of the storage bucket is greater than the maximum number of tokens, the upper limit value is set to the maximum number of tokens, and in the case that the new remaining number of tokens of the storage bucket is less than or equal to the maximum number of tokens, the upper limit value is set to the new remaining number of tokens. In the case that the sum of the takeable number of the storage bucket and the number of tokens is less than or equal to the upper limit value, the sum of the takeable number of the storage bucket and the number of tokens is taken as the new takeable number of the storage bucket, and in the case that the sum of the takeable number of the storage bucket and the number of tokens is greater than the upper limit value, the upper limit value is taken as the new takeable number of the storage bucket.

[0069] Thus, the remaining number of tokens of the storage bucket and the takeable number of the storage bucket in a unit time length can be dynamically updated, and the remaining number of tokens and the takeable number are controlled to match the token configuration information configured by the user, instead of unlimited growth, so as to control the user request frequency of the cloud disk deployed on the edge node according to the user configuration in the edge computing scenario, and guarantee the service quality of the cloud disk deployed on the edge node. Accordingly, if the tokens in the storage bucket are consumed, the remaining number of tokens and the takeable number are directly reduced by the number of consumed tokens, which will not be described herein again.

[0070] In a possible manner, the cloud disk token management method further includes: in the case that the first number of tokens required by the second data transmission request in the request waiting queue of the storage bucket is less than or equal to the updated takeable number, after the first number of tokens are allocated to the second data transmission request, the second data transmission request is sent to the cloud disk for data transmission processing.

[0071] For example, continuing to refer to Figure 3After the tokens are filled into the storage bucket, it can be checked whether the request waiting queue of the storage bucket is empty. If there is a data transmission request in the request waiting queue that has been waiting because sufficient tokens cannot be obtained, the data transmission request in the request waiting queue is processed in priority. The data transmission request in the request waiting queue can be processed in a first-in-first-out order, which can be set according to requirements, and the present disclosure does not limit this. If the updated number of tokens that can be taken away still cannot meet the number of tokens required by the request waiting, the subsequent filled tokens are continued to be waited for until the number of tokens required by the request waiting is met. In the case where the updated number of tokens that can be taken away meets the number of tokens required by the request waiting, the number of tokens required by the request waiting is allocated to the request waiting after the number of tokens that can be taken away meets the number of tokens required by the request waiting, and the request waiting is sent to the cloud disk for subsequent data transmission processing.

[0072] In the embodiments of the present disclosure, the data transmission request that cannot obtain sufficient tokens can be stored through the data request queue, so that the data transmission request is not directly rejected or discarded, and in the process of token filling, it can be determined in time whether the number of tokens that can be taken away by the storage bucket in a unit time can meet the number of tokens required by the data transmission request waiting for processing, so as to process the data transmission request in the request waiting queue in priority.

[0073] It should be understood that, whether it is a new data transmission request or a data transmission request obtained in the request waiting queue, if the number of tokens that can be taken away by the storage bucket in a unit time cannot meet the number of tokens required by the request, all the tokens corresponding to the number of tokens that can be taken away are allocated to the data transmission request, and then the data transmission request is stored in the request waiting queue, and after the remaining number of tokens required is supplemented, the data transmission request is sent to the edge node of the cloud disk for subsequent data transmission processing.

[0074] In a possible manner, the cloud disk token management method further includes: adjusting the upper limit of the number of tokens consumed by the storage bucket in a unit time from the second preset number to the first preset number after any of the following conditions is met: the time for adjusting the upper limit of the number of tokens consumed by the storage bucket in a unit time from the first preset number to the second preset number is greater than or equal to a third preset time length, the token configuration information includes the third preset time length, and the third preset time length represents an upper limit time length for adjusting the upper limit of the number of tokens consumed by the storage bucket in a unit time from the first preset number to the second preset number; and the number of tokens remaining in the storage bucket is less than the second preset number.

[0075] For example, in the case where the time for adjusting the upper limit of the number of tokens consumed by the storage bucket in a unit time from the first preset number to the second preset number is greater than or equal to a preset time length configured by a user, it indicates that the performance burst time length configured by the user has been reached, and then the upper limit of the number of tokens consumed by the storage bucket in a unit time can be adjusted from the second preset number to the first preset number, so that the performance burst time length of the cloud disk can be flexibly configured according to the user demand, and the user experience is improved.

[0076] For example, if the number of tokens remaining in the storage bucket is less than the second preset number, it means that the number of tokens in the storage bucket is insufficient to support performance bursts. In this case, the maximum number of tokens consumed by the storage bucket per unit time can be adjusted from the second preset number to the first preset number. This allows for flexible control of the performance burst duration of the cloud disks deployed on the edge nodes based on the actual number of tokens in the storage bucket.

[0077] In some possible ways, the cloud disk token management method further includes: intercepting a third data transmission request sent by a user; storing the third data transmission request in the request waiting queue if the bucket's request waiting queue is not empty; storing the third data transmission request in the request waiting queue if the bucket's request waiting queue is empty and the number of second tokens required for the third data transmission request is greater than the number of tokens that can be taken from the bucket within a unit of time; and allocating the third data transmission request with the number of second tokens required for the third data transmission request and sending the third data transmission request to the cloud disk for data transmission processing if the bucket's request waiting queue is empty and the number of second tokens is less than or equal to the number of tokens that can be taken from the bucket within a unit of time.

[0078] For example, such as Figure 4 As shown, the aforementioned token bucket rate limiting layer can intercept user data transmission requests. It then checks the request waiting queue for previous data transmission requests that were previously queued due to insufficient tokens. If such requests exist, the intercepted data transmission request is added to the waiting queue. If the waiting queue is empty, it checks if the number of tokens available for retrieval within a unit of time in the bucket meets the token requirements of the data transmission request. If so, the required tokens are allocated to the data transmission request, and the current available tokens are subtracted from the required tokens to obtain a new available token count. Additionally, the current remaining token count is subtracted from the required token count to obtain a new available token count. This enables token consumption from buckets deployed on edge nodes in cloud disks and dynamically updates the remaining token count and the number of tokens available for retrieval within a unit of time.

[0079] It should be noted that when configuring token configuration information, users can display the parameters that need to be configured on the configuration page for users to configure, and the corresponding token configuration information is determined in response to the user's configuration operation. Multiple configuration information options can also be preset, with different options corresponding to different token configuration information, and the corresponding token configuration information is determined in response to the user's selection operation. The specific settings can be configured according to needs, and this disclosure does not impose any restrictions on this.

[0080] The cloud disk token management method provided in this disclosure can be designed as part of the cloud disk input / output path in edge computing scenarios, such as... Figure 5As shown, the capacity of the storage bucket is set by the size of the speed limit input by the user, that is, the total number of tokens that the storage bucket can fill. Then the storage bucket is filled with tokens at a constant time interval. All data transmission requests passing through the cloud disk need to pass through the token storage bucket throttling layer to obtain token calculation. Data transmission requests that correctly obtain a sufficient number of tokens will be sent to the next step. In this way, the request rate provided by the cloud disk will be limited to the rate at which tokens are filled into the storage bucket, thereby playing a role in limiting speed and flow. Data transmission requests that do not obtain a sufficient number of tokens are stored in the request waiting queue to avoid rejecting or discarding requests and improve user experience.

[0081] It is worth noting that if the cloud disk is not throttled, the value of IOPS is larger in performance testing, that is, a single user occupies too much IOPS performance and bandwidth performance, affecting the service quality of other users using the cloud disk in the edge computing cluster. After the cloud disk is throttled based on the cloud disk token management method provided by the embodiments of the present disclosure, assuming that 2000 IOPS limits are added to the cloud disk, the same performance test case is executed, and the value of IOPS is controlled at 2000, which can effectively prevent a single user in the edge computing cluster from occupying too much performance, provide a smooth average rate for the cloud disk, and improve user experience. In addition, 3000 IOPS burst limits are added to the cloud disk, with a duration of 5 seconds, and the same performance test case is executed to test performance bursts. The value of IOPS bursts to 300, that is, the burst performance limit and burst duration function that allows the average rate to be exceeded can be provided while throttling the cloud disk deployed on the edge node, meeting the user's burst performance requirements for the cloud disk and further improving user experience.

[0082] Based on the same concept, the embodiments of the present disclosure also provide a cloud disk token management device for edge computing, as shown in Figure 6 As shown, the cloud disk token management device 600 can include:

[0083] The filling module 601 is configured to fill tokens into the storage bucket of the cloud disk based on a preset filling rate, the cloud disk is deployed on an edge node, and the preset filling rate is determined based on a first preset number in token configuration information configured by a user for the storage bucket, the first preset number representing the number of tokens filled into the storage bucket per unit time;

[0084] The adjusting module 602 is configured to adjust an upper limit of token consumption of the storage bucket in the unit time length from the first preset number to a second preset number in a case where the remaining number of tokens of the storage bucket is greater than or equal to the second preset number and a number of tokens required by the first data transmission request sent by the user is greater than the first preset number. The token configuration information includes the second preset number, and the second preset number is greater than the first preset number.

[0085] Optionally, the filling module 601 is configured to:

[0086] filling the storage bucket with a filling number of tokens corresponding to each time interval in the unit time length;

[0087] wherein a length of the time interval is a larger one of a length obtained by dividing the unit time length by the first preset number and a first preset length.

[0088] Optionally, the filling number corresponding to the time interval is determined in the following manner:

[0089] dividing the first preset number by a total number of all the time intervals to obtain a first filling number;

[0090] in a case where the first filling number is an integer, determining the first filling number as the filling number corresponding to each of the time intervals;

[0091] in a case where the first filling number is not an integer, for a target time interval in all the time intervals, dividing a sequence number of the target time interval by the total number and multiplying the first preset number to obtain a second filling number, dividing a sequence number of a previous time interval of the target time interval by the total number and multiplying the first preset number to obtain a third filling number, and subtracting an integer value of the third filling number from an integer value of the second filling number to obtain the filling number corresponding to the target time interval.

[0092] Optionally, the cloud disk token management apparatus 600 further includes an updating module, and the updating module is configured to:

[0093] updating the remaining number of tokens of the storage bucket and the withdrawable number of the storage bucket in the unit time length in a process of filling tokens into the storage bucket of the cloud disk based on a preset filling rate.

[0094] The upper limit value of the remaining number of tokens of the storage bucket is a total fillable number of the storage bucket, the total fillable number is a product of the second preset number and a second preset time length, the token configuration information includes the second preset time length, the second preset time length represents an upper limit time length for adjusting the upper limit number of token consumption of the storage bucket in the unit time length from the first preset number to the second preset number, and the upper limit value of the takeable number is a smaller one of the updated remaining number of tokens and a preset upper limit value.

[0095] Optionally, the cloud disk token management apparatus 600 further includes an allocation module, configured to:

[0096] In a case where a first number of tokens required by a second data transmission request in the request waiting queue of the storage bucket is less than or equal to the updated takeable number, the second data transmission request is sent to the cloud disk for data transmission processing after the first number of tokens is allocated to the second data transmission request.

[0097] Optionally, the cloud disk token management apparatus 600 further includes an adjustment submodule, configured to:

[0098] In a case where any one of the following conditions is met, the upper limit number of token consumption of the storage bucket in the unit time length is adjusted from the second preset number to the first preset number:

[0099] The time length for adjusting the upper limit number of token consumption of the storage bucket in the unit time length from the first preset number to the second preset number is greater than or equal to a third preset time length, the token configuration information includes the third preset time length, and the third preset time length represents an upper limit time length for adjusting the upper limit number of token consumption of the storage bucket in the unit time length from the first preset number to the second preset number.

[0100] The remaining number of tokens of the storage bucket is less than the second preset number.

[0101] Optionally, the cloud disk token management apparatus 600 further includes an interception module, configured to:

[0102] Intercept a third data transmission request sent by the user;

[0103] In a case where the request waiting queue of the storage bucket is not empty, the third data transmission request is stored in the request waiting queue;

[0104] In a case where the request waiting queue of the storage bucket is empty and a second number of tokens required by the third data transmission request is greater than the takeable number of the storage bucket in the unit time length, the third data transmission request is stored in the request waiting queue.

[0105] In a case where the request waiting queue of the storage bucket is empty and the second number of tokens is less than or equal to the number of tokens that can be taken away by the storage bucket in the unit time length, after the third data transmission request is assigned with the second number of tokens, the third data transmission request is sent to the cloud disk for data transmission processing.

[0106] Based on the same idea, the embodiment of the present disclosure also provides a computer readable medium, which has a computer program stored thereon, and the program is executed by a processing device to implement the steps of any of the cloud disk token management methods for edge computing.

[0107] Based on the same idea, the embodiment of the present disclosure also provides an electronic device, which can include:

[0108] a storage device having a computer program stored thereon;

[0109] a processing device configured to execute the computer program in the storage device to implement the steps of any of the cloud disk token management methods for edge computing.

[0110] Based on the same idea, the embodiment of the present disclosure also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps of any of the cloud disk token management methods for edge computing.

[0111] Reference will now be made to the following description Figure 7 , which shows a structural schematic diagram of an electronic device 700 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, as well as fixed terminals such as digital TVs, desktop computers, and the like. Figure 7 The electronic device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.

[0112] As shown in Figure 7 , the electronic device 700 can include a processing device (such as a central processor, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 702 or programs loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0113] Generally, the following devices can be connected to the I / O interface 705: input devices 706, including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 707, including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 708, including, for example, a magnetic tape, a hard disk, and the like; and communication devices 709. The communication devices 709 can allow the electronic device 700 to communicate wirelessly or wired with other devices to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it is understood that all of the shown devices are not required to be implemented or present. More or less devices can alternatively be implemented or present.

[0114] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 709, or installed from the storage devices 708, or installed from the ROM 702. When the computer program is executed by the processing devices 701, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0115] It is noted that the aforementioned computer-readable medium of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example and without limitation, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a computer-readable program code transmitted by a computer-readable medium or a carrier wave in a baseband or as part of a carrier wave. Such a propagated computer-readable signal medium can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. The computer-readable signal medium can also be any computer-readable medium that is not a computer-readable storage medium and that can be used to carry or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to, wire, cable, RF (radio frequency), or the like, or any suitable combination of the foregoing.

[0116] In some embodiments, communication can be conducted using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.

[0117] The aforementioned computer-readable medium can be contained in the aforementioned electronic device; or can exist separately without being assembled into the electronic device.

[0118] The computer readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to: fill tokens to a storage bucket of a cloud disk based on a preset filling rate, the cloud disk being deployed at an edge node, the preset filling rate being determined based on a first preset number in token configuration information configured by a user for the storage bucket, the first preset number representing a number of tokens filled to the storage bucket within a unit time period; in a case where a remaining number of tokens of the storage bucket is greater than or equal to a second preset number and a number of tokens required by a first data transmission request sent by the user is greater than the first preset number, adjust an upper limit number of token consumption of the storage bucket within the unit time period from the first preset number to the second preset number, the token configuration information including the second preset number, the second preset number being greater than the first preset number.

[0119] Computer program code for carrying out operations of the present disclosure can be written in any of one or more programming languages, including object oriented programming languages such as Java, Smalltalk, C++, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0120] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may

[0121] The modules described in the embodiments of the present disclosure can be implemented in the form of software, or can be implemented in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0122] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0123] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0124] The above description is merely exemplary of preferred embodiments of the present disclosure and of the application of the principles thereof. The scope of the disclosure is not limited to the specific embodiments described herein, but only by the claims that follow, and their equivalents. For example, the features described above can be interchanged among embodiments with similar functionality. It is therefore contemplated to this disclosure that certain features can be combined in any combination. It is therefore intended that the disclosure be construed as including all such combinations.

[0125] Further, while operations are depicted in a particular order, this should not be understood as requiring such an order, unless otherwise specifically stated, e.g., an order is essential for the functions of the embodiment. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, the various steps can be distributed in time, and at times one certain step can be executed repeatedly with momentary pauses. Also, different logic or processes can be employed, and not all of the described logic or processes can be employed. Furthermore, unless specifically stated, the processes and / or blocks do not have to be executed in the order described. Other steps can be utilized, and not all of the described steps can be utilized. Also, some of the described steps might never occur.

[0126] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With respect to the devices in the above-described embodiments, in which various modules perform operations, the specific manner in which the various modules perform the operations has been described in detail in the embodiments relating to the method. Here, no detailed explanation will be given.

Claims

1. A cloud disk token management method for edge computing, characterized in that, The cloud disk token management method includes: Tokens are filled into a storage bucket of a cloud disk based on a preset fill rate. The cloud disk is deployed on an edge node. The token configuration information configured by the user for the storage bucket includes a first preset quantity, a second preset quantity, and a second preset duration. The first preset quantity represents the number of tokens filled into the storage bucket per unit duration. The second preset quantity represents the upper limit of token consumption of the storage bucket per unit duration during a performance burst. The second preset duration represents the upper limit of token consumption of the storage bucket per unit duration adjusted from the first preset quantity to the second preset quantity. The second preset quantity is greater than the first preset quantity. The preset fill rate is determined based on the first preset quantity. If the remaining number of tokens in the storage bucket is greater than or equal to the second preset number and the number of tokens required for the first data transmission request sent by the user is greater than the first preset number, the upper limit of token consumption in the storage bucket within the unit time period will be adjusted from the first preset number to the second preset number. If the duration for which the upper limit of token consumption in the storage bucket is adjusted from the first preset number to the second preset number within the unit time is greater than or equal to the second preset time, or if the remaining number of tokens in the storage bucket is less than the second preset number, the upper limit of token consumption in the storage bucket within the unit time will be adjusted from the second preset number to the first preset number. The data structure of the storage bucket includes a first data field for representing the remaining number of tokens, a second data field for recording the maximum number of tokens in the storage bucket, a third data field for representing the number of tokens that can be taken away from the storage bucket within the unit time period, and a fourth data field for representing the total number of tokens that can be filled in the storage bucket. The maximum number of tokens is the second preset number if the second preset number is set, otherwise it is the first preset number. The cloud disk token management method also includes: The storage bucket is initialized based on the token configuration information. The field value of the second data field is the second preset quantity, the field value of the fourth data field is the product of the second preset quantity and the second preset duration, the initial value of the first data field is the total number of fillable tokens, and the initial value of the third data field is the maximum number of tokens. During the process of filling the storage bucket of the cloud disk with tokens based on a preset filling rate, the field values ​​of the first data field and the third data field are updated; Wherein, the upper limit of the first data field is the total number that can be filled, the total number that can be filled is the product of the second preset number and the second preset duration, and the upper limit of the third data field is the smaller of the updated remaining number of tokens and the preset upper limit value. 2.The cloud disk token management method for edge computing according to claim 1, characterized in that, The method of filling the storage bucket of the cloud disk with tokens based on a preset fill rate includes: For each time interval within the unit duration, fill the storage bucket with the number of tokens corresponding to the time interval. The time interval has a length that is the greater of a length obtained by dividing the unit length by the first preset number and a first preset length. 3.The cloud disk token management method for edge computing according to claim 2, characterized in that, The filling number corresponding to the time interval is determined in the following manner: The first preset number is divided by the total number of all the time intervals to obtain a first filling number; In the case where the first filling number is an integer, the first filling number is determined as the filling number corresponding to each time interval; In the case where the first filling number is not an integer, for a target time interval among all the time intervals, a second filling number is obtained by dividing the interval serial number of the target time interval by the total number and multiplying the first preset number, a third filling number is obtained by dividing the interval serial number of a previous time interval of the target time interval by the total number and multiplying the first preset number, and a difference value obtained by subtracting the value obtained by rounding the third filling number from the value obtained by rounding the second filling number is taken as the filling number corresponding to the target time interval. 4.The cloud disk token management method for edge computing according to claim 1, characterized in that, The cloud disk token management method further comprises: In the case where the first token number required by a second data transmission request in the request waiting queue of the storage bucket is less than or equal to the updated available number, the first token number of tokens is allocated to the second data transmission request, and then the second data transmission request is sent to the cloud disk for data transmission processing. 5.The cloud disk token management method for edge computing according to any one of claims 1-4, characterized in that, The cloud disk token management method further comprises: intercepting a third data transmission request sent by the user; In the case where the request waiting queue of the storage bucket is not empty, the third data transmission request is stored in the request waiting queue; In the case where the request waiting queue of the storage bucket is empty and the second token number required by the third data transmission request is greater than the available number of tokens that can be taken out of the storage bucket within the unit length of time, the third data transmission request is stored in the request waiting queue; In the case where the request waiting queue of the storage bucket is empty and the second token number is less than or equal to the available number of tokens that can be taken out of the storage bucket within the unit length of time, the second token number of tokens is allocated to the third data transmission request, and then the third data transmission request is sent to the cloud disk for data transmission processing. 6.A cloud disk token management apparatus for edge computing, characterized in that, The cloud disk token management device comprises: a filling module configured to fill tokens into a storage bucket of a cloud disk based on a preset filling rate, the cloud disk being deployed on an edge node, and token configuration information configured by a user for the storage bucket comprising a first preset number, a second preset number, and a second preset length of time, the first preset number representing a number of tokens filled into the storage bucket within a unit length of time, the second preset number representing an upper limit number of token consumption of the storage bucket within the unit length of time during a performance burst, and the second preset length of time representing an upper limit length of time for adjusting the upper limit number of token consumption of the storage bucket within the unit length of time from the first preset number to the second preset number, the second preset number being greater than the first preset number, and the preset filling rate being determined based on the first preset number. The adjusting module is configured to adjust the upper limit of the token consumption of the storage bucket in the unit time length from the first preset number to the second preset number if the remaining number of tokens of the storage bucket is greater than or equal to the second preset number and the number of tokens required by the first data transmission request sent by the user is greater than the first preset number; and adjust the upper limit of the token consumption of the storage bucket in the unit time length from the second preset number to the first preset number if the time length during which the upper limit of the token consumption of the storage bucket in the unit time length is adjusted from the first preset number to the second preset number is greater than or equal to the second preset time length or the remaining number of tokens of the storage bucket is less than the second preset number. The data structure of the storage bucket includes a first data field for representing the remaining number of tokens, a second data field for recording the maximum number of tokens of the storage bucket, a third data field for representing the number of tokens that can be taken away from the storage bucket in the unit time length, and a fourth data field for representing the total number of tokens that can be filled in the storage bucket, wherein the maximum number of tokens is the second preset number if the second preset number is set, and is the first preset number otherwise. The updating module is configured to initialize the storage bucket based on the token configuration information, wherein the field value of the second data field is the second preset number, the field value of the fourth data field is the product of the second preset number and the second preset time length, the initial value of the first data field is the total number of tokens that can be filled, and the initial value of the third data field is the maximum number of tokens; and update the field values of the first data field and the third data field during the process of filling tokens in the storage bucket of the cloud disk based on the preset filling rate. The upper limit of the first data field is the total number of tokens that can be filled, which is the product of the second preset number and the second preset time length, and the upper limit of the third data field is the smaller one of the updated remaining number of tokens and a preset upper limit.

7. A computer readable medium having stored thereon a computer program, characterized in that The computer program is executed by the processing device to implement the steps of the method of any one of claims 1-5.

8. An electronic device, comprising: The computer program is executed by the processing device to implement the steps of the method of any one of claims 1-5. The computer program is executed by the processing device to implement the steps of the method of any one of claims 1-5. The computer program is executed by the processing device to implement the steps of the method of any one of claims 1-5.

9. A computer program product comprising a computer program, characterized in that, ​

Citation Information

Patent Citations

  • Method and device for adjusting cloud disk resource configuration

    CN114760327A