Data processing methods
By uniformly managing the virtual network and sharing the token bucket by user ID, the problem of inflexible storage resource allocation in the prior art is solved, and more efficient resource utilization and network management are achieved.
Patent Information
- Application Number
- CN202411594968.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-08
AI Technical Summary
When the prior art deals with a large number of virtual networks, the dynamic allocation ability of storage resources is poor and cannot flexibly respond to changes in the number of users, resulting in waste or insufficient resources.
Through user identification, multiple virtual networks are managed uniformly, a token bucket is shared, speed limiting strategies are optimized, and resource allocation is dynamically adjusted to adapt to changes in user needs.
It realizes more flexible storage resource allocation, avoids resource waste and insufficient resources, and improves network management flexibility and resource utilization efficiency.
Smart Images

Figure CN119155252B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to a data processing method. Background Art
[0002] With the development of virtual network technology, network isolation and traffic management have been significantly improved, especially in large-scale multi-user environments. New network management technology enables each virtual network to be independently controlled through a specific identifier, which brings higher flexibility and efficiency to data center traffic management. In addition, dynamic traffic control mechanisms help optimize network resource allocation, effectively reduce resource waste, and improve network performance.
[0003] Currently, network management technology regulates the network usage of different users through the traffic control module of each virtual network to ensure that the traffic of each user is reasonably limited. However, traditional technology implements this function through the traffic management module running on the processor, but this method requires maintaining a large amount of storage resources for each virtual network. Although this design solves the problem of traffic control, its disadvantage is that the dynamic allocation capability of storage resources is poor and it cannot flexibly respond to changes in the number of users. When there are fewer users, excessive resource allocation will lead to waste; when the number of users surges, resources may be insufficient. Therefore, in order to overcome these shortcomings, a data processing method is needed that can allocate storage resources more flexibly and can automatically adjust as user needs change. Summary of the invention
[0004] In view of this, the embodiments of this specification provide a data processing method, a data processing method applied to a traffic control terminal, and a data processing method applied to a cloud device. One or more embodiments of this specification also involve a data processing device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a data processing method is provided, including:
[0006] Receiving a data transmission request sent by a user, wherein the data transmission request includes a user identifier corresponding to the user, and the user identifier corresponds to at least one virtualized network identifier;
[0007] Determine the token bucket corresponding to the user according to the user identifier;
[0008] It is determined whether the data transmission request is passed based on the token bucket, and if the data transmission request is passed, the to-be-processed data carried in the data transmission request is transmitted.
[0009] According to a second aspect of an embodiment of this specification, a data processing method is provided, which is applied to a flow control terminal, including:
[0010] Receiving a data transmission request sent by a user terminal, wherein the data transmission request includes a user identifier corresponding to the user terminal, and the user identifier corresponds to at least one virtualized network identifier;
[0011] Determine the token bucket corresponding to the user terminal according to the user identifier;
[0012] Based on the token bucket, it is determined whether the data transmission request is passed, and if the data transmission request is passed, the to-be-processed data carried in the data transmission request is transmitted to the server.
[0013] According to a third aspect of the embodiments of this specification, a data processing method is provided, which is applied to a cloud device, including:
[0014] A data transmission request sent by a receiving end-side device, wherein the data transmission request includes a user identifier corresponding to the end-side device and data to be processed, and the user identifier corresponds to at least one virtualized network identifier;
[0015] Determine a token bucket corresponding to the user according to the user identifier, and determine whether the data transmission request is passed based on the token bucket;
[0016] In a case where the data transmission request is approved, a data processing result is generated based on the data to be processed, and the data processing result is sent to the terminal side device.
[0017] According to a fourth aspect of an embodiment of this specification, a computing device is provided, including:
[0018] Memory and processor;
[0019] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned data processing method, the data processing method applied to the traffic control end, and the data processing method applied to the cloud device are implemented.
[0020] According to the fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned data processing method, the data processing method applied to the traffic control end, and the data processing method applied to the cloud device.
[0021] According to the sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned data processing method, the data processing method applied to the traffic control end, and the data processing method applied to the cloud device.
[0022] An embodiment of the present specification implements the steps of receiving a data transmission request sent by a user, wherein the data transmission request includes a user identifier corresponding to the user, and the user identifier corresponds to at least one virtualized network identifier; determining a token bucket corresponding to the user based on the user identifier; judging whether the data transmission request is passed based on the token bucket, and transmitting the to-be-processed data carried in the data transmission request if the data transmission request is passed.
[0023] By applying the solution of the embodiments of this specification, multiple virtual networks are uniformly managed through user identifiers, so that multiple virtual networks of the same user share a token bucket, avoiding the redundancy of independently setting a token bucket for each virtual network. In addition, for virtual networks with less traffic and fewer instances, the solution further optimizes the speed limit strategy to avoid unnecessary speed limit behavior and concentrate resources on virtual networks with high traffic for optimization, thereby improving the flexibility of overall network management and resource utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of a data processing method provided by an embodiment of this specification;
[0025] Figure 2 is a schematic diagram of a data processing method provided by an embodiment of this specification;
[0026] Figure 3 is a flow chart of a data processing method applied to a flow control terminal provided by an embodiment of the present specification;
[0027] Figure 4 is an architecture diagram of a data processing system including a flow control terminal provided by an embodiment of the present specification;
[0028] Figure 5 is a flow chart of a data processing method applied to a cloud device provided by an embodiment of this specification;
[0029] Figure 6 is an architecture diagram of a data processing system provided by one embodiment of this specification;
[0030] Figure 7 It is a processing flow chart of a virtualized network data processing method provided by an embodiment of this specification;
[0031] Figure 8 is a structural schematic diagram of a data processing device provided by an embodiment of this specification;
[0032] Fig. 9 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0033] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0034] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0035] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0036] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0037] First, the terms involved in one or more embodiments of this specification are explained.
[0038] Virtual Private Cloud (VPC) is an isolated virtual network environment where users can build and manage their own independent network resources on public cloud infrastructure. Through this architecture, users can freely configure network elements such as IP address segments, subnets, and routes, and control and manage network traffic. VPC also supports multiple connection methods, allowing it to be interconnected with other network environments to ensure security and data isolation.
[0039] Virtual eXtensible Local Area Network (VxLAN) is a network virtualization solution for large-scale data centers. This technology transmits encapsulated Layer 2 Ethernet packets through a Layer 3 network, allowing devices in different physical locations to communicate with each other. VxLAN uses virtual network identifiers to achieve multi-tenant isolation and network extension, and is widely used in virtual network transmission that supports multi-tenant and large-scale network environments.
[0040] Token bucket: A flow control algorithm used to limit the rate of data transmission and prevent network congestion. By placing a token bucket between the sender and the receiver, the data transmission rate is controlled. Tokens are continuously generated in the token bucket at a certain rate, and the sender must obtain a token before sending data. If there are not enough tokens in the token bucket, the sender cannot send data, thus achieving the effect of speed limiting;
[0041] In this specification, a data processing method, a data processing method applied to a flow control terminal, and a data processing method applied to a cloud device are provided. One or more embodiments of this specification also involve a data processing device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0042] Based on VxLAN (Virtual eXtensible Local Area Network) tunnel technology, the private network VPC (Virtual Private Cloud) isolates virtual networks. Each VPC has a virtualized network ID, and one virtualized network ID corresponds to one virtualized network. In the data center's speed limit system, when the speed limit is performed at the granularity of a 24-bit virtualized network ID, it is necessary to maintain token buckets with a depth of hundreds of thousands to millions, which consumes a huge amount of storage resources. In the hardware implementation of the flow control module in the VPC gateway, memory resources are difficult to dynamically allocate and recycle. If too much memory resources are allocated, the storage resource utilization rate will be low when there are fewer tenants. If too little memory resources are allocated, it will not be able to support the scenario of a sharp increase in tenants.
[0043] In traditional traffic control modules, each virtualized network identifier usually needs to maintain an independent token bucket for speed limiting. Therefore, the storage depth allocated to the token bucket determines the number of virtualized network identifiers that can be speed limited. Furthermore, in traditional traffic control modules, the number of token buckets directly determines the number of virtualized network identifiers that can be speed limited. The specific disadvantages of this design are: Waste of storage resources: For large-scale data center networks, maintaining a large number of token buckets, especially millions of virtualized network identifiers, requires a large amount of storage resources. This leads to waste of storage resources and increased management costs. Insufficient flexibility: When the number of virtualized network identifiers in a data center changes dynamically or different speed limit strategies are required for different virtualized network identifiers, the design of the traditional memory control module may appear to be inflexible and difficult to adapt to network changes and personalized needs.
[0044] See also Figure 1 , Figure 1 A flow chart of a data processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0045] Step 102: Receive a data transmission request sent by a user, wherein the data transmission request includes a user identifier corresponding to the user, and the user identifier corresponds to at least one virtualized network identifier.
[0046] In actual applications, users are participants in a network or system, usually entities that access or use services; data transmission requests are requests issued by users to transmit data in a network or system; user identifiers are unique identifiers used to determine the identity of the user and the corresponding network resources; virtualized network identifiers are identifiers that identify virtual networks and are used to distinguish different virtual network instances.
[0047] A user can be understood as a subject or entity in a network environment or system. It can be a person, device, or software system that is responsible for making data requests and interacting with the network. Users use services through their actions or operations. Common actions include visiting websites, requesting data services, or using computing resources. In a VPC scenario, users can be corporate employees who access databases on the cloud and enter the virtual network through the VPC gateway to access related resources.
[0048] Data transfer requests can be understood as requests sent by users over the network to transfer certain data from one location to another. Data transfer requests are often used for file sharing, resource access, or remote service calls. For example, in a VPC scenario, a user may send a data transfer request to upload local data to cloud storage in a virtual network, or to retrieve files from a cloud server for local processing.
[0049] User ID can be understood as a code or identifier used to uniquely identify a user, ensuring that each user's behavior and requests can be tracked and managed. User ID can be an account ID (Identifier), device ID, or other identity information. In a VPC scenario, when multiple users access the same project system through a VPC gateway, the system distinguishes user requests based on user IDs, ensuring that each user can only access the resources they are authorized to access, and processing them according to the preset security policy.
[0050] Virtualized network IDs can be understood as identifiers used to identify and distinguish different virtual network instances. In a network virtualization environment, virtualized network IDs ensure the isolation and independent management of each virtual network. For example, in a VPC, different tenants or applications will use virtualized network IDs to distinguish their network traffic, which ensures that the traffic of each virtual network will not interfere with each other. During data transmission, the system will determine the destination and path of the traffic based on the virtualized network ID.
[0051] By accepting data transmission requests that include user IDs, it is possible to effectively identify and distinguish the sources of requests from different users, ensuring that each user's request is correctly processed according to its identity, while allowing the system to perform precise traffic control and speed limit operations based on the permissions and resources associated with the user ID. This mechanism can optimize the use of network resources, avoid unnecessary waste of resources, and flexibly adjust network management strategies when the number of users increases or traffic fluctuates, thereby improving the overall performance of the system and data transmission efficiency.
[0052] Step 104: Determine the token bucket corresponding to the user according to the user identifier.
[0053] In actual applications, the token bucket corresponding to the user is a traffic management mechanism allocated to a specific user in network traffic control, which limits the data transmission rate by generating and consuming tokens.
[0054] Exemplarily, the token bucket corresponding to a user can be understood as a flow control container allocated to each user in the network speed limit mechanism. The token bucket generates tokens at a preset rate, and each time a user sends data, a certain number of tokens is consumed. If the number of tokens is sufficient, the data request will be allowed to pass; otherwise, the data request will be blocked or delayed until a sufficient number of tokens are accumulated. In the VPC scenario, when a user sends data through the VPC gateway, the system will find the corresponding token bucket based on the user's identifier to decide whether to allow the data transmission request. In this way, the system can accurately control the network usage of each user and prevent individual users from excessively occupying network resources.
[0055] It should be noted that determining the token bucket corresponding to the user according to the user identifier can be understood as a process of finding the corresponding flow control container through the user's unique identifier. The specific method is to quickly match the user identifier with the corresponding token bucket by searching a pre-configured hash table; or to query the database according to the user identifier, determine the user's flow configuration information and then associate it with the corresponding token bucket; or to directly map the user identifier to the token bucket structure in the memory by using the user identifier as an index to achieve efficient flow control operations. This manual does not impose any restrictions on this.
[0056] The core of the token bucket mechanism is that it allows a certain degree of flexibility in network traffic. Users can accumulate tokens in low-traffic situations and consume these tokens during peak hours to support short-term high-traffic transmission. For example, in a VPC, when an enterprise user transmits a large amount of data through a gateway, if the tokens in the token bucket corresponding to the user are sufficient, the data request will be processed quickly; when the tokens are insufficient, the system will delay or reject the request according to the preset traffic control policy. This mechanism not only ensures the efficient use of the network, but also guarantees the fairness of the network to a certain extent.
[0057] By obtaining the user ID to determine the token bucket corresponding to the user, the same token bucket can be used to associate multiple network virtual machines according to the user ID, thereby reducing the need for independent token buckets. This not only effectively reduces the number of token buckets that need to be maintained in the system, but also improves the flexibility of speed limiting operations. Compared with traditional speed limiting schemes, when speed limiting is performed at the granularity of network virtual machines, the system needs to maintain a large number of token buckets. As the number increases, the token bucket is likely to reach the upper limit, resulting in inflexible processing methods. Through the user ID-based speed limiting method, the system can share a token bucket for traffic management when the same user creates multiple VPCs. It is no longer necessary to set up a separate token bucket for each network virtual machine, which significantly reduces storage and management costs. At the same time, this method makes the speed limiting mechanism more flexible, can adapt to changes in traffic demand in large-scale multi-tenant environments, and improves the overall network resource utilization efficiency.
[0058] Further, determining a token bucket corresponding to the user according to the user identifier includes:
[0059] Obtain at least one initial token bucket and an initial user identifier corresponding to each initial token bucket;
[0060] An initial token bucket having an initial user identifier identical to the user identifier is determined as the token bucket corresponding to the user.
[0061] In actual applications, the initial token bucket is a token bucket set for each user when the system is initialized, which is used for initial traffic control; the initial user identifier is the identity identification code corresponding to each user in the initialization phase of the system, which is used to associate the user with its corresponding token bucket.
[0062] The initial token bucket can be understood as a traffic management container preset for the user when the system is started or the user registers, which is used to control the frequency and total amount of their data requests. The initial token bucket contains a certain number of tokens, which are consumed according to the user's request to ensure that the user's traffic is managed within a reasonable range. For example, in a VPC environment, when an enterprise user connects to the network for the first time, the system will assign an initial token bucket to it to limit the frequency of its data transmission and prevent it from over-occupying resources. Correspondingly, the initial user identifier can be understood as an identifier assigned by the system to uniquely identify the user when the user registers or connects for the first time. This identifier is directly associated with the initial token bucket to ensure that the system can quickly locate the corresponding traffic control policy when the user initiates a request. For example, in a multi-tenant cloud environment, the initial user identifier may be the enterprise account ID, through which the system can identify the user and determine its initial token bucket in order to implement reasonable traffic management and speed limit operations.
[0063] By associating the initial token bucket with the initial user ID, the system can quickly and accurately locate the user's traffic control container to ensure that each user's traffic is managed within a reasonable range. This mapping mechanism avoids the computational cost of reallocating and searching the token bucket for each request, thereby improving the efficiency of the system. In addition, determining that the initial token bucket with the same user ID as the initial user ID is the user's exclusive token bucket not only provides a flexible rate limit mechanism, but also ensures the resource stability of the system when processing user requests. Through this mapping and identification method, the system can dynamically manage and allocate network resources when the number of users or traffic demand fluctuates, improving the flexibility and efficiency of overall network management.
[0064] Step 106: Determine whether the data transmission request is passed based on the token bucket, and transmit the to-be-processed data carried in the data transmission request if the data transmission request is passed.
[0065] In practical applications, judging whether a data transmission request is passed based on a token bucket can be understood as deciding whether to allow data transmission based on the number of tokens remaining in the token bucket. Specifically, when a user initiates a request, the token bucket is checked to see if there are enough tokens to support the traffic demand of the current request; when the token generation rate is fixed, the token bucket status is updated regularly, and the number of remaining tokens is checked in real time when the user request arrives; the token generation rate can also be adjusted dynamically to cope with the user's sudden traffic demand, ensuring that token allocation is more flexible. This manual does not impose any restrictions on this.
[0066] By judging whether a data transmission request is passed based on a token bucket, fine flow control can be achieved to ensure effective management of user traffic under limited network resources. The token bucket mechanism allocates a certain number of tokens to each user. When a user issues a data transmission request, the system checks the number of remaining tokens in the token bucket to decide whether to allow the request to pass. If the number of tokens is sufficient, it means that the user's traffic is within the set limit. The system will allow the transmission request to pass and process the data in the request; conversely, if the token is insufficient, it means that the user's traffic has reached or exceeded the limit, and the system will reject or delay the request. This can avoid excessive consumption of network resources, prevent network congestion, and ensure that resources are fairly distributed among users. Through this token bucket mechanism, not only a flexible speed limit solution is implemented, but also the problem of inflexible or excessive resource allocation in traditional speed limit methods is avoided, further improving the overall efficiency and responsiveness of the system, and adapting to the dynamically changing traffic requirements in the network environment.
[0067] Further, judging whether the data transmission request is passed based on the token bucket includes:
[0068] Obtaining the number of remaining tokens in the token bucket and the number of required tokens for the data transmission request;
[0069] In a case where the number of required tokens is greater than the number of remaining tokens, determining that the data transmission request has not been approved;
[0070] When the required number of tokens is less than or equal to the remaining number of tokens, it is determined that the data transmission request is passed.
[0071] In actual applications, the number of remaining tokens is the number of tokens currently available in the token bucket, which is used to determine whether further data transmission is allowed; the number of required tokens is the number of tokens required for user data transmission requests, which is used to ensure that the transmitted data meets the requirements of network flow control.
[0072] The number of remaining tokens can be understood as the number of available tokens currently stored in the token bucket, which directly affects whether the user's data transfer request can be allowed. When a user initiates a request, the system first checks whether there are enough remaining tokens in the token bucket. If the number of remaining tokens is sufficient, the user's request can be passed and data can be transferred; otherwise, the user's request will be rejected or delayed until the number of tokens increases. For example, in a VPC environment, when an enterprise user initiates data transfer through a gateway, the system will check the token bucket corresponding to the user to check whether there are enough remaining tokens to support this data transfer.
[0073] The number of required tokens can be understood as the number of tokens consumed for a data transfer request initiated by a user, which is usually proportional to the amount of data transferred or the bandwidth required. The system determines whether to allow the data transfer by comparing the number of required tokens with the number of remaining tokens. For example, in a VPC scenario, if a user wants to upload a large amount of data to a cloud server, the system will calculate the number of tokens required for the transfer and compare it with the number of remaining tokens of the user to determine whether to allow the transfer. If the number of required tokens exceeds the number of remaining tokens, the system will reject the request to ensure the effectiveness of flow control.
[0074] Exemplarily, in the process of judging whether a data transmission request is passed based on a token bucket, the system decides whether to allow the user's request by comparing the number of remaining tokens and the number of required tokens. The core of this step is to ensure that users can transmit data while meeting the flow control standards without causing excessive consumption of network resources by dynamically monitoring the resources in the token bucket. The purpose of obtaining the number of remaining tokens is to understand how much traffic the current user has used and how much available bandwidth is left, which is an important basis for judging whether the user can continue to send data. On the other hand, the number of required tokens indicates how much network resources the user's current transmission request will consume. If the required resources exceed what the current system can provide, the system will reject the request, thereby avoiding network congestion and resource overload.
[0075] Through precise resource monitoring, it ensures fair distribution of network traffic, and improves the flexibility and efficiency of network management by dynamically adjusting the speed limit strategy. Compared with the traditional fixed speed limit solution, this token bucket-based elastic speed limit method not only improves resource utilization, but also avoids performance problems caused by excessive network use by a single user.
[0076] Considering that before using the token bucket for screening, a simpler verification method can be used for verification to further reduce the efficiency of network management, after receiving the data transmission request sent by the user, the method also includes:
[0077] Obtain a list of users to be determined, wherein the list of users to be determined includes at least one piece of information of a user to be determined, and the information of the user to be determined includes an identifier of the user to be determined and a user traffic interception threshold;
[0078] In the case where the user identifier is included in each user identifier to be determined, obtaining used traffic information corresponding to the user identifier, and judging whether the data transmission request is passed according to the used traffic information and the user traffic interception threshold corresponding to the user identifier;
[0079] When the user identifier is not included in the user identifiers to be determined, it is determined that the data transmission request is passed.
[0080] In actual applications, the user list is a list of users to be judged, which is used to verify the legitimacy of user data transmission requests; the user information to be judged is a specific entry in the list, which contains the user's key data; the user identifier to be judged is a unique identifier for each user, which is used to determine the user's identity; the user traffic interception threshold is a set value for limiting user traffic, which is used to determine whether the user's request exceeds the limit.
[0081] The judgment user list can be understood as a list for managing user access and traffic requests. In a network environment, the system uses this list to determine whether it is necessary to further filter or restrict the traffic of a specific user. In a VPC scenario, the judgment user list can contain multiple user identifiers, and the system uses this list to decide whether to allow the data transmission request initiated by the user through the VPC gateway. If the user is in this list, the legitimacy of the request and whether it meets the conditions are further determined based on subsequent parameters.
[0082] The user information to be judged can be understood as the specific user data in the user list to be judged, including user identification, traffic usage, limit threshold, etc. In VPC, the user information to be judged helps the system to accurately understand the status and resource usage of each user. For example, when an enterprise user accesses cloud resources through a VPC gateway, the system will check the user's traffic situation and limit or adjust the speed based on the user information to be judged.
[0083] The user ID to be determined can be understood as the unique identifier of each user in the user list to be determined, which is used to accurately distinguish users in the system. In the VPC scenario, when different users send data requests through the VPC gateway, the system will determine the identity of the user based on the user ID to be determined, ensuring that traffic control or speed limit operations can be accurately applied to the correct user, avoiding resource conflicts or confusion between different users.
[0084] The user traffic interception threshold can be understood as a set value used to limit user traffic. When the user's traffic exceeds this value, the system will prevent them from sending further requests. For example, in a VPC environment, a threshold may be set for the network traffic of an enterprise user. When the user's traffic exceeds this threshold, the VPC gateway will stop the user's data transmission request to avoid network congestion or excessive resource consumption.
[0085] In network management, using token buckets as a speed limit tool can effectively control traffic, but in actual applications, premature introduction of token bucket filtering will increase system complexity and resource consumption. Therefore, after receiving a data transmission request sent by a user, using a simpler verification method to make a preliminary judgment on the request can reduce the burden on the system and improve the overall network management efficiency. Obtaining a list of users to be judged is a key step, which allows the system to quickly filter out users who need further inspection through pre-set rules and exclude users who do not need speed limit.
[0086] The user list to be judged contains the basic information and traffic threshold of each user, which helps to quickly identify which users' traffic needs further management. When a user is in the user list to be judged, the system can compare its used traffic information with the traffic interception threshold to determine whether it is necessary to introduce more complex traffic control mechanisms, such as token buckets. This process helps optimize system performance, avoids applying complex speed limit rules to unnecessary users, saves storage and computing resources, and improves the flexibility of overall management.
[0087] By first verifying the information in the list of users to be judged, the system can reduce unnecessary resource usage, especially when the user traffic does not reach the set threshold, directly allowing the request to pass, thereby avoiding excessive computing overhead. This step-by-step screening process not only simplifies management, but also ensures that token bucket resources are only used to process user requests that really need to be limited, further optimizing the efficiency of network traffic control.
[0088] Further, judging whether the data transmission request is passed according to the used traffic information and the user traffic interception threshold corresponding to the user identifier includes:
[0089] In the case where the used traffic information is less than the user traffic interception threshold, determining a token bucket corresponding to the user according to the user identifier, and judging whether the data transmission request is passed based on the token bucket;
[0090] When the used traffic information is greater than or equal to the user traffic interception threshold, it is determined that the data transmission request has not been passed.
[0091] In actual applications, the user traffic interception threshold is a set value used to limit user traffic, which determines whether the user traffic exceeds the upper limit allowed by the system; the user traffic interception threshold can be understood as the traffic limit set for each user in the network system. When the user's used traffic reaches or exceeds this threshold, the system will stop processing further requests from the user. The setting of this threshold is intended to ensure fair use of network resources and prevent individual users from over-consuming bandwidth or resources, affecting the normal use of other users. In the VPC gateway scenario, the user traffic interception threshold can be used to manage the traffic usage of different users in a multi-tenant environment. For example, when a user transmits a large amount of data through a VPC gateway, if its traffic exceeds the pre-set threshold, the system will interrupt the user's request to ensure network stability and reasonable allocation of resources.
[0092] In network traffic control, judging whether a data transmission request is passed is based on the comparison between the user's used traffic information and the user traffic interception threshold in order to ensure the reasonable allocation and use of resources. Through this mechanism, the system can effectively avoid excessive consumption of network resources, ensure that each user's traffic is within the set reasonable range, and prevent individual users from occupying too much bandwidth and affecting the normal use of other users. This step first checks the used traffic information. If it is less than the user traffic interception threshold, it means that the user's traffic demand is still within an acceptable range. The system will further search for the corresponding token bucket and determine whether to allow the data request to pass based on the remaining resources in the token bucket.
[0093] This design is to control the flow level by level, and not trigger the token bucket speed limit when the user flow is small, so as to avoid the system from using complex speed limit strategies too early and improve efficiency. When the user flow exceeds the flow interception threshold, the system directly rejects the data request. This process ensures efficient flow management, reduces the load of the system under high flow conditions, and avoids resource waste. In addition, through this two-layer judgment method, it is ensured that the token bucket mechanism is enabled only when necessary, further optimizing the resource utilization and processing efficiency of network management.
[0094] Considering that before using the token bucket for screening, a simpler verification method can be used for verification to further reduce the efficiency of network management, before determining the token bucket corresponding to the user according to the user identifier, the method also includes:
[0095] Obtain the virtualized network identifier in the data transmission request sent by the user, and the network interception threshold corresponding to each virtualized network;
[0096] Determine the network interception threshold corresponding to the virtualized network identifier based on the network interception threshold corresponding to each virtualized network;
[0097] Whether the data transmission request is passed is determined according to the network interception threshold corresponding to the virtualized network identifier.
[0098] In actual applications, the network interception threshold is a set value for limiting network traffic to ensure the rational allocation and use of network resources; the network interception threshold corresponding to the virtualized network identifier is the traffic limit value of a specific network determined based on the virtualized network identifier, which is used to further control network traffic.
[0099] The network interception threshold can be understood as a set traffic limit value. When the network traffic reaches or exceeds this value, the system will block or limit further data transmission. The main function of this threshold is to prevent a single virtual network or user from consuming too many resources and affecting the normal use of other users. For example, in a shared virtualization environment, a virtual network may trigger the network interception threshold due to a large number of data requests during peak hours. At this time, the system will prevent the network from continuing to send data requests, thereby ensuring smooth traffic on other networks.
[0100] The network interception threshold corresponding to the virtualized network ID can be understood as the flow control parameter set for a specific virtualized network. It is determined based on the virtualized network ID and is used to determine whether the flow of the network has reached the limit. For example, in a VPC environment, a specific virtual network may have different network interception thresholds due to its application scenario and resource configuration. When the flow of the network reaches its threshold, the system will decide whether to allow more data transmission based on this threshold to ensure efficient use and reasonable allocation of network resources.
[0101] It should be noted that based on the network interception threshold corresponding to each virtualized network, determining the network interception threshold corresponding to the virtualized network identifier can be understood as determining the traffic limit of a specific virtual network according to the traffic control parameters of different virtual networks. The specific method is to quickly match the virtualized network identifier with the corresponding threshold by looking up the pre-configured network interception threshold table; it is also possible to dynamically monitor the real-time traffic of the virtual network and generate a threshold that adapts to the current network conditions based on historical traffic data; it is also possible to calculate the appropriate network interception threshold based on the resource quota allocated by the user, combined with the network bandwidth and computing resource usage. This manual does not impose any restrictions on this.
[0102] It should be noted that in actual applications, the data transmission request can be preliminarily screened by the virtualized network identifier in the data transmission request, and then further screened by the user corresponding token bucket; it is also possible to first check whether the user identifier in the data transmission request hits the user table to be verified to preliminarily screen the data transmission request, and then further screen it through the user corresponding token bucket; it is also possible to first check whether the user identifier in the data transmission request hits the user table to be verified to preliminarily screen the data transmission request, and then further screen the data transmission request through the virtualized network identifier in the data transmission request, and then further screen it through the user corresponding token bucket, and so on. This manual does not impose any restrictions on this.
[0103] refer to Figure 2 , Figure 2A schematic diagram of a data processing method provided for an embodiment of the present specification, wherein the user's traffic request is first verified by a list of users to be judged. The current network usage information corresponding to the data transmission request is then compared with the preset traffic limit threshold. If the current network usage does not reach the threshold, the system will enter the corresponding token bucket according to the user identifier to determine whether it has enough tokens to support this data transmission request. Each user has its corresponding token bucket (for example, user 1, user 2, user n), which contains the number of remaining tokens. If the number of tokens is sufficient, the data request is passed, and the data to be processed is transmitted to the target device; if the tokens are insufficient, the system will reject the request, indicating that the data transmission request has not been passed, ensuring that the system can flexibly control data transmission according to the traffic requirements and remaining tokens of each user, avoiding excessive use of resources.
[0104] By identifying the corresponding network interception threshold for each virtualized network and determining whether the data to be transmitted is passed based on the threshold, it can effectively reduce excessive consumption of resources, especially in multi-tenant or complex network environments, to achieve more flexible and accurate traffic control. This mechanism ensures differentiated traffic management between different virtual networks based on the actual needs and configuration of each virtual network. When the traffic of the virtual network does not reach the set network interception threshold, the system allows data transmission to ensure the normal operation and efficiency of the network. When the traffic reaches or exceeds the threshold, the system automatically blocks further requests to avoid overloading of network resources. This not only optimizes resource utilization, but also simplifies the management and operation of the network, especially in large-scale network environments, it can reduce management costs and improve the overall performance of the system.
[0105] Further, based on the network interception threshold corresponding to each virtualized network, determining the network interception threshold corresponding to the virtualized network identifier includes:
[0106] Determine a requested virtualized network corresponding to the virtualized network identifier;
[0107] Determine the request network interception threshold corresponding to the request virtualized network according to the network interception threshold corresponding to each virtualized network;
[0108] The requested network interception threshold is determined to be the network interception threshold corresponding to the virtualized network identifier.
[0109] In actual applications, the virtualized network instance involved in requesting the virtualized network to initiate data transmission for the user is usually related to a specific virtualized network identifier; the requested network interception threshold is the flow control limit set for the virtualized network, which is used to decide whether to allow further data transmission.
[0110] The request virtualized network can be understood as a specific virtualized network instance involved when a user or system initiates a data request. This virtualized network is a key channel for users to interact with external resources, ensuring the isolation and security of data. For example, in a multi-tenant VPC environment, requests from different users will be distinguished through different virtualized networks, thereby ensuring that the data transmission of each tenant is independent of each other and will not interfere with the traffic of other tenants.
[0111] The request network interception threshold can be understood as the traffic limit value set for a request virtualized network. When the data transmission request initiated by the user reaches or exceeds this threshold, the system will temporarily suspend further data transmission of the network. The setting of this threshold can ensure that in a multi-tenant environment, the resource usage of each virtualized network is within a reasonable range, thereby preventing a single user or network instance from occupying too many resources and affecting the normal operation of other virtualized networks.
[0112] By determining the network interception threshold corresponding to the virtualized network identifier in the data transmission information, the traffic of each virtualized network can be effectively controlled to ensure the reasonable allocation and efficient use of network resources. This mechanism can dynamically adjust the traffic limit according to the actual traffic demand and resource allocation of each virtualized network to prevent a virtual network from occupying too much bandwidth and affecting the normal operation of other networks. At the same time, based on the judgment of the specific network interception threshold, overloaded requests can be blocked in time, reducing the risk of network congestion and improving the stability and overall performance of the system. This on-demand allocation of network resources simplifies traffic management, reduces the complexity of operation and maintenance, and ensures fairness and flexibility in a multi-tenant environment.
[0113] Further, judging whether the data transmission request is passed according to the network interception threshold corresponding to the virtualized network identifier includes:
[0114] Obtaining current network usage information corresponding to the virtualized network identifier;
[0115] In a case where the current network usage information is less than the network interception threshold, determining that the data transmission request is passed;
[0116] In the case that the current network usage information is greater than or equal to the network interception threshold, a token bucket corresponding to the user is determined according to the user identifier, and whether the data transmission request is passed is determined based on the token bucket.
[0117] In actual applications, the current network usage information is data that reflects the current traffic and resource usage of the virtual network in real time, and is used to determine whether the current network exceeds its set traffic or resource limits; the current network usage information can be understood as the real-time usage status of the current virtualized network, including bandwidth occupancy, traffic conditions, and other resource consumption statistics. This information will be continuously updated to help the system understand the operating status of each virtualized network in real time, and determine whether it is necessary to limit the speed or control the flow based on the current usage information. For example, in a VPC environment, if the current usage information of a virtual network shows that the bandwidth is close to the upper limit, the system may limit its flow according to the set speed limit rules to avoid affecting the normal operation of other virtual networks.
[0118] In the process of judging whether a data transmission request is passed based on the network interception threshold corresponding to the virtualized network identifier, obtaining the current network usage information is a crucial step. The core of this step is to grasp the resource usage of the virtualized network in real time, such as traffic and bandwidth occupancy, to ensure that the system can accurately evaluate the network load status before processing the data transmission request. If the current network usage information is less than the preset network interception threshold, it means that the resources of the virtual network have not yet reached its tolerable upper limit. At this time, the system will allow the data transmission request to pass, thereby ensuring smooth data transmission. If the current network usage information is equal to or exceeds the network interception threshold, it means that the resources of the virtual network have approached or reached the limit. At this time, continuing to allow data transmission may cause network congestion or excessive resource consumption. Therefore, the system will further determine the token bucket corresponding to the user according to the user identifier to perform more refined traffic control. Through the token bucket mechanism, the system can dynamically manage traffic and determine whether to allow more requests. This two-level judgment mechanism not only ensures the efficient use of network resources, but also provides a flexible rate limit strategy, which can adjust traffic according to the real-time usage of the network, avoid waste or overload of resources, and ensure network stability and fairness in a multi-tenant environment.
[0119] Combining the current network usage information with the judgment mechanism of the network interception threshold, the dynamic management of network resources can be effectively realized, ensuring the fair allocation of each virtualized network resource while avoiding the waste and overload of network resources. This mechanism ensures efficient and stable operation in the virtualized network environment, while improving the overall network service quality.
[0120] By applying the solution of the embodiments of this specification, a more flexible speed limit strategy is implemented by combining user identification and virtualized network identification for flow control. In addition, a token bucket mechanism is introduced. Based on the judgment of the user traffic interception situation, whether to allow the data transmission request to pass is determined by obtaining the number of remaining tokens in the token bucket. In this way, not only the complexity of setting the traffic interception threshold independently for each virtual network is reduced, but also more sophisticated traffic management is achieved. Compared with the traditional solution, the newly added technical feature of combining user identification and virtualized network identification can effectively improve the flexibility of the system in handling different users and virtual networks, while optimizing the utilization of storage resources and avoiding the problem of resource waste or shortage.
[0121] Corresponding to the above method embodiment, this specification also provides a data processing method embodiment applied to the flow control terminal, see Figure 3 , Figure 3 A flow chart of a data processing method applied to a flow control terminal provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0122] Step 302: Receive a data transmission request sent by a user terminal, wherein the data transmission request includes a user identifier corresponding to the user terminal, and the user identifier corresponds to at least one virtualized network identifier.
[0123] Step 304: Determine the token bucket corresponding to the user terminal according to the user identifier.
[0124] Step 306: Determine whether the data transmission request is passed based on the token bucket, and transmit the to-be-processed data carried in the data transmission request to the server if the data transmission request is passed.
[0125] In actual applications, the traffic control end is a system component responsible for managing and controlling network traffic, ensuring the reasonable allocation of network resources and the effective implementation of traffic restrictions; data transmission requests are requests initiated by the user end, used to transmit data or access resources in the network. The traffic control end can be understood as a core node or device used to monitor, manage and control data traffic in the network system. It ensures fair allocation and efficient use of network resources by tracking network usage in real time and applying specific policies and restrictions. In a multi-tenant or virtualized network environment, the traffic control end can decide whether to allow data requests to pass based on each user's request, combined with their traffic usage, network interception threshold, and token bucket mechanism. For example, when an enterprise user accesses cloud resources through a VPC gateway, the traffic control end will review and limit their data transmission requests to ensure that they do not exceed the set resource limits, thereby maintaining the network experience of other users.
[0126] The above is a schematic scheme of a data processing method applied to a flow control terminal of the present embodiment. It should be noted that the technical scheme of the data processing method applied to the flow control terminal and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing method applied to the flow control terminal that are not described in detail can all be referred to the description of the technical scheme of the above data processing method.
[0127] The scheme of the embodiment of this specification is applied to determine the token bucket corresponding to the user end by combining the user identifier, and judge whether the data transmission request is passed based on the token bucket. This scheme significantly improves the accuracy of flow control. Compared with the complexity of the traditional method of limiting the speed of each virtual network separately, this method simplifies the flow control mechanism and avoids unnecessary waste of resources. Furthermore, the feasibility of the transmission request is judged by the number of remaining tokens, which realizes the dynamic management of user requests, effectively improves the utilization rate of network resources, ensures the flexible adjustment of network load under different user request conditions, and optimizes the overall performance of flow management.
[0128] See also Figure 4 , Figure 4 An architecture diagram of a data processing system including a flow control terminal provided by an embodiment of the present specification is shown. The data processing system including the flow control terminal may include a client 100, a flow control terminal 200 and a server 300;
[0129] The client 100 is used to send a data transmission request to the flow control terminal 200, wherein the data transmission request includes a user identifier corresponding to the user terminal;
[0130] The traffic control terminal 200 is used to receive a data transmission request sent by the client 100; determine a token bucket corresponding to the user terminal according to the user identifier, wherein the user identifier corresponds to at least one virtualized network identifier; determine whether the data transmission request is passed based on the token bucket, and transmit the to-be-processed data carried in the data transmission request to the server 300 if the data transmission request is passed;
[0131] The server 300 is used to receive the data to be processed sent by the flow control terminal 200, generate a data processing result according to the data to be processed, and send the data processing result to the client 100;
[0132] The client 100 is also used to receive the data processing result sent by the server 300.
[0133] The scheme of the embodiment of this specification is applied. By determining the token bucket in combination with the user identifier at the flow control end, the scheme effectively reduces the need to allocate flow control resources to each user or virtual network separately. Utilizing the token bucket mechanism, after receiving a data transmission request, the method dynamically determines whether the data request is passed or not by the number of remaining tokens in the token bucket, thereby ensuring the accuracy and flexibility of flow management. Compared with traditional methods, this scheme can optimize resource allocation and avoid resource waste under different user requests and network load conditions. At the same time, through the unified management of the flow control end, the overall performance of the system is more efficient, and the scalability of the network and the ability to cope with complex scenarios are improved.
[0134] The data processing system including the flow control terminal may include multiple clients 100, a flow control terminal 200 and a server 300, wherein the client 100 may be referred to as a terminal-side device and the server 300 may be referred to as a cloud-side device. A communication connection may be established between multiple clients 100 through the flow control terminal 200 and the server 300. In the data processing scenario, the flow control terminal 200 and the server 300 are used to provide data processing services between multiple clients 100. Multiple clients 100 may serve as a sender or a receiver respectively, and realize communication through the flow control terminal 200 and the server 300.
[0135] The user can interact with the traffic control terminal 200 and the server 300 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the data processing scenario, the user can publish a data stream to the traffic control terminal 200 through the client 100, and the traffic control terminal 200 publishes the data stream to the server 300 after screening. The server 300 generates a data processing result based on the data stream and pushes the data processing result to other clients that have established communication.
[0136] The client 100 is connected to the flow control terminal 200 and the server 300 through a network. The network provides a medium for the communication link between the client 100 and the flow control terminal 200 and the server 300. The network may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the flow control terminal 200 and the server 300.
[0137] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 300, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0138] The server 300 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that support models used on clients, and servers that process data sent by clients. It should be noted that the server 300 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0139] It is worth noting that the data processing method provided in the embodiments of this specification is generally executed by the flow control terminal, but in other embodiments of this specification, the client and the server may also have similar functions to the flow control terminal, thereby executing the data processing method provided in the embodiments of this specification. In other embodiments, the data processing method provided in the embodiments of this specification may also be jointly executed by the client, the flow control terminal, and the server.
[0140] Corresponding to the above method embodiments, this specification also provides a data processing embodiment applied to a cloud device, see Figure 5 , Figure 5A flow chart of a data processing method applied to a cloud device provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0141] Step 502: Receive a data transmission request sent by an end-side device, wherein the data transmission request includes a user identifier corresponding to the end-side device and data to be processed, and the user identifier corresponds to at least one virtualized network identifier.
[0142] Step 504: Determine the token bucket corresponding to the user according to the user identifier, and determine whether the data transmission request is passed based on the token bucket.
[0143] Step 506: When the data transmission request is approved, a data processing result is generated based on the data to be processed, and the data processing result is sent to the terminal side device.
[0144] In practical applications, the data processing result is the output data generated after processing based on the user's request, which is usually the final result after the system calculates or operates based on the input data and rules; the data to be processed is the data content that needs to be operated or processed in the data transmission request sent by the user.
[0145] The data to be processed refers to the specific data content carried by the user when initiating a data transmission request. These data may undergo different operations during the system processing, such as calculation, storage, conversion, etc., and finally generate data processing results. For example, when a user uploads a file through the network, requests to perform a project operation, or performs data analysis, the data to be processed is the input content of these operations. The system completes the corresponding processing tasks based on these inputs and outputs the results.
[0146] The data processing result can be understood as the final output generated by the system after calculating, converting or analyzing the data to be processed. In a network or cloud environment, the data processing result is usually the feedback or results after the user's request operation is completed. For example, when a user sends a data processing request through the VPC gateway to process certain project data, the system will generate a data processing result after the processing is completed. The result may be the result of file generation, database update, or calculation analysis, and then return the result to the user's device. In cloud computing scenarios, the efficiency and accuracy of data processing results are crucial to user experience and system performance.
[0147] The above is a schematic scheme of data processing applied to cloud devices in this embodiment. It should be noted that the technical scheme of data processing applied to cloud devices and the above-mentioned data processing method and the technical scheme of data processing method applied to cloud devices belong to the same concept, and the details of the technical scheme of data processing applied to cloud devices that are not described in detail can be referred to the description of the above-mentioned data processing method and the technical scheme of data processing method applied to cloud devices.
[0148] By applying the scheme of the embodiments of this specification, the token bucket is determined by receiving the data transmission request sent by the end-side device and combining it with the user identifier, and the scheme effectively improves the management efficiency of data transmission. Through the token bucket mechanism, the system can dynamically determine the passing status of the data transmission request according to the number of remaining tokens, and realizes accurate speed limit management of different user requests. Compared with the traditional scheme, this scheme reduces the complexity of setting up a flow control mechanism independently for each user, and optimizes resource allocation to effectively cope with the fluctuation of user requests. In addition, the system can quickly generate corresponding processing results based on the data to be processed, ensure the efficiency of the data processing process and the rational use of resources, and further improve the overall system performance.
[0149] See also Figure 6 , Figure 6 An architecture diagram of a data processing system provided by an embodiment of the present specification is shown, and the data processing system may include a terminal-side device 400 and a cloud-side device 500;
[0150] The end-side device 400 is used to send a data transmission request to the cloud-side device 500, wherein the data transmission request includes a user identifier corresponding to the end-side device and data to be processed;
[0151] The cloud-side device 500 is used to receive a data transmission request sent by the cloud-side device 500; determine a token bucket corresponding to the user according to the user identifier, and judge whether the data transmission request is passed based on the token bucket, wherein the user identifier corresponds to at least one virtualized network identifier; if the data transmission request is passed, generate a data processing result based on the data to be processed; and send the data processing result to the end-side device 400;
[0152] The terminal-side device 400 is also used to receive the data processing results sent by the cloud-side device 500.
[0153] The solution of the embodiment of this specification is applied, and the solution realizes more efficient flow control by dynamically managing the token bucket in the cloud-side device in combination with the user identifier. The cloud-side device reduces the burden of allocating flow control resources to each user individually by determining the corresponding token bucket according to the user identifier and judging whether the data transmission request is passed based on the remaining resources in the token bucket. This technical feature not only simplifies the complexity of flow management, but also improves the response speed to data requests. When processing a large number of data requests, the solution can flexibly adjust resource allocation, effectively avoid waste or shortage of resources, and ensure stable processing capacity during peak network loads.
[0154] The data processing system may include multiple end-side devices 400 and a cloud-side device 500. Multiple end-side devices 400 may establish communication connections through the cloud-side device 500. In the data processing scenario, the cloud-side device 500 is used to provide data processing services between multiple end-side devices 400. Multiple end-side devices 400 may serve as a sending end or a receiving end, respectively, and realize communication through the cloud-side device 500.
[0155] It is worth noting that the data processing method provided in the embodiments of this specification is generally executed by the cloud-side device, but in other embodiments of this specification, the terminal-side device may also have similar functions to the cloud-side device, thereby executing the data processing method provided in the embodiments of this specification. In other embodiments, the data processing method provided in the embodiments of this specification may also be jointly executed by the terminal-side device and the cloud-side device.
[0156] The above is a schematic scheme of a data processing system of this embodiment. It should be noted that the technical scheme of the data processing system and the technical scheme of the data processing system including the flow control terminal are of the same concept, and the details not described in detail in the technical scheme of the data processing system can be referred to the description of the technical scheme of the data processing system including the flow control terminal.
[0157] The following combination Figure 7 , taking the application of the data processing method provided in this specification in virtualized network data processing as an example, the data processing method is further described. Figure 7 A processing flow chart of a virtualized network data processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0158] Step 702: Receive a data transmission request, and extract a user identifier and a virtualized network identifier of the transmission request.
[0159] Step 704: Determine whether the user identifier and the virtualized network identifier match the list of users to be determined. If not, execute step 712; if yes, execute step 706.
[0160] Step 706: Determine whether the current network usage information of the virtual private network corresponding to the virtualized network identifier in the sending request reaches a set threshold. If not, execute step 712; if yes, execute step 708.
[0161] Step 708: Obtain the number of tokens currently available in the token bucket associated with the user identifier.
[0162] Step 710: Determine whether the currently available number of tokens supports the data transmission request. If so, execute step 712; if not, execute step 714.
[0163] Step 712: Allow the data transmission request to pass.
[0164] Step 714: Reject the data transmission request.
[0165] By applying the solution of the embodiment of this specification, data processing and flow control are performed by combining the user identifier and the virtualized network identifier, and the solution realizes more efficient resource management. By judging whether the user identifier and the virtualized network identifier hit the list of users to be judged, and performing flow control according to the current usage of the virtual private network, unnecessary speed limit operations can be effectively avoided. In addition, by obtaining the number of tokens currently available in the token bucket associated with the user identifier, resource allocation is further optimized. When there are enough tokens, data requests are allowed to pass, otherwise the requests are rejected, ensuring the flexibility of the system under different flow conditions, reducing resource waste and improving processing efficiency.
[0166] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Figure 8 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present specification. Figure 8 As shown, the device comprises:
[0167] The receiving module 802 is configured to receive a data transmission request sent by a user, wherein the data transmission request includes a user identifier corresponding to the user, and the user identifier corresponds to at least one virtualized network identifier;
[0168] A determination module 804 is configured to determine a token bucket corresponding to the user according to the user identifier;
[0169] The judgment module 806 is configured to judge whether the data transmission request is passed based on the token bucket, and transmit the to-be-processed data carried in the data transmission request if the data transmission request is passed.
[0170] Optionally, the determining module 804 is further configured to:
[0171] Obtain at least one initial token bucket and an initial user identifier corresponding to each initial token bucket;
[0172] An initial token bucket having an initial user identifier identical to the user identifier is determined as the token bucket corresponding to the user.
[0173] Optionally, the determining module 806 is further configured to:
[0174] Obtaining the number of remaining tokens in the token bucket and the number of required tokens for the data transmission request;
[0175] In a case where the number of required tokens is greater than the number of remaining tokens, determining that the data transmission request has not been approved;
[0176] When the required number of tokens is less than or equal to the remaining number of tokens, it is determined that the data transmission request is passed.
[0177] Optionally, the data processing device further includes a user traffic interception module configured to:
[0178] Obtain a list of users to be determined, wherein the list of users to be determined includes at least one piece of information of a user to be determined, and the information of the user to be determined includes an identifier of the user to be determined and a user traffic interception threshold;
[0179] In the case where the user identifier is included in each user identifier to be determined, obtaining used traffic information corresponding to the user identifier, and judging whether the data transmission request is passed according to the used traffic information and the user traffic interception threshold corresponding to the user identifier;
[0180] When the user identifier is not included in the user identifiers to be determined, it is determined that the data transmission request is passed.
[0181] Optionally, the user traffic interception module is further configured to:
[0182] In the case where the used traffic information is less than the user traffic interception threshold, determining a token bucket corresponding to the user according to the user identifier, and judging whether the data transmission request is passed based on the token bucket;
[0183] When the used traffic information is greater than or equal to the user traffic interception threshold, it is determined that the data transmission request has not been passed.
[0184] Optionally, the data processing device further includes a virtualized network traffic interception module configured to:
[0185] Obtain the virtualized network identifier in the data transmission request sent by the user, and the network interception threshold corresponding to each virtualized network;
[0186] Determine the network interception threshold corresponding to the virtualized network identifier based on the network interception threshold corresponding to each virtualized network;
[0187] Whether the data transmission request is passed is determined according to the network interception threshold corresponding to the virtualized network identifier.
[0188] Optionally, the virtualized network traffic interception module is further configured to:
[0189] Determine a requested virtualized network corresponding to the virtualized network identifier;
[0190] Determine the request network interception threshold corresponding to the request virtualized network according to the network interception threshold corresponding to each virtualized network;
[0191] The requested network interception threshold is determined to be the network interception threshold corresponding to the virtualized network identifier.
[0192] Optionally, the virtualized network traffic interception module is further configured to:
[0193] Obtaining current network usage information corresponding to the virtualized network identifier;
[0194] In a case where the current network usage information is less than the network interception threshold, determining that the data transmission request is passed;
[0195] In the case that the current network usage information is greater than or equal to the network interception threshold, a token bucket corresponding to the user is determined according to the user identifier, and whether the data transmission request is passed is determined based on the token bucket.
[0196] By applying the solution of the embodiments of this specification, through the multi-module design of the data processing device, especially the combination of user identification and token bucket, the system can accurately control the traffic of each user. The device introduces a user traffic interception module and a virtualized network traffic interception module, which respectively make real-time judgments on the user traffic and the usage of the virtualized network, ensuring that the data transmission request passes smoothly under the premise of meeting the traffic threshold. Compared with traditional technologies, this solution not only improves the system's flexible adaptability to different users and virtualized networks, but also optimizes resource allocation through real-time judgment of the remaining token amount, avoiding resource waste and processing bottlenecks.
[0197] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.
[0198] Fig. 9 The structure block diagram of a computing device 900 provided according to an embodiment of the present specification is shown. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.
[0199] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0200] In one embodiment of the present specification, the above components of the computing device 900 and Fig. 9 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig. 9 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0201] The computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 900 may also be a mobile or stationary server.
[0202] Among them, the processor 920 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned data processing method, the data processing method applied to the traffic control end, and the data processing method applied to the cloud device.
[0203] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the data processing method, the data processing method applied to the flow control terminal, and the data processing method applied to the cloud device are of the same concept. For details not described in detail in the technical scheme of the computing device, please refer to the description of the technical scheme of the data processing method, the data processing method applied to the flow control terminal, and the data processing method applied to the cloud device.
[0204] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned data processing method, the data processing method applied to the traffic control terminal, and the data processing method applied to the cloud device.
[0205] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the data processing method, the data processing method applied to the flow control terminal, and the data processing method applied to the cloud device are of the same concept. For details not described in detail in the technical scheme of the storage medium, please refer to the description of the technical scheme of the data processing method, the data processing method applied to the flow control terminal, and the data processing method applied to the cloud device.
[0206] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned data processing method, the data processing method applied to the traffic control terminal, and the data processing method applied to the cloud device.
[0207] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the data processing method, the data processing method applied to the flow control terminal, and the data processing method applied to the cloud device are of the same concept. For details not described in detail in the technical scheme of the computer program, please refer to the description of the technical scheme of the data processing method, the data processing method applied to the flow control terminal, and the data processing method applied to the cloud device.
[0208] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0209] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0210] 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 embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders 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 embodiments of this specification.
[0211] 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.
[0212] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A data processing method, comprising: Receive a data transmission request sent by a user, wherein the data transmission request includes a user identifier of the user, the user identifier corresponds to at least two virtualized network identifiers, and the virtualized network identifier is an identifier corresponding to a virtual private cloud; Determine a token bucket corresponding to the user according to the user identifier, wherein the token bucket corresponds to at least two virtual private clouds; It is determined whether the data transmission request is passed based on the token bucket, and if the data transmission request is passed, the to-be-processed data carried in the data transmission request is transmitted.
2. The method according to claim 1, after receiving the data transmission request sent by the user, the method further comprises: Obtain a list of users to be determined, wherein the list of users to be determined includes at least one piece of information of a user to be determined, and the information of the user to be determined includes an identifier of the user to be determined and a user traffic interception threshold; In the case where the user identifier is included in each user identifier to be determined, obtaining used traffic information corresponding to the user identifier, and judging whether the data transmission request is passed according to the used traffic information and the user traffic interception threshold corresponding to the user identifier; When the user identifier is not included in the user identifiers to be determined, it is determined that the data transmission request is passed.
3. The method according to claim 2, judging whether the data transmission request is passed according to the used traffic information and the user traffic interception threshold corresponding to the user identifier, comprises: In the case where the used traffic information is less than the user traffic interception threshold, determining a token bucket corresponding to the user according to the user identifier, and judging whether the data transmission request is passed based on the token bucket; When the used traffic information is greater than or equal to the user traffic interception threshold, it is determined that the data transmission request has not been passed.
4. The method according to claim 1, before determining the token bucket corresponding to the user according to the user identifier, the method further comprises: Obtain the virtualized network identifier in the data transmission request sent by the user, and the network interception threshold corresponding to each virtualized network; Determine the network interception threshold corresponding to the virtualized network identifier based on the network interception threshold corresponding to each virtualized network; Whether the data transmission request is passed is determined according to the network interception threshold corresponding to the virtualized network identifier.
5. The method according to claim 4, determining the network interception threshold corresponding to the virtualized network identifier based on the network interception threshold corresponding to each virtualized network, comprising: Determine a requested virtualized network corresponding to the virtualized network identifier; Determine the request network interception threshold corresponding to the request virtualized network according to the network interception threshold corresponding to each virtualized network; The requested network interception threshold is determined to be the network interception threshold corresponding to the virtualized network identifier.
6. The method according to claim 4, judging whether the data transmission request is passed according to the network interception threshold corresponding to the virtualized network identifier, comprises: Obtaining current network usage information corresponding to the virtualized network identifier; In a case where the current network usage information is less than the network interception threshold, determining that the data transmission request is passed; In the case that the current network usage information is greater than or equal to the network interception threshold, a token bucket corresponding to the user is determined according to the user identifier, and whether the data transmission request is passed is determined based on the token bucket.
7. The method according to claim 1, judging whether the data transmission request is passed based on the token bucket, comprises: Obtaining the number of remaining tokens in the token bucket and the number of required tokens for the data transmission request; In a case where the number of required tokens is greater than the number of remaining tokens, determining that the data transmission request has not been approved; When the required number of tokens is less than or equal to the remaining number of tokens, it is determined that the data transmission request is passed.
8. The method according to claim 1, determining the token bucket corresponding to the user according to the user identifier, comprises: Obtain at least one initial token bucket and an initial user identifier corresponding to each initial token bucket; An initial token bucket having an initial user identifier identical to the user identifier is determined as the token bucket corresponding to the user.
9. A data processing method, applied to a flow control terminal, comprising: Receive a data transmission request sent by a user terminal, wherein the data transmission request includes a user identifier corresponding to the user terminal, the user identifier corresponds to at least two virtualized network identifiers, and the virtualized network identifier is an identifier corresponding to a virtual private cloud; Determine a token bucket corresponding to the user terminal according to the user identifier, wherein the token bucket corresponds to at least two virtual private clouds; Based on the token bucket, it is determined whether the data transmission request is passed, and if the data transmission request is passed, the to-be-processed data carried in the data transmission request is transmitted to the server.
10. A data processing method, applied to a cloud device, comprising: A data transmission request sent by a receiving end-side device, wherein the data transmission request includes a user identifier corresponding to the end-side device and data to be processed, the user identifier corresponds to at least two virtualized network identifiers, and the virtualized network identifier is an identifier corresponding to a virtual private cloud; Determine a token bucket corresponding to the user according to the user identifier, and judge whether the data transmission request is passed based on the token bucket, wherein the token bucket corresponds to at least two virtual private clouds; In a case where the data transmission request is approved, a data processing result is generated based on the data to be processed, and the data processing result is sent to the terminal side device.
11. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 10 are implemented.
12. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
13. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Private cloud access control method and device, equipment and medium
CN116264522A
Token obtaining method and apparatus, server, user terminal, and medium
WO2019120217A1