Flow control method, device, storage medium and server

By configuring flow control quotas for users and storage space at the same time on the data access side, and performing multi-level control based on traffic data, the problem of inaccurate flow control in distributed systems is solved, and more stable traffic management and system performance are achieved.

CN114745338BActive Publication Date: 2024-09-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210326272.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-09-06
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

Inaccurate traffic control in existing distributed systems results in system instability, inability to effectively manage user and storage space traffic, and affects user experience and overall system performance.

Method used

By simultaneously configuring user flow control quotas and storage space flow control quotas on the data access end, and performing multi-level traffic control based on traffic data and quotas, it ensures traffic balance at the user level and storage space level, and achieves unified flow control on the data access end.

Benefits of technology

It achieves more precise and stable traffic control, avoids the impact of abnormal traffic on the system, and improves user experience and overall system availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114745338B
    Figure CN114745338B
Patent Text Reader

Abstract

The present application discloses a flow control method, device, storage medium and server, which respond to data access requests, obtain the flow control quotas of each storage space and the user flow control quota corresponding to the data access terminal; control each service node to record the generated flow data of each storage space and the user flow data respectively; control each service node to perform flow control on the data access terminal according to the flow data of each storage space, the user flow data, the flow control quotas of each storage space and the user flow control quota. In the present application, flow control quotas are configured for both the user level and each storage space level of the data access terminal, and when flow control is performed on the data access terminal, the flow generated by each storage space and all the flow generated under the user account are considered at the same time, and compared with the corresponding flow control quotas, the data access terminal can finally be subjected to unified flow control at multiple levels to achieve more accurate and stable flow control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a flow control method, device, storage medium and server. Background Art

[0002] With the development of modern information technology, the data access needs of various Internet users are also growing. The storage capacity and read-write capabilities of local servers are poor, and it is not easy to expand and optimize. In order to meet the data access needs of users and enhance the overall stability of data reading and writing modules, distributed system services are gradually applied to people's daily lives. Distributed systems simultaneously connect multiple service nodes to respond to the access needs of multiple users. When the data traffic of some users is too large, it may affect the normal data operations of other users and even affect the normal use of the distributed system. Summary of the invention

[0003] The present application provides a flow control method, device, storage medium and server, which can solve the technical problems of inaccurate flow control and unstable system in related technologies.

[0004] In a first aspect, an embodiment of the present application provides a flow control method, which is applied to a data accessed end, wherein the data accessed end is provided with at least two storage spaces corresponding to a data access end, and the method includes:

[0005] In response to a data access request, at least one service node is allocated for the data access request, and a storage space flow control quota and a user flow control quota of each storage space corresponding to the data access end are obtained;

[0006] Control each service node to respectively record each storage space flow data and user flow data generated when the data access end performs data access based on the data access request;

[0007] Control each service node to perform flow control on the data access end according to each storage space flow data, the user flow data, each storage space flow control quota and the user flow control quota.

[0008] In a second aspect, an embodiment of the present application provides a flow control device, which is applied to a data accessed end, wherein the data accessed end is provided with at least two storage spaces corresponding to the data access end, and the device includes:

[0009] A request response module, used to respond to a data access request, allocate at least one service node for the data access request, and obtain a storage space flow control quota and a user flow control quota for each storage space corresponding to the data access end;

[0010] A traffic recording module, used to control each service node to respectively record the storage space traffic data and user traffic data generated when the data access end performs data access based on the data access request;

[0011] The flow control module is used to control each service node to perform flow control on the data access end according to each storage space flow data, the user flow data, each storage space flow control quota and the user flow control quota.

[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.

[0013] In a fourth aspect, an embodiment of the present application provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the above method.

[0014] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0015] The present application provides a flow control method, which responds to a data access request, allocates at least one service node for the data access request, and obtains the storage space flow control quota and user flow control quota of each storage space corresponding to the data access terminal; controls each service node to respectively record the storage space flow data and user flow data generated when the data access terminal performs data access based on the data access request; controls each service node to perform flow control on the data access terminal according to the storage space flow data, user flow data, each storage space flow control quota and user flow control quota. Because in the present application, corresponding flow control quotas are configured for both the user level and each storage space level of the data access terminal, and when the data access terminal is flow controlled, the flow generated by each storage space and all the flow generated under the user account are considered at the same time, and compared with their corresponding flow control quotas, so that the user-level flow and the flow of each storage space are controlled at the same time, and finally the data access terminal can be subjected to unified flow control at multiple levels to achieve more accurate and stable flow control. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1An exemplary system architecture diagram of a flow control method provided in an embodiment of the present application;

[0018] Figure 2 A flow chart of a flow control method provided in an embodiment of the present application;

[0019] Figure 3 A flow chart of a flow control method provided in an embodiment of the present application;

[0020] Figure 4 A flow chart of a flow control method provided in an embodiment of the present application;

[0021] Figure 5 A flow chart of a flow control method provided in an embodiment of the present application;

[0022] Figure 6 A control flow chart of a distributed cache component provided in an embodiment of the present application;

[0023] Figure 7 A flow control structure diagram of an upload interface provided in an embodiment of the present application;

[0024] Figure 8 A schematic diagram of bandwidth data flow control provided in an embodiment of the present application;

[0025] Fig. 9 A structural block diagram of a flow control device provided in an embodiment of the present application;

[0026] Fig.10 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0028] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0029] With the vigorous development of Internet information technology, the data access needs of enterprises and individual users are growing. Among them, the demand for data access is the largest, and cloud storage service is a data access service that has emerged with the demand for massive storage. That is, data is stored on multiple virtual servers usually hosted by a third party, rather than dedicated servers, to meet the needs of data storage. It has the characteristics of simplicity, reliability, massive security, etc. From the perspective of cloud storage services, although cloud storage services provide users with the storage capacity of massive data, the read and write capabilities of the system are always quantifiable and limited, and it is not easy to expand and optimize. Therefore, in order to ensure the overall stability of cloud storage services and prevent the abnormal traffic of some users from affecting other users, or even triggering a chain reaction that affects the entire system, it is necessary to control the abnormal traffic of users according to the processing capacity of the system. Traffic control is a common basic concept in network transmission, which is mainly used to adjust the speed at which the sender transmits data. Similarly, in the cloud storage service system, the access traffic is restricted and shaped by the traffic control method to ensure that the system provides the maximum service capability. Generally, the system will handle abnormal traffic by refusing to serve access that exceeds expectations.

[0030] Among the common current limiting methods, they can be roughly divided into single-machine current limiting and distributed current limiting. Single-machine current limiting means that each service node is independent of each other in terms of current limiting strategy and does not affect each other. Each service node may have a different current limiting strategy; while distributed current limiting adopts a scalable system structure and uses multiple storage servers to share the computing load, which solves the bottleneck problem of unstable overall system traffic in traditional single-machine current limiting and improves the reliability, availability and scalability of the current limiting system. It introduces a centralized cache middleware that can sense the traffic changes of each service node in the system and form a unified current limiting service for the entire system. However, for time-sensitive current limiting strategies, it is necessary to consider the time consistency problem between the service node and the cache middleware, and it is also necessary to consider the timeout of access to the cache middleware.

[0031] In cloud storage systems, a user's account generally has multiple storage spaces. From the perspective of the current main distributed flow limiting methods, the flow limiting services in each distributed system usually configure flow control quotas for each user's storage space, or directly allocate a total quota shared by all storage spaces to the user. However, the user's specific use of storage space and flow control quotas cannot be predicted in the system. Therefore, configuring flow control quotas based solely on storage space level or user level will make the flow limiting strategy unsuitable for a large number of users with diverse traffic usage, and the overall system traffic cannot be accurately controlled, which in turn leads to user usage obstruction and system instability.

[0032] Therefore, an embodiment of the present application provides a flow control method, which configures the user flow control quota of the data access end and the flow control quota of each storage space at the same time, and determines the flow control strategy for the data access end according to whether the flow data of the storage space meets the storage space flow control quota and whether the total flow data used by the user meets the user flow control quota. This can solve the above-mentioned technical problems of inaccurate flow control and overall system instability.

[0033] See also Figure 1 , Figure 1 An exemplary system architecture diagram of a flow control method provided in an embodiment of the present application.

[0034] like Figure 1 As shown, the system architecture may include a data access terminal 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the data access terminal 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example: the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.

[0035] The data access terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the data access terminal 101 can interact with the server 103 through the network 102, and then receive messages or data sent by other users to the server 103. The data access terminal 101 can be hardware or software. When the data access terminal 101 is hardware, it can be various electronic devices, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the data access terminal 101 is software, it can be installed in the above-mentioned electronic devices, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.

[0036] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or it may be implemented as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.

[0037] It should be understood that Figure 1The numbers of data access terminals, networks, and servers are only for illustration purposes, and any number of data access terminals, networks, and servers may be used as required.

[0038] See also Figure 2 , Figure 2 A flow chart of a flow control method provided for an embodiment of the present application. The execution subject of the embodiment of the present application can be a server that executes the flow control method, a processor in the server that executes the flow control method, or a flow control service in the server that executes the flow control method. For the convenience of description, the specific execution process of the flow control method is introduced below by taking the execution subject being a processor in the server as an example.

[0039] like Figure 2 As shown, the flow control method is applied to the data accessed end, and the data accessed end is provided with at least two storage spaces corresponding to the data access end. The flow control method may at least include:

[0040] S201. Respond to a data access request, allocate at least one service node for the data access request, and obtain a storage space flow control quota and a user flow control quota of each storage space corresponding to a data access terminal.

[0041] Optionally, when a user meets his needs through network services containing a large amount of data information such as websites, storage services, resource databases, etc. on the Internet, the user end, as the data access end, will send a large number of data access requests to the server of the target service. When these data access requests reach the data accessed end, corresponding traffic will be generated. In order to ensure the stable operation of the data accessed end, the generated traffic needs to be controlled so that it does not affect the load capacity and computing power of the data accessed end.

[0042] Optionally, when controlling the user's traffic usage, the available flow control quota can be configured for the user in advance. In order to meet the user's usage needs, there are usually at least two storage spaces under the user level of a data access terminal, and each storage space can have a corresponding traffic usage quota. Then, when configuring the flow control quota, if the flow control quota is directly configured for each storage space of the data access terminal, then each storage space can only use its own flow control quota and cannot use a larger proportion of the quota when the traffic of the remaining storage spaces is small. If the quota of each storage space is small, the user's usage needs cannot be met. When the quota of each storage space is large, the user's overall flow control quota is high, which affects the system. It is impossible to predict the user's usage of each storage space in advance, and it is not convenient to configure the most appropriate quota for each storage space.

[0043] Optionally, based on this, considering that the flow control quota that can be used by all storage spaces of a user is also limited, the flow control quota at the user level can be configured while the flow control quota for each storage space is configured, so that the flow of the data sender can be controlled from the two levels of each storage space and the user, thereby realizing the sharing of the flow control quota of each storage space under the same user. Before performing flow control, the flow control quota needs to be configured first. The user flow control quota of all users and the flow control quota of each storage space can be configured in the service and registration components.

[0044] Furthermore, when configuring the user flow control quota and each storage space flow control quota, since there is a user flow control quota to limit the overall flow of the data access end, the flow control quota of each storage space can be appropriately larger. Specifically, the user flow control quota can be configured to be larger than any storage space flow control quota, and the user flow control quota can be configured to be smaller than the sum of all storage space flow control quotas. For example, when the data access end corresponds to storage space A and storage space B, the user flow control quota can be configured to be 10, the storage space A flow control quota can be configured to be 5, and the storage space B flow control quota can be configured to be 6. Then, when the data access request occupies 5 flow control quotas in storage space A, only 5 flow control quotas in storage space B can be used at this time. After comparing the generated flow based on the storage space flow control quota, the overall generated flow is compared based on the user flow control quota, thereby realizing flow control at two levels of storage space and user. It should be noted that the numerical values ​​used for example in the example only represent the size relationship of the corresponding quotas, and do not represent the actual meaning and actual unit.

[0045] Optionally, when the system is used to provide services to users, users can obtain their own flow control quota for using the service by registering an account, and for ease of configuration, the initial flow control quota configured under each user account is the same, and users can modify the flow control quota under their account through operations such as upgrading to obtain a flow control quota that meets their usage needs, where the flow control quota obtained through user operations has a higher usage priority than the initial flow control quota configured by default.

[0046] Optionally, after configuring the storage space flow control quota and user flow control quota of all users in the service and registration component, in order to facilitate the data access terminal to directly control the flow of the data access terminal based on the flow control quota when receiving the data access request, the data access terminal can be set to obtain and save the storage space flow control quota and user flow control quota corresponding to all users from the service and registration component every preset period. In a feasible embodiment, the S3 service (Simple Storage Service, Simple Storage Service, S3) component can be selected as the data access terminal. The S3 service component can provide access services for users and is compatible with the S3 protocol interface. Users can use the SDK of the S3 protocol to conveniently perform data storage operations.

[0047] For ease of description, see Figure 3 , Figure 3 A flow chart of a flow control method provided in an embodiment of the present application. Figure 3 As shown, the process structure diagram includes a data access terminal 310, a service and registration component 320, an S3 service component 330, a storage space flow control module 340, and a user flow control module 350.

[0048] Among them, the S3 service component 330 periodically obtains the storage space flow control quota and user flow control quota corresponding to all users from the service and registration component 320 and saves them in the local memory of the S3 service component 330. Then, when the data access end 310 sends a data access request to the data accessed end, that is, the S3 service component 330, the S3 service component 330 first responds to the data access request, and then performs the storage space flow control corresponding to the data access end 310 through the storage space flow control module 340, and performs the user flow control corresponding to the data access end 310 through the user flow control module 350.

[0049] Optionally, in order to serve multiple requests from users at the same time, multiple service nodes are set in the data access terminal, and at least one service node can be allocated to the data access request. The more service nodes, the more data access requests the data access terminal can respond to at the same time, and the number of service nodes can be expanded to facilitate adjustment according to the user volume and request volume. Therefore, the available service nodes can be found first, and all data access requests of the same data access terminal can be allocated to each service node. At the same time, according to the data access terminal identifier corresponding to the data access request, the data access terminal can directly obtain the storage space flow control quota and user flow control quota corresponding to the data access terminal from the local, so as to facilitate the subsequent flow control of the data access terminal based on the flow control quota and the generated flow.

[0050] It should be noted that for all service nodes, extremely small data packets will be sent to each service node as heartbeat signals at regular intervals to request each service node to return a heartbeat when it is able to work normally. If the time it takes for a service node to return a heartbeat exceeds a preset threshold or fails to return a heartbeat, it is considered that the service node is unable to continue responding to data access requests, and the service node is marked as an unavailable service node in the service node directory to avoid continuing to distribute data access requests to it, resulting in the data access request being unable to execute normally.

[0051] S202: Control each service node to respectively record each storage space flow data and user flow data generated when the data access end performs data access based on the data access request.

[0052] Optionally, when each service node receives a data access request, it can calculate the storage space traffic data and user traffic data generated when the data access terminal performs data access based on the data access request based on the multiple attributes corresponding to the data access request, and record each traffic data separately, wherein the sum of all storage space traffic data is equal to the user traffic data. Each service node can record traffic data and traffic data-related attributes, such as the storage space, interface, type, etc. corresponding to the traffic data, which makes it easier for each service node to judge various traffic situations based on the multiple attributes of the traffic data, and implement different traffic control strategies for different situations.

[0053] Optionally, in order to perform flow control, after each service node records the flow data of each storage space and the user flow data respectively, it is also necessary to update the corresponding flow control quota based on the flow data, update the flow control quota to the flow control balance using the corresponding data flow, and use the flow control balance for the processing of subsequent access requests in this round of flow control process.

[0054] Furthermore, in order to facilitate subsequent traffic control, each service node can directly judge the traffic control conditions based on the traffic data generated by the node, and can also judge the traffic control conditions based on the traffic data recorded by all service nodes. At this time, a middleware can be used to record the traffic data of all service nodes. Each service node obtains unified traffic data of all service nodes, which is convenient for subsequent analysis of the traffic situation of the data access end based on the overall traffic data.

[0055] S203: Control each service node to perform flow control on the data access end according to each storage space flow data, user flow data, each storage space flow control quota and user flow control quota.

[0056] Optionally, after controlling each service node to record the generated storage space traffic data and user traffic data respectively, it can determine whether to perform traffic control on the data access end based on the pre-acquired storage space flow control quota and user flow control quota when judging the current traffic usage.

[0057] Specifically, each storage space has a corresponding flow control quota and the flow data generated by this data access request, and the user has a corresponding flow control quota and the flow data generated by this data access request. Then, when making a flow control judgment, flow control conditions can be formulated for each storage space and user respectively. When the storage space flow control quota is not sufficient to support the corresponding storage space flow data, it is considered that the first flow control condition is met, and each service node is controlled to perform the first flow control on the data access terminal; when the flow data of each storage space and its corresponding storage space flow control quota do not meet the first flow control condition, and the user flow control quota is not sufficient to support the user flow data, it is considered that the user flow data and the user flow control quota meet the second flow control condition, and each service node is controlled to perform the second flow control on the data access terminal. In this way, the flow control of each storage space level is formulated as the first flow control, and the flow control of the user level is formulated as the second flow control when the first flow control of each storage space level is not triggered, so as to realize the sharing and unified control of all user flow control quotas under each storage space, and such flow control results will be more accurate and stable, which not only enhances the system stability, but also improves the user's service experience.

[0058] In an embodiment of the present application, a flow control method is provided, which responds to a data access request, allocates at least one service node for the data access request, and obtains the flow control quotas of each storage space and the user flow control quota corresponding to the data access terminal; controls each service node to respectively record the flow data of each storage space and the user flow data generated when the data access terminal performs data access based on the data access request; controls each service node to perform flow control on the data access terminal according to the flow data of each storage space, the user flow data, the flow control quotas of each storage space and the user flow control quota. Because in an embodiment of the present application, corresponding flow control quotas are configured for both the user level and each storage space level of the data access terminal, and when the flow control is performed on the data access terminal, the flow generated by each storage space and all the flow generated under the user account are considered at the same time, and compared with their corresponding flow control quotas, so that the flow of the user level and the flow of each storage space are controlled at the same time, and finally the data access terminal can be subjected to unified flow control at multiple levels, so as to achieve more accurate and stable flow control.

[0059] See also Figure 4 , Figure 4 A flow chart of a flow control method provided in an embodiment of the present application.

[0060] like Figure 4 As shown, the flow control method may at least include:

[0061] S401, responding to a data access request, allocating at least one service node for the data access request, and obtaining each storage space flow control quota and user flow control quota corresponding to the data access end.

[0062] Regarding step S401, please refer to the detailed description in step S201, which will not be repeated here.

[0063] S402: Allocate the storage space concurrency quota and user concurrency quota corresponding to the data access end to each service node, and obtain the storage space node concurrency quota and user node concurrency quota corresponding to each service node.

[0064] Optionally, from the introduction of the above embodiments, it can be known that in order to respond to as many data access requests as possible at the same time, multiple service nodes are allocated to the data access requests, and in order to balance the processing pressure of each service node, data access requests from the same data access end can be evenly distributed to the service nodes, ensuring that each service node receives the same number of data access requests, thereby ensuring that the processing pressure of each service node is stable.

[0065] Optionally, there are multiple types of traffic generated by data access requests, including concurrent traffic. Multiple data access requests issued by the same data access terminal at the same time are concurrent requests. When the data access requests are evenly distributed to each service node, the same number of multiple concurrent data access requests will be made simultaneously on each service node. In order to ensure that each service node can normally process the received concurrent data access requests and does not affect the service nodes from continuing to respond to other data access requests, when configuring the user's storage space flow control quota and user flow control quota, the storage space concurrency quota can be specifically configured in the storage space flow control quota, and the user concurrency quota can be specifically configured in the user flow control quota, so that each service node can judge whether the concurrent traffic of the received data access requests meets normal working conditions based on the storage space concurrency quota and the user concurrency quota.

[0066] Furthermore, since concurrent data access requests are evenly distributed among each service node, the concurrent quotas of each storage space and user concurrent quotas corresponding to the data access end can also be evenly distributed among each service node to obtain the concurrent quotas of each storage space node and the concurrent quotas of each user node corresponding to each service node. In this way, each service node can directly judge the traffic situation of the data access request based on the concurrent traffic generated by this node and the flow control quota corresponding to this node.

[0067] S403, controlling each service node to respectively record the concurrent data of each storage space and the concurrent data of the user generated when the data access end performs data access based on the data access request.

[0068] Optionally, after each service node obtains the corresponding concurrent quota of each storage space node and the concurrent quota of each user node, it can control each service node to separately record the generated concurrent data of each storage space and the concurrent data of each user when receiving a concurrent data access request allocated to this node.

[0069] Optionally, since most data access requests will contain multiple threads, for example, generally there are three threads to modify the value of a code: read, modify, and write back. During the processing of these threads, threads of other requests may suddenly occupy resources, resulting in the original request being unable to obtain the correct result. At this time, the concurrent data of each data access request can be calculated based on atomic variables. Atomic variables can turn the reading, modification, and writing back of a variable value into an uninterruptible operation. Based on this, atomic operations can be used to ensure that only one thread operates it for a certain request. The thread will not be switched during the atomic operation. The thread switching is either before the atomic operation or after the atomic operation is completed. In this way, the concurrent data in each service node is an integer value, and there will be no intermediate processing state, thereby avoiding resource competition when the resources of each service node are not interoperable, and ultimately achieving stable concurrent resource acquisition and release.

[0070] S404. When the concurrent data of any storage space is greater than the concurrent quota of its corresponding storage space node, each service node is controlled to reject and return the data access request to the data access end; when the concurrent data of each storage space is less than or equal to the concurrent quota of its corresponding storage space node, and the concurrent data of any user is greater than the concurrent quota of its corresponding user node, each service node is controlled to reject and return the data access request to the data access end.

[0071] Optionally, after each service node obtains the corresponding concurrency quota of each storage space node and the concurrency quota of each user node, and records the generated storage space concurrency data and user concurrency data, each service node can be controlled to judge the traffic situation at the storage space level and the traffic situation at the user level based on the storage space concurrency data, storage space node concurrency quota, user concurrency data, and user node concurrency quota corresponding to the node.

[0072] Optionally, when the concurrent data recorded by each service node is greater than the corresponding concurrent quota, it is considered that the concurrent number of the current user's data access request exceeds the user's quota, and each service node will implement flow control on the data access terminal. Specifically, when the concurrent data of any storage space is greater than the concurrent quota of its corresponding storage space node, each service node is controlled to reject and return the data access request to the data access terminal; when the concurrent data of each storage space is less than or equal to the concurrent quota of its corresponding storage space node, and the concurrent data of any user is greater than the concurrent quota of its corresponding user node, each service node is controlled to reject and return the data access request to the data access terminal. In this way, the concurrent flow of the data access terminal can be accurately controlled from each service node, ensuring the stability of the high concurrency of the system.

[0073] It can be understood that when the concurrent traffic information generated by the data access request of the data access end triggers concurrent traffic control, when each service node rejects and returns the data access request to the data access end, it may no longer respond to the data access request and perform subsequent processing, but instead generate corresponding rejection information, and send the rejection information, the access request, and the data carried by the access request to the data access end. The rejection information can be used to prompt the data access end to pay attention to the traffic control situation, so as to facilitate the data access end to adjust the data access request and subsequent request operations.

[0074] In an embodiment of the present application, a flow control method is provided, in which data access requests are first evenly distributed to each service node, and each storage space concurrency quota and user concurrency quota are evenly distributed to each service node. Each service node acquires and releases the concurrent resources of the node based on the concurrent data corresponding to the data access request received by the node and the concurrency quota allocated to the node, based on the calculation method of atomic variables, thereby realizing precise concurrent flow control based on two levels of storage space level and user level, ensuring the overall high concurrency availability of the system, and enhancing the stability of system operation.

[0075] See also Figure 5 , Figure 5 A flow chart of a flow control method provided in an embodiment of the present application.

[0076] like Figure 5 As shown, the flow control method may at least include:

[0077] S501, responding to a data access request, allocating at least one service node for the data access request, and obtaining each storage space flow control quota and user flow control quota corresponding to the data access end.

[0078] Regarding step S501, please refer to the detailed description in step S201, which will not be repeated here.

[0079] S502: within a preset time window, control each service node to respectively record each storage space bandwidth data and user bandwidth data generated when the data access terminal performs data access based on the data access request.

[0080] Optionally, there are many types of traffic generated by data access requests, including bandwidth traffic, which is the "maximum data rate" that can be transmitted from one point in the network to another point in unit time, that is, the amount of data that can be transmitted in unit time. Then the bandwidth traffic size of the data access request of the data access end will directly affect the processing time of the request. Then, too large bandwidth will cause more processing resources to be occupied for a longer period of time, and too small bandwidth cannot meet the usage requirements of the data access end. Therefore, when configuring the flow control quota of each storage space of the data access end, the corresponding bandwidth quota of each storage space can be specifically configured, and when configuring the user flow control quota, the user bandwidth quota can be specifically configured to consider the bandwidth traffic generated by the data access request and control abnormal bandwidth traffic.

[0081] Optionally, bandwidth flow is not directly related to the number of requests. Calculating bandwidth flow at each time point when a request arrives will result in very frequent calculations. Therefore, the calculation of bandwidth flow is generally performed within a preset time window, which allows the bandwidth quota within the time window to be allocated and shared by data access requests. Furthermore, within the preset time window, each service node can be controlled to separately record the storage space bandwidth data and user bandwidth data generated when the data access terminal accesses data based on the data access request. The setting of the preset time window can be specifically set according to the data access terminal and the volume of the data access request. For example, 10 seconds can be used as a time window, and this application does not limit this.

[0082] Furthermore, since the bandwidth traffic data generated by different data access requests will be different, if each service node directly analyzes the bandwidth traffic of the node, it will lead to incomplete or chaotic utilization of the bandwidth resources of the data access terminal. Therefore, when controlling each service node to record bandwidth data, a distributed cache component can be used. The distributed cache component can support all service nodes to record the traffic data generated by themselves into the distributed cache component, and perform unified calculations on such traffic data to achieve an overall analysis of the traffic data generated by all data access requests received in all service nodes. It should be noted that the distributed cache component does not have the storage space bandwidth quotas and user bandwidth quotas of all users. Therefore, when each service node first records the bandwidth traffic generated by a data access terminal, it will store the storage space bandwidth quotas and user bandwidth quotas corresponding to the data access terminal in the distributed cache component, so that the distributed cache component can record and compare the used traffic quotas.

[0083] For ease of description, see Figure 6 , Figure 6 A control flow chart of a distributed cache component provided in an embodiment of the present application. Figure 6 As shown, each service node 610 records the bandwidth data of each storage space and the user bandwidth data in the distributed cache component 620, and then each service node 610 can obtain the bandwidth data generated by the data access requests received by the other service nodes in the distributed cache component 620, so that each service node 610 can subsequently control the flow of the data access end according to the overall bandwidth usage of all data access requests.

[0084] Optionally, there may be a variety of specific options for the distributed cache component. In one feasible implementation, Redis (Remote Dictionary Server) may be selected as a distributed cache component for application. Redis supports master-slave synchronization, and data may be synchronized from the master server to any number of slave servers, which may improve website throughput and website operating efficiency to reduce pressure on database access.

[0085] In addition, the traffic generated by data access requests that has a greater impact on the system computing pressure also includes the number of requests per second (Query Per Second, QPS), which is a measure of the amount of traffic processed by a specific query server within a specified time. Therefore, the QPS traffic generated by data access requests also needs to be counted for all data access requests within a preset time period in order to achieve a better measurement effect. Based on this, you can refer to the implementation method of bandwidth quotas and bandwidth data recording. When configuring the flow control quota of each storage space at the data access end, you can specifically configure the corresponding request quota per second for each storage space, and when configuring the user flow control quota, specifically configure the user request quota per second, and control each service node to store the request quota per second for each storage space and the request quota per second for the user in the distributed cache component, and record the generated request data per second for each storage space and the request data per second for the user in the distributed cache component.

[0086] S503: Control each service node to deduct each storage space bandwidth quota based on each storage space bandwidth data to obtain each storage space bandwidth surplus, and deduct the user bandwidth quota based on each user bandwidth data to obtain the user bandwidth surplus.

[0087] Optionally, after each service node records the storage space bandwidth data and the user bandwidth data to the distributed cache component respectively, each service node can be controlled to deduct each storage space bandwidth quota based on the storage space bandwidth data stored in the distributed cache component to obtain the remaining amount of each storage space bandwidth, and use the remaining amount of each storage space bandwidth as the basis for the next service node deduction within the current time window; and each service node can be controlled to deduct the user bandwidth quota based on the user bandwidth data to obtain the remaining amount of the user bandwidth, and use the remaining amount of the user bandwidth as the basis for the next service node deduction within the current time window.

[0088] Optionally, it can be known from the above embodiments that the recording of request data per second for data access requests by each service node is the same as the bandwidth data recording process. Then, similarly, each service node can be controlled to deduct the request quota per second for each storage space based on the request data per second for each storage space stored in the distributed cache component to obtain the remaining request amount per second for each storage space, and use the remaining request amount per second for each storage space as the basis for the next service node deduction within the current time window; and each service node can be controlled to deduct the user's request quota per second based on the user's request data per second to obtain the remaining request amount per second for the user, and use the remaining request amount per second for the user as the basis for the next service node deduction within the current time window.

[0089] Furthermore, every time a service node records and deducts traffic data in a distributed cache component, it will initiate access and requests to the distributed cache component. In order to reduce the access pressure on the distributed cache component, a portion of the storage space flow control quota and user flow control quota can be pre-fetched from the distributed cache component to the local memory according to the data access end identifier in advance. The traffic data generated by the service node will give priority to the pre-fetched local flow control quota resources. After the local pre-fetched flow control quota resources are used up, the traffic data will be recorded in the distributed cache component to reduce the access pressure and processing pressure of the distributed cache component. When the distributed cache component responds timeout due to uncontrollable reasons such as network and traffic, the storage space flow control quota and user flow control quota of the data access end will be evenly distributed to each service node, and each service node will perform single-machine flow limiting and control the flow according to the traffic data and quota of the node.

[0090] Specifically, when the data access end initiates a data access request, it performs specific access processing by calling the service node as an interface. Since the load capacity of the data accessed end is limited, the service node serves as an interface for receiving requests from the data accessed end and generates a large amount of traffic. In order to ensure that the traffic entering the service node does not cause excessive system pressure and drag down the overall system of the data accessed end, it is also necessary to control the traffic of various interfaces used by users. At the interface level, interfaces with different functions include multiple types of interfaces. For example, different functional interfaces include upload interfaces, download interfaces, etc., among which upload interfaces include different categories of upload interfaces such as ordinary upload interfaces, copy upload interfaces, shard upload interfaces, form upload interfaces, etc., which correspond to different upload methods.

[0091] Optionally, to facilitate the description of this application, the upload function interface and various upload method interfaces are used for explanation, and the current limiting methods of other function interfaces are similar and will not be repeated. In the usual upload interface speed limit, quota speed limits can only be set for different types of upload interfaces separately, and quota sharing under the unified functional interface cannot be achieved. Therefore, when configuring flow control quotas, you can configure specific storage space interface quotas and user interface quotas for users, and configure the current interface quotas of each storage space and the unified interface quotas of each storage space in each storage space interface quota, and configure the user current interface quota and the user unified interface quota in the user interface quota. The relationship between the current interface quota and the unified interface quota at the user and storage space levels is: the unified interface quota is greater than any current interface quota, and the sum of the current interface quotas is greater than the unified interface quota, and the interface flow control strategy is the same as the unified control of the user level and storage level. When the flow data of each current interface is greater than the corresponding current interface flow control quota, flow control is performed; when the flow data of each current interface is not greater than the corresponding current interface flow control quota, and the flow data of the unified interface is greater than the unified interface flow control quota, flow control is performed.

[0092] Furthermore, in the specific flow data recording process, each service node is controlled to deduct each storage space interface quota in each storage space bandwidth quota based on each storage space interface data in each storage space bandwidth data, so as to obtain each storage space interface remaining amount; each service node is controlled to deduct the user interface quota in the user bandwidth quota based on each user interface data in each user bandwidth data, so as to obtain the user interface remaining amount. Among them, the deduction process in each storage space is to first deduct the current interface flow control quota of the storage space, and then deduct the unified interface flow control quota of the storage space; the deduction process in the user level is to first deduct the current interface flow control quota of the user, and then deduct the unified interface flow control quota of the user.

[0093] See also Figure 7 , Figure 7This is a flow control structure diagram of an upload interface provided in an embodiment of the present application. Figure 7 As shown, after receiving the data access request flow data 710, in the process of storage space flow control in the storage space flow control unit 720, the storage space current interface quota check is first performed in the storage space current interface flow control unit 730 within the storage space level. When it is confirmed that it meets the current interface flow, the storage space unified interface flow control unit 740 is entered to perform the storage space unified interface quota check. After confirming that it meets the current interface flow, within the user level, the user current interface quota check is performed in the user current interface flow control unit 760 in the user flow control unit 750. When it is confirmed that it meets the current interface flow, the user unified interface quota check is performed in the user unified interface flow control unit 770. After confirming that it meets the current interface flow, the data access request of the current interface is responded to.

[0094] S504. When the remaining amount of bandwidth of any storage space is less than zero, control each service node to perform bandwidth control on the data access terminal; when the remaining amount of bandwidth of each storage space is greater than or equal to zero, and the remaining amount of user bandwidth is less than zero, control each service node to perform bandwidth control on the data access terminal.

[0095] Optionally, when controlling each service node to perform flow control quota deduction in the distributed cache component, when the remaining bandwidth of any storage space is less than zero, control each service node to perform bandwidth control on the data access end; when the remaining bandwidth of each storage space is greater than or equal to zero, and the remaining bandwidth of the user is less than zero, control each service node to perform bandwidth control on the data access end.

[0096] Specifically, when bandwidth control is performed on the data access end, the common bandwidth control method will disconnect the data when the bandwidth cannot pass its quota, and directly terminate its transmission process, which causes the user's data access request to fail directly, and then continuously initiates reconnection, increasing the load pressure on the data access end. In the embodiment of the present application, considering the smoothness of the user's use of bandwidth for data transmission, the bandwidth can be continuously controlled. Based on the Flow Control mechanism of the TCP (Transmission Communication Protocol) protocol, during the data transmission process, if the data transmission speed is slow, there will be a queue at the transport layer, and the data packets still in the transmission process will be stored in the receiving buffer. Therefore, the space of the receiving buffer will become smaller. At this time, the ACK (Acknowledge character) sent back to the sending end at the receiving end will indicate the remaining space size of the receiving buffer, so as to control the sending end to adaptively increase or decrease the data sent to avoid data packet loss.

[0097] Optionally, in a specific bandwidth control process, each service node can be controlled to send a gradually decreasing ACK to the data access end when the bandwidth quota of the current time window is gradually filled up by the data access end, so as to remind the data access end to reduce the data sent within the time window, suspend responding to data access requests from the data access end, determine overflow access requests that have not yet been responded to in the data access requests, and respond to the overflow access requests in the next time window, so as to achieve uninterrupted bandwidth flow control.

[0098] See also Figure 8 , Figure 8 A schematic diagram of bandwidth data flow control provided in an embodiment of the present application. Figure 8 As shown, in the timeline, the bandwidth quota of a single time window is abstractly represented as 4 rectangles. If the 4 bandwidth quotas of the data access request in the current time window have been used, the remaining bandwidth data will be delayed to the next time window for processing, and so on, until the bandwidth quota of the time window can satisfy the remaining bandwidth data of the data access request, the data access request is deemed to have been successfully responded to. For example, a data access request with bandwidth data of 15 rectangles will be processed after 3 complete time windows and 1 3 / 4 time window.

[0099] It can be understood that when flow control is performed on the request data per second of the data access end, if the number of requests per second is too large, the service node will be unable to continue working directly. Then, when controlling each service node to deduct the flow control quota in the distributed cache component, when the remaining amount of requests per second of any storage space is less than zero, each service node is controlled to reject and return the data access request to the data access end; when the remaining amount of requests per second of each storage space is greater than or equal to zero, and the remaining amount of requests per second of the user is less than zero, each service node is controlled to reject and return the data access request to the data access end.

[0100] In an embodiment of the present application, a flow control method is provided, in which a storage space bandwidth quota, a storage space request quota per second, a user bandwidth quota and a user request quota per second are configured in a configuration center, and a distributed cache component is introduced, and each service node records the storage space bandwidth data, the storage space request quota per second, the user bandwidth data and the user request data per second in the distributed cache component, and deducts the quota in the distributed cache component, and implements flow control judgment according to the corresponding remaining amount after deduction, wherein, at the storage space and user levels, current interface flow control and unified interface flow control are respectively performed, which effectively solves the problem of not being able to limit the speed of storage space and users at the same time, and also effectively solves the problem of not being able to unify the flow control of the interface, and realizes continuous bandwidth speed limiting, thereby improving the user experience.

[0101] See also Fig. 9 , Fig. 9 A structural block diagram of a flow control device provided in an embodiment of the present application.

[0102] like Fig. 9 As shown, the flow control device 900 includes:

[0103] The request response module 910 is used to respond to the data access request, allocate at least one service node for the data access request, and obtain the storage space flow control quota and user flow control quota of each storage space corresponding to the data access end;

[0104] The traffic recording module 920 is used to control each service node to respectively record the traffic data of each storage space and the user traffic data generated when the data access terminal performs data access based on the data access request;

[0105] The flow control module 930 is used to control each service node to perform flow control on the data access end according to each storage space flow data, user flow data, each storage space flow control quota and user flow control quota.

[0106] Optionally, the user flow control quota is greater than any storage space flow control quota, and the user flow control quota is less than the sum of all storage space flow control quotas.

[0107] Optionally, the flow control module 930 is also used to control each service node to perform a first flow control on the data access end when any storage space flow data and its corresponding storage space flow control quota meet a first flow control condition; when each storage space flow data and its corresponding storage space flow control quota do not meet the first flow control condition, and the user flow data and the user flow control quota meet the second flow control condition, then control each service node to perform a second flow control on the data access end.

[0108] Optionally, each service node is allocated the same number of data access requests, and the storage space flow control quota includes a storage space concurrency quota, and the user flow control quota includes a user concurrency quota; the flow control device 900 also includes: a quota allocation module, which is used to allocate the storage space concurrency quotas and user concurrency quotas corresponding to the data access end to each service node, and obtain the storage space node concurrency quota and user node concurrency quota corresponding to each service node.

[0109] Optionally, the traffic recording module 920 is further used to control each service node to respectively record the concurrent data of each storage space and the concurrent data of the user generated when the data access terminal performs data access based on the data access request.

[0110] Optionally, the traffic control module 930 is also used to control each service node to reject and return the data access request to the data access end when the concurrent data of any storage space is greater than the concurrent quota of its corresponding storage space node; when the concurrent data of each storage space is less than or equal to the concurrent quota of its corresponding storage space node, and the concurrent data of any user is greater than the concurrent quota of its corresponding user node, then control each service node to reject and return the data access request to the data access end.

[0111] Optionally, the storage space flow control quota includes a storage space bandwidth quota, and the user flow control quota includes a user bandwidth quota; the traffic recording module 920 is also used to control each service node to record, within a preset time window, the storage space bandwidth data and user bandwidth data generated when the data access terminal accesses data based on a data access request; control each service node to deduct each storage space bandwidth quota based on each storage space bandwidth data to obtain each storage space bandwidth surplus, and to deduct the user bandwidth quota based on each user bandwidth data to obtain the user bandwidth surplus.

[0112] Optionally, the traffic recording module 920 is also used to control each service node to deduct each storage space interface quota in each storage space bandwidth quota based on each storage space interface data in each storage space bandwidth data to obtain the remaining amount of each storage space interface; and control each service node to deduct the user interface quota in the user bandwidth quota based on each user interface data in each user bandwidth data to obtain the remaining amount of the user interface.

[0113] Optionally, the traffic control module 930 is also used to control each service node to perform bandwidth control on the data access terminal when the remaining bandwidth of any storage space is less than zero; when the remaining bandwidth of each storage space is greater than or equal to zero, and the remaining bandwidth of the user is less than zero, then control each service node to perform bandwidth control on the data access terminal.

[0114] Optionally, the flow control module 930 is further used to control each service node to suspend responding to data access requests from the data access end, determine that overflow access requests have not been responded to in the data access requests, and respond to the overflow access requests in the next time window.

[0115] In an embodiment of the present application, a flow control device is provided, wherein a request response module is used to respond to a data access request, allocate at least one service node for the data access request, and obtain the flow control quotas of each storage space and the user flow control quota corresponding to the data access terminal; a flow recording module is used to control each service node to respectively record the flow data of each storage space and the user flow data generated when the data access terminal performs data access based on the data access request; and a flow control module is used to control each service node to perform flow control on the data access terminal according to the flow data of each storage space, the user flow data, the flow control quotas of each storage space and the user flow control quota. Because in the present application, the corresponding flow control quotas are configured for both the user level and each storage space level of the data access terminal, and when the flow control is performed on the data access terminal, the flow generated by each storage space and all the flow generated under the user account are considered at the same time, and compared with the corresponding flow control quotas, so that the flow of the user level and the flow of each storage space are controlled at the same time, and finally the data access terminal can be subjected to unified flow control at multiple levels to achieve more accurate and stable flow control.

[0116] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.

[0117] See also Fig.10 , Fig.10 A schematic diagram of the structure of a server provided in an embodiment of the present application. Fig.10 As shown, the server 1000 may include: at least one server processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .

[0118] The communication bus 1002 is used to realize the connection and communication between these components.

[0119] The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

[0120] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0121] Among them, the server processor 1001 may include one or more processing cores. The server processor 1001 uses various interfaces and lines to connect various parts within the entire server 1000, and executes various functions and processes data of the server 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the server processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The server processor 1001 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the server processor 1001, and it can be implemented separately through a chip.

[0122] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may optionally be at least one storage device located away from the aforementioned server processor 1001. As Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a flow control program.

[0123] exist Fig.10In the server 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the server processor 1001 can be used to call the flow control program stored in the memory 1005 and specifically perform the following operations:

[0124] In response to a data access request, at least one service node is allocated for the data access request, and a storage space flow control quota and a user flow control quota of each storage space corresponding to the data access end are obtained;

[0125] Control each service node to respectively record the storage space traffic data and user traffic data generated when the data access end performs data access based on the data access request;

[0126] Control each service node to perform flow control on the data access end according to each storage space flow data, user flow data, each storage space flow control quota and user flow control quota.

[0127] In some embodiments, the user flow control quota is greater than any storage space flow control quota, and the user flow control quota is less than the sum of all storage space flow control quotas.

[0128] In some embodiments, when the server processor 1001 controls each service node to perform flow control on the data access terminal according to each storage space flow data, user flow data, each storage space flow control quota and user flow control quota, it specifically performs the following steps: when any storage space flow data and its corresponding storage space flow control quota meet the first flow control condition, each service node is controlled to perform the first flow control on the data access terminal; when each storage space flow data and its corresponding storage space flow control quota do not meet the first flow control condition, and the user flow data and the user flow control quota meet the second flow control condition, each service node is controlled to perform the second flow control on the data access terminal.

[0129] In some embodiments, each service node is allocated the same number of data access requests, and the storage space flow control quota includes a storage space concurrency quota, and the user flow control quota includes a user concurrency quota; after executing to obtain the storage space flow control quotas and user flow control quotas corresponding to the data access end, the server processor 1001 also specifically performs the following steps: allocating the storage space concurrency quotas and user concurrency quotas corresponding to the data access end to each service node, and obtaining the storage space node concurrency quota and user node concurrency quota corresponding to each service node.

[0130] In some embodiments, when the server processor 1001 controls each service node to respectively record the storage space traffic data and user traffic data generated when the data access terminal accesses data based on a data access request, it specifically performs the following steps: control each service node to respectively record the storage space concurrent data and user concurrent data generated when the data access terminal accesses data based on a data access request.

[0131] In some embodiments, when the server processor 1001 controls each service node to perform the first flow control on the data access terminal when any storage space traffic data and its corresponding storage space flow control quota meet the first flow control condition, the server processor 1001 specifically performs the following steps: when any storage space concurrent data is greater than its corresponding storage space node concurrent quota, the server processor 1001 controls each service node to reject and return the data access request to the data access terminal; when the server processor 1001 controls each service node to perform the second flow control on the data access terminal when each storage space traffic data and its corresponding storage space flow control quota do not meet the first flow control condition, and the user traffic data and the user flow control quota meet the second flow control condition, the server processor 1001 specifically performs the following steps: when each storage space concurrent data is less than or equal to its corresponding storage space node concurrent quota, and any user concurrent data is greater than its corresponding user node concurrent quota, the server processor 1001 controls each service node to reject and return the data access request to the data access terminal.

[0132] In some embodiments, the storage space flow control quota includes a storage space bandwidth quota, and the user flow control quota includes a user bandwidth quota; when the server processor 1001 controls each service node to respectively record the storage space traffic data and user traffic data generated when the data access terminal accesses data based on a data access request, it specifically performs the following steps: within a preset time window, control each service node to respectively record the storage space bandwidth data and user bandwidth data generated when the data access terminal accesses data based on a data access request; control each service node to deduct each storage space bandwidth quota based on each storage space bandwidth data to obtain each storage space bandwidth surplus, and deduct the user bandwidth quota based on each user bandwidth data to obtain the user bandwidth surplus.

[0133] In some embodiments, when the server processor 1001 controls each service node to deduct each storage space bandwidth quota based on each storage space bandwidth data to obtain each storage space bandwidth surplus, it specifically performs the following steps: controls each service node to deduct each storage space interface quota from each storage space bandwidth quota based on each storage space interface data in each storage space bandwidth data to obtain each storage space interface surplus; when the server processor 1001 controls the user bandwidth quota based on each user bandwidth data to obtain the user bandwidth surplus, it specifically performs the following steps: controls each service node to deduct the user interface quota from the user bandwidth quota based on each user interface data in each user bandwidth data to obtain the user interface surplus.

[0134] In some embodiments, when the server processor 1001 controls each service node to perform first flow control on the data access terminal when any storage space traffic data and its corresponding storage space flow control quota meet the first flow control condition, the server processor 1001 specifically performs the following steps: when any storage space bandwidth remaining amount is less than zero, each service node is controlled to perform bandwidth control on the data access terminal; when the server processor 1001 controls each service node to perform second flow control on the data access terminal when each storage space traffic data and its corresponding storage space flow control quota do not meet the first flow control condition, and the user traffic data and the user flow control quota meet the second flow control condition, the server processor 1001 specifically performs the following steps: when each storage space bandwidth remaining amount is greater than or equal to zero, and the user bandwidth remaining amount is less than zero, each service node is controlled to perform bandwidth control on the data access terminal.

[0135] In some embodiments, when the server processor 1001 controls each service node to perform bandwidth control on the data access end, it specifically performs the following steps: controls each service node to suspend responding to data access requests from the data access end, determines that an overflow access request has not been responded to in the data access request, and responds to the overflow access request in the next time window.

[0136] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0137] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0139] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0140] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0142] The above is a description of a flow control method, device, storage medium and server provided in the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A flow control method, characterized in that: Applied to a data accessed end, the data accessed end is provided with at least two storage spaces corresponding to the data access end, the method comprises: In response to a data access request, at least one service node is allocated for the data access request, and a storage space flow control quota and a user flow control quota of each storage space corresponding to the data access end are obtained; Control each service node to respectively record each storage space flow data and user flow data generated when the data access end performs data access based on the data access request; Control each service node to perform flow control on the data access end according to each storage space flow data, the user flow data, each storage space flow control quota and the user flow control quota; The control of each service node performs flow control on the data access terminal according to each storage space flow data, the user flow data, each storage space flow control quota and the user flow control quota, including: when any storage space flow data and its corresponding storage space flow control quota meet the first flow control condition, then controlling each service node to perform the first flow control on the data access terminal; when each storage space flow data and its corresponding storage space flow control quota do not meet the first flow control condition, and the user flow data and the user flow control quota meet the second flow control condition, then controlling each service node to perform the second flow control on the data access terminal.

2. The method according to claim 1, characterized in that: The user flow control quota is greater than any one of the storage space flow control quotas, and the user flow control quota is less than the sum of all storage space flow control quotas.

3. The method according to claim 1, characterized in that The number of the data access requests allocated to each service node is the same, and the storage space flow control quota includes a storage space concurrency quota, and the user flow control quota includes a user concurrency quota; After obtaining the storage space flow control quota and the user flow control quota of each storage space corresponding to the data access end, the method further includes: The storage space concurrency quotas and the user concurrency quotas corresponding to the data access end are evenly distributed to each service node to obtain the storage space node concurrency quotas and the user node concurrency quotas corresponding to each service node.

4. The method according to claim 3, characterized in that The controlling each service node to respectively record each storage space flow data and user flow data generated when the data access end performs data access based on the data access request includes: Each service node is controlled to respectively record the concurrent data of each storage space and the concurrent data of the user generated when the data access end performs data access based on the data access request.

5. The method according to claim 4, characterized in that When any storage space flow data and its corresponding storage space flow control quota meet the first flow control condition, each service node is controlled to perform the first flow control on the data access end, including: When the concurrent data of any storage space is greater than the concurrent quota of its corresponding storage space node, each service node is controlled to generate a rejection and return the data access request to the data access end; When each storage space flow data and its corresponding storage space flow control quota do not satisfy the first flow control condition, and the user flow data and the user flow control quota satisfy the second flow control condition, controlling each service node to perform the second flow control on the data access end includes: When the concurrent data of each storage space is less than or equal to the concurrent quota of its corresponding storage space node, and the concurrent data of any user is greater than the concurrent quota of its corresponding user node, each service node is controlled to reject and return the data access request to the data access end.

6. The method according to claim 1, characterized in that The storage space flow control quota includes a storage space bandwidth quota, and the user flow control quota includes a user bandwidth quota; The controlling each service node to respectively record each storage space flow data and user flow data generated when the data access end performs data access based on the data access request includes: Within a preset time window, control each service node to respectively record each storage space bandwidth data and user bandwidth data generated when the data access end performs data access based on the data access request; Each service node is controlled to deduct each storage space bandwidth quota based on each storage space bandwidth data to obtain each storage space bandwidth surplus, and to deduct the user bandwidth quota based on each user bandwidth data to obtain the user bandwidth surplus.

7. The method according to claim 6, characterized in that The controlling each service node to deduct each storage space bandwidth quota based on each storage space bandwidth data to obtain each storage space bandwidth surplus includes: Control each service node to deduct each storage space interface quota from each storage space bandwidth quota based on each storage space interface data in each storage space bandwidth data, so as to obtain a remaining amount of each storage space interface; The deducting the user bandwidth quota based on the bandwidth data of each user to obtain the remaining amount of user bandwidth includes: Each service node is controlled to deduct the user interface quota in the user bandwidth quota based on each user interface data in each user bandwidth data to obtain a user interface surplus.

8. The method according to claim 6, characterized in that When any storage space flow data and its corresponding storage space flow control quota meet the first flow control condition, each service node is controlled to perform the first flow control on the data access end, including: When the remaining bandwidth of any storage space is less than zero, each service node is controlled to perform bandwidth control on the data access end; When each storage space flow data and its corresponding storage space flow control quota do not satisfy the first flow control condition, and the user flow data and the user flow control quota satisfy the second flow control condition, controlling each service node to perform the second flow control on the data access end includes: When the remaining amount of bandwidth of each storage space is greater than or equal to zero, and the remaining amount of bandwidth of the user is less than zero, each service node is controlled to perform bandwidth control on the data access end.

9. The method according to claim 8, characterized in that The controlling each service node to perform bandwidth control on the data access terminal includes: Control each service node to suspend responding to the data access request of the data access end, determine the overflow access request that has not been responded to in the data access request, and respond to the overflow access request in the next time window.

10. A flow control device, characterized in that: Applied to a data accessed end, the data accessed end is provided with at least two storage spaces corresponding to the data access end, and the device comprises: A request response module, used to respond to a data access request, allocate at least one service node for the data access request, and obtain a storage space flow control quota and a user flow control quota for each storage space corresponding to the data access end; A traffic recording module, used to control each service node to respectively record the storage space traffic data and user traffic data generated when the data access end performs data access based on the data access request; A flow control module, used to control each service node to perform flow control on the data access terminal according to each storage space flow data, the user flow data, each storage space flow control quota and the user flow control quota; The flow control module is also used to control each service node to perform a first flow control on the data access end when any storage space flow data and its corresponding storage space flow control quota meet the first flow control condition; when each storage space flow data and its corresponding storage space flow control quota do not meet the first flow control condition, and the user flow data and the user flow control quota meet the second flow control condition, control each service node to perform a second flow control on the data access end.

11. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 9.

12. A server, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 9 when executing the program.