Access request processing method and device, equipment, medium and product
By dynamically adjusting the QPS expectation value based on the available bandwidth amount of the server and the average bandwidth usage of the access request, the problem of low bandwidth resource utilization in the prior art is solved, and more efficient bandwidth resource utilization and full utilization of resources are achieved.
Patent Information
- Application Number
- CN202411153823.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the prior art, the server's query rate per second (QPS) request is limited to a fixed value and cannot be adjusted dynamically, resulting in low bandwidth resource utilization and prone to waste or insufficient problems.
Dynamically adjust the QPS expectation value based on the available bandwidth of the server and the average bandwidth usage of access requests to flexibly process access requests and improve the utilization of bandwidth resources.
By dynamically adjusting the QPS expectation value, making full use of the available bandwidth, avoiding the waste of bandwidth resources and improving the bandwidth resource utilization of the server.
Smart Images

Figure CN119211363A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to an access request processing method, device, equipment, medium and product. Background Art
[0002] The query rate per second (QPS) is the number of requests received by the server per unit time, which is usually used to indicate the performance processing capacity of the server. In order to avoid server overload, the server is usually set with a fluctuation range of the query rate per second request limit (limit QPS), or a minimum request limit (low limit QPS) and a maximum request limit (high limit QPS) to limit the number of requests received by the server per unit time.
[0003] Currently, the above request limits are usually fixed values set based on human experience, which cannot fully utilize the server resources. Summary of the invention
[0004] The present disclosure provides an access request processing method, apparatus, device, medium and product, which can improve the bandwidth resource utilization of a server.
[0005] In a first aspect, the present disclosure provides an access request processing method, comprising: receiving an access request from a requesting end; processing the access request according to a QPS expected value of a server and the number of access requests; the QPS expected value is determined according to the available bandwidth of the server and the average bandwidth usage of the access requests.
[0006] In a second aspect, the present disclosure also provides an access request processing device, comprising: a communication unit and a processing unit; the communication unit is used to receive an access request from a requesting end; the processing unit is used to process the access request according to the QPS expected value of the server and the number of access requests; the QPS expected value is determined based on the available bandwidth of the server and the average bandwidth usage of the access requests.
[0007] In a third aspect, the present disclosure further provides an electronic device, comprising: a processor and a memory configured to store processor executable instructions; wherein the processor is configured to execute instructions to implement the method of the first aspect above.
[0008] In a fourth aspect, the present disclosure further provides a non-volatile storage medium having a computer program stored thereon. When the computer program is read and executed, the method of the first aspect described above is implemented.
[0009] In a fifth aspect, the present disclosure further provides a computer program product, comprising instructions, which, when executed on an electronic device, enable the electronic device to implement the method of the first aspect.
[0010] The access request processing method provided by the present disclosure can process the access request according to the QPS expected value of the server and the number of access requests after receiving the access request from the request end. Among them, the QPS expected value is determined according to the available bandwidth of the server and the average bandwidth usage of the access request. From the above, it can be seen that the present application can flexibly adjust the QPS expected value of the electronic device based on the available bandwidth of the electronic device and the average bandwidth usage of the access request, ensuring that the electronic device can fully utilize the available bandwidth to process the access request after receiving the access request, thereby improving the utilization rate of bandwidth resources and avoiding the waste of bandwidth resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0012] Figure 1 A schematic diagram of a communication system provided in an embodiment of the present disclosure;
[0013] Figure 2 A flowchart of a method for processing an access request provided by an embodiment of the present disclosure;
[0014] Figure 3 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0015] Figure 4 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0016] Figure 5 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0017] Figure 6 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0018] Figure 7 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0019] Figure 8 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0020] Fig. 9 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0021] Fig.10 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0022] Fig.11A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0023] Fig.12 A flowchart of another access request processing method provided by an embodiment of the present disclosure;
[0024] Fig.13 A schematic diagram of the structure of an access request processing device provided by an embodiment of the present disclosure;
[0025] Fig.14 A schematic block diagram of an electronic device provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0027] It is understood that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0028] It should also be understood that the term “comprising” indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or components.
[0029] The access request processing method provided in the embodiment of the present application can be applied to on-demand scheduling scenarios.
[0030] Specifically, the server may store a large number of multimedia resources in advance. When a user wishes to obtain a certain multimedia resource, the user may perform an operation of obtaining the certain multimedia resource on the user device. The user device may send a request message for obtaining the multimedia resource to the server in response to the operation performed by the user. Correspondingly, the server may send the multimedia resource to the user device in response to the request message for obtaining the multimedia resource sent by the user device, so that the user device displays the multimedia resource for the user to view.
[0031] Optionally, the on-demand scheduling scenario can be applied to a content distribution network technology (Peer to Peer Content Delivery Network, PCDN) scheduling system, and can also be applied to a on-demand scheduling system developed by various enterprises, which is not limited in this application.
[0032] In actual applications, multiple user devices usually send request messages to the server at the same time, and the server's request message processing capability is limited. Therefore, in order to avoid server overload, a limit QPS fluctuation range, or low limit QPS and high limit QPS are usually set for the server to limit the number of requests received by the server per unit time.
[0033] For example, when a fluctuation range of the L imit QPS is set for the server, the fluctuation range may be 10% up and down. Assuming that the L imit QPS set for the server is to process a maximum of 1000 request messages per second, the server may process a maximum of 900-1100 request messages per second according to actual needs. If there are request messages that exceed the fluctuation range of the L imit QPS, the server may discard the excess request messages.
[0034] As another example, when low light imit QPS and high light imit QPS are set for the server, assuming that the low light imit QPS set for the server is to process a maximum of 500 request messages per second, and the high light imit QPS is to process a maximum of 1000 request messages per second, the server can process 500-1000 request messages per second.
[0035] At present, the above-mentioned request limit values (i.e., l imit QPS, or, low l imit QPS and high l imit QPS) are usually fixed values, which cannot meet the dynamic needs of the server. For example, the request message sent by the request end usually uses a certain bandwidth resource, and the bandwidth resource usage of the request message sent by the request end at different times may be different (for example, the bandwidth resource usage is different if the request content is different). If the chip processing performance of the server can process a preset number of request messages, and the bandwidth resource usage of the preset number of request messages at different times is different, if a fixed request limit value is used, it may cause a waste of bandwidth resources or insufficient bandwidth resources.
[0036] In response to the above problems, the present application proposes an access request processing method, which can process the access request according to the QPS expected value of the server and the number of access requests after receiving the access request from the requesting end. Among them, the QPS expected value is determined based on the available bandwidth of the server and the average bandwidth usage of the access request. From the above, it can be seen that the present application can flexibly adjust the QPS expected value of the electronic device based on the available bandwidth of the electronic device and the average bandwidth usage of the access request, ensuring that the electronic device can fully utilize the available bandwidth to process the access request after receiving the access request, thereby improving the utilization rate of bandwidth resources and avoiding the waste of bandwidth resources.
[0037] The access request processing method provided in the embodiment of the present application can be applied to Figure 1 The PCDN scheduling system shown. Figure 1 A schematic diagram of a structural scenario of a communication system provided in an embodiment of the present disclosure, the communication system may include: at least one requesting end 101, at least one scheduling end 102 ( Figure 1 Taking one dispatching terminal 102 as an example), at least one CDN node device 103 ( Figure 1 Taking one CDN node device 103 as an example for description) and at least one source data storage device 104 ( Figure 1 The following description is made taking one source data storage device 104 as an example).
[0038] like Figure 1 As shown, in the PCDN scheduling scenario, the requesting end 101 held by the user can send an access request for requesting to obtain data corresponding to the user operation to the scheduling end 102 in response to the user operation. For example, when the user wants to view a certain video resource, the operation of viewing the video resource can be performed on the requesting end 101. Accordingly, the requesting end 101 can send an access request for requesting to obtain the video resource to the scheduling end 102 in response to the user operation.
[0039] After receiving the access request sent by the requesting end 101, the scheduling end 102 can determine the CDN node device 103 to be forwarded, that is, the target CDN node device 103, according to the resource to be accessed by the access request and the identifier of the requesting end 101. The target CDN node device 103 stores the data to be requested by the requesting end 101, such as the video resource in the above example.
[0040] It should be noted that since the scheduling end 102 usually forwards the access request of the requesting end 101, it does not need to find the data requested by the access request. Therefore, the available bandwidth of the scheduling end 102 can generally meet the forwarding requirements of the access request. However, in special circumstances (for example, a large number of requesting ends 101 send a large number of access requests to the scheduling end 102 at the same time), the available bandwidth of the scheduling end 102 may not be able to meet the forwarding requirements of the current large number of access requests. In this case, the scheduling end 102 can determine whether to discard a certain number of access requests based on the QPS expected value of the scheduling end 102 and the number of access requests. Among them, the QPS expected value is determined based on the available bandwidth of the scheduling end 102 and the average bandwidth usage of the access requests.
[0041] After determining the target CDN node device 103, the scheduling end 102 can directly forward the access request of the requesting end 101 to the target CDN node device 103, or return the routing information of the target CDN node device 103 to the requesting end 101, so that the requesting end 101 sends the access request to the target CDN node device 103 according to the routing information of the target CDN node device 103.
[0042] After receiving the access request, the target CDN node device 103 may process the access request according to the QPS expectation value of the target CDN node device 103 and the number of access requests. The QPS expectation value is determined according to the available bandwidth of the target CDN node device 103 and the average bandwidth usage of the access requests.
[0043] Specifically, when the number of access requests is less than or equal to the expected QPS value and the target CDN node device 103 stores the data requested by the access request, the target CDN node device 103 may send the data requested by the access request to the requesting end 101, such as the video resource in the above example.
[0044] When the number of access requests is less than or equal to the QPS expected value and the target CDN node device 103 does not store the data requested by the access request, the target CDN node device 103 may forward the access request to the source data storage device 104 so that the source data storage device 104 sends the data requested by the access request to the requesting end 101.
[0045] Optionally, the above-mentioned requesting end 101 can be called user equipment (UE), access terminal, subscriber unit (subscriber unit), user station, mobile station (MS), mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device. The terminal in the embodiments of the present application can be a mobile phone, a cellular phone, a smart phone, a tablet computer, a wireless data card, a personal digital assistant (PDA), a wireless modem, a handset, a laptop computer, a machine type communication (MTC) terminal, a computer with a wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a smart home device (for example, a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a robotic arm, a workshop equipment, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a vehicle-mounted terminal, a roadside unit with a terminal function, and a wireless terminal in a smart city. unit, RSU), etc., flying equipment (e.g., intelligent robot, hot air balloon, drone, airplane), etc. The terminal may also be other devices with terminal functions, for example, the terminal may also be a device that functions as a terminal in device to device (D2D) communication.
[0046] Optionally, since the embodiments of the present application are generally applied to on-demand scheduling scenarios, the CDN node device 103 may be a CDN node server deployed in different areas, and the source data storage device 104 may be a server for different applications.
[0047] The above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides 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, network acceleration services (content delivery network, CDN), as well as big data and artificial intelligence platforms.
[0048] Optionally, the various devices in the above-mentioned PCDN scheduling system can be connected through a network. The network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a fourth generation mobile communication technology (4G) network, a fifth generation mobile communication technology (5G) network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to a server, etc. For example, multiple users can be online through different terminals and connected and synchronized with each other through appropriate networks to support multiple users using the same application.
[0049] Understandably, Figure 1 The communication system provided in the embodiment of the present application is only an example in the embodiment of the present application. The communication system and the corresponding scenarios described in the embodiment of the present application are for more clearly illustrating the technical solution provided in the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0050] For example, the above is only one implementation of the access request processing method provided in the embodiment of the present application. The steps performed by the above CDN node device 103 can also be performed on other devices connected to the CDN node device 103, and the steps performed by the above scheduling end 102 can also be performed on other devices connected to the scheduling end 102. Since the access request processing method provided in the present application can be applied to the scheduling end 102 and the CDN node device 103, the scheduling end 102 and the CDN node device 103 are collectively referred to as the server end in the embodiment of the present application. The following text takes the server end as the execution subject to describe in detail the access request processing method provided in the embodiment of the present application.
[0051] Figure 2 FIG. 1 is a flow chart of a method for processing an access request provided by an embodiment of the present application. Figure 2 As shown, the access request processing method includes: S201-S202.
[0052] S201. The server receives an access request from the requester.
[0053] Optionally, the number of the access requests may be one or more. In practical applications, the number of access requests is usually multiple, for example, 100.
[0054] Optionally, the access request may be multiple access requests sent by different requesting ends at a certain moment (eg, current moment), or may be multiple access requests sent by at least one requesting end in a certain time period (eg, current time period).
[0055] Exemplarily, in a video-on-demand scheduling scenario, the requesting end may send a request message for acquiring multimedia resources to the server end.
[0056] A request message sent by a terminal is an access request, which can be sent in the form of a request message. An access request can use a certain amount of bandwidth resources.
[0057] After receiving an access request from the requester, in order to facilitate subsequent determination of the QPS expectation and process the access request according to the QPS expectation, the server may obtain the average bandwidth usage of the access request and the available bandwidth of the server.
[0058] In some embodiments, the average bandwidth usage of the access request may be obtained in the following manner:
[0059] Since the bandwidth resources used by access requests at different times may be different, the above average bandwidth usage may be the average bandwidth usage in a preset time period or the average bandwidth usage at a certain moment (such as the current moment).
[0060] In one achievable method, in order to subsequently determine the QPS expected value related to the bandwidth resources, the server can obtain the number of access requests received by the server in a preset time period, and the total bandwidth usage of the access requests received by the server in the preset time period, and determine the ratio of the above-mentioned total bandwidth usage to the number of the above-mentioned access requests as the average bandwidth usage of the access requests received by the server in the preset time period.
[0061] In another possible implementation, the server may also obtain in real time the number of access requests received by the server at the current moment, and the bandwidth usage of each access request, and determine the ratio of the total bandwidth usage of the access requests to the number of access requests as the average bandwidth usage of the access requests received by the server at the current moment.
[0062] In another possible implementation, the server may also obtain the average bandwidth usage of access requests received by the server in a historical time period (a time period before a preset time period), and predict the average bandwidth usage of access requests received by the server in the preset time period based on the average bandwidth usage of access requests received by the server in the historical time period.
[0063] In another possible implementation, the server may also obtain an average bandwidth usage of access requests for accessing a reference device, and determine the average bandwidth usage of access requests for accessing the reference device as the average bandwidth usage of access requests received by the server. The reference device may be a device with the same or similar application scenario as the server (e.g., other servers in a server group to which the server belongs), and the same or similar device parameters such as device model and processing performance.
[0064] In another possible implementation, the server may also periodically obtain the average bandwidth usage of access requests for accessing the reference device or the server, and determine the average bandwidth usage of a certain time period in the previous cycle as the average bandwidth usage of the time period in the current cycle. For example, the server may obtain the average bandwidth usage of each hour in 12 hours every day, and determine the average bandwidth usage of the hour from 12:00 to 1:00 yesterday as the average bandwidth usage of the hour from 12:00 to 1:00 today.
[0065] In some embodiments, the available bandwidth of the server can be obtained by:
[0066] In one practicable manner, the server may obtain the maximum bandwidth of the server, and determine the available bandwidth of the server according to the maximum bandwidth of the server.
[0067] In another possible implementation, the server may also obtain the available bandwidth of the server in a historical time period (a time period before a preset time period), and predict the available bandwidth of the server in a preset time period based on the available bandwidth of the server in the historical time period.
[0068] In yet another achievable manner, the server may further obtain the available bandwidth of a reference device, and determine the available bandwidth of the reference device as the available bandwidth of the server.
[0069] In another possible implementation, the server may also periodically obtain the available bandwidth of the server or reference device, and determine the available bandwidth of a certain time period in the previous cycle as the available bandwidth of the time period in the current cycle. For example, the server may obtain the available bandwidth of each hour in 12 hours every day, and determine the available bandwidth of the hour from 12:00 to 1:00 yesterday as the available bandwidth of the hour from 12:00 to 1:00 today.
[0070] S202: The server processes the access request according to the QPS expectation value of the server and the number of access requests.
[0071] The QPS expected value is determined based on the available bandwidth of the server and the average bandwidth usage of the access request.
[0072] Specifically, after obtaining the average bandwidth usage and the available bandwidth, in order to subsequently process access requests according to the QPS expected value, the server may determine the server's QPS expected value according to the average bandwidth usage and the available bandwidth.
[0073] The QPS expected value is used to control the server to schedule bandwidth resources according to the QPS expected value, that is, to process access requests.
[0074] Specifically, after obtaining the average bandwidth usage and available bandwidth of the access request, in order to accurately determine the QPS expected value related to the bandwidth resources, the server can determine the QPS expected value of the server based on the average bandwidth usage and the available bandwidth, so as to facilitate the subsequent control of the server to schedule bandwidth resources according to the QPS expected value.
[0075] In one practicable manner, the server can determine the QPS expectation value based on the ratio of available bandwidth to average bandwidth usage. In this way, the ratio of available bandwidth to average bandwidth usage can ensure that the bandwidth resources of the server can be fully utilized, improve the utilization rate of bandwidth resources, and avoid bandwidth resource waste.
[0076] In another possible implementation, when the server has sufficient available bandwidth, that is, when the average bandwidth usage is less than or equal to the available bandwidth, the server can also determine the QPS expectation value based on the number of access requests to ensure that all access requests are processed when the server has sufficient available bandwidth.
[0077] In another achievable manner, when the available bandwidth of the server is sufficient, that is, when the average bandwidth usage is less than or equal to the available bandwidth, the server may also determine the QPS expected value based on the average bandwidth usage of the historical time period. For example, when the available bandwidth of the server is sufficient, if the average bandwidth usage of the historical time period is in a stable state (that is, the fluctuation range of the average bandwidth usage at each moment in the historical time period does not exceed the preset fluctuation range), the server may continue to use the QPS upper limit value of the historical time period as the QPS expected value.
[0078] After determining the QPS expected value of the server, since the QPS expected value of the server is related to the available bandwidth of the server, that is, when the number of access requests received by the server is the QPS expected value, the bandwidth resource utilization of the server can be optimized. Therefore, the server can process the access request according to the QPS expected value of the server and the number of access requests.
[0079] In one achievable manner, when the number of access requests is greater than the QPS expected value, it indicates that the number of access requests currently received has exceeded the number expected by the server. In this case, the server may discard a preset number of access requests so that the bandwidth resource utilization of the server can be optimized.
[0080] In another possible implementation, when the number of access requests is less than or equal to the QPS expected value, it indicates that the number of currently received access requests does not exceed the number expected by the server. In this case, the server can send the data requested by the access request to the requesting end.
[0081] In some embodiments, the server needs to determine the QPS expected value of the server before processing the access request based on the QPS expected value of the server and the number of access requests. Figure 2 ,like Figure 3 As shown, before S203, the access request processing method provided in the embodiment of the present application further includes:
[0082] S301. The server determines an expected QPS value according to a ratio of available bandwidth to average bandwidth usage.
[0083] In this way, through the ratio of available bandwidth to average bandwidth usage, the server can determine the expected QPS value for bandwidth resource scheduling based on the available bandwidth, avoiding the problem of low data transmission efficiency caused by the server's available bandwidth failing to meet the QPS, or the problem of bandwidth resource waste caused by the QPS failing to fully utilize the available bandwidth.
[0084] In one achievable method, the server can periodically obtain the average bandwidth usage of the access requests received by the server at multiple times, and determine the expected number of access requests received by the server at multiple times. Subsequently, the expected number of access requests received by the server at the current time, i.e., the QPS expected value, can be determined flexibly based on the expected number of access requests received by the server at multiple times through a sliding window method, thereby ensuring the smoothness of the QPS expected value and avoiding the problem of unstable resource scheduling caused by sudden changes in the QPS expected value.
[0085] In another achievable method, the server can obtain in real time the average bandwidth usage of the access requests received by the server at the current moment, and determine the expected number of access requests at the current moment, i.e., the expected QPS value, based on the ratio of the available bandwidth to the average bandwidth usage corresponding to the current moment, thereby ensuring the real-time nature of the expected QPS value and improving the flexibility of resource scheduling.
[0086] In some embodiments, when the average bandwidth usage is the average bandwidth usage of access requests received by the server in a preset time period, the average bandwidth usage of access requests received by the server in the preset time period includes the average bandwidth usage of access requests received by the server in each sub-time period in multiple sub-time periods; the multiple sub-time periods are multiple sub-time periods within a preset time period before the current moment. In this case, combined with Figure 3 ,like Figure 4 As shown, in the above S301, the method for determining the QPS expected value by the server according to the ratio of the available bandwidth to the average bandwidth usage specifically includes:
[0087] S401. For any sub-time period among multiple sub-time periods, the server determines a ratio of an available bandwidth amount in the sub-time period to an average bandwidth usage amount of access requests received by the server in the sub-time period as an expected number of access requests received by the server in the sub-time period.
[0088] According to the above description, the available bandwidth and average bandwidth usage of the server may change over time. Therefore, in order to accurately determine the expected QPS value, it is first necessary to determine the expected number of access requests received by the server in each sub-time period. Then, the server can obtain the available bandwidth of the sub-time period, and determine the ratio of the available bandwidth of the sub-time period to the average bandwidth usage corresponding to the sub-time period as the expected number of access requests received by the server in the sub-time period.
[0089] S402: The server determines an average value of the expected number of access requests received by the server in multiple sub-time periods as an expected QPS value.
[0090] Of course, in order to accurately obtain the expected QPS value, the server can also perform data preprocessing on the expected number of access requests corresponding to each sub-time period (for example, removing the maximum value, removing the minimum value, etc.), and determine the average value of the expected number of access requests corresponding to multiple sub-time periods after data preprocessing as the expected QPS value.
[0091] For example, assuming that the current time is 20:10:00 on a certain day, since the historical time period closest to the current time may be most similar to the average bandwidth usage at the current time, the server can obtain the average bandwidth usage for the time period from 20:09:00 to 20:10:00 on the same day (i.e., the preset time period).
[0092] The average bandwidth usage in the time period from 20:09:00 to 20:10:00 may include the average bandwidth usage per second, i.e., the average bandwidth usage in the second from 20:09:00 to 20:09:01, the average bandwidth usage in the second from 20:09:01 to 20:09:02, ..., the average bandwidth usage in the second from 20:09:59 to 20:10:00, a total of 60 sub-time periods (i.e., the average bandwidth usage of multiple sub-time periods).
[0093] For the average bandwidth usage within one second from 20:09:00 to 20:09:01 among the above 60 average bandwidth usages, assuming that the average bandwidth usage within this second is 1M, and the available bandwidth in the time period from 20:09:00 to 20:10:00 is 100M, it can be determined that the expected number of access requests from 20:09:00 to 20:09:01 is 100 access requests.
[0094] Similarly, for the average bandwidth usage in other seconds, the expected number of access requests per second in the time period from 20:09:00 to 20:10:00 can be determined by the above method to obtain the expected number of 60 access requests.
[0095] In order to accurately determine the expected QPS value at the current time (ie, 20:00:00), the server may determine the average value of the expected number of the above 60 access requests as the expected QPS value.
[0096] As time changes, the server can flexibly determine the expected number of access requests at the current moment, that is, the expected QPS value, based on the expected number of access requests at multiple moments through a sliding window, thereby ensuring the smoothness of the expected QPS value and avoiding the problem of unstable resource scheduling caused by sudden changes in the expected QPS value.
[0097] For example, when the current time is 20:10:01, the server can obtain the expected number of access requests at 20:00:00, and replace the expected number of access requests from 20:09:00 to 20:09:01 among the above 60 expected numbers of access requests, that is, determine the QPS expected value at 20:10:01 based on the expected number of access requests from 20:09:01 to 20:10:01. By analogy, the expected number of access requests per second, that is, the QPS expected value is determined based on the expected number of access requests in multiple sub-time periods closest to the current time, which improves the accuracy of the QPS expected value.
[0098] In some embodiments, in combination Figure 3 ,like Figure 5 As shown, in the above S301, the method for determining the QPS expected value by the server according to the ratio of the available bandwidth to the average bandwidth usage specifically includes:
[0099] S501: When the average bandwidth usage is less than or equal to the available bandwidth, the server determines the QPS expected value according to the number of access requests.
[0100] Specifically, when the average bandwidth usage is less than or equal to the available bandwidth, it indicates that the available bandwidth of the server is sufficient. In this case, the server can directly determine the QPS expected value according to the number of access requests.
[0101] In one practicable manner, the server may determine the number of access requests as the QPS expected value.
[0102] In another achievable method, the server may determine the product of the number of access requests and a preset coefficient as the QPS expected value. The preset coefficient may be flexibly set according to demand, or may be set according to the ratio of available bandwidth to average bandwidth usage. For example, when the ratio of available bandwidth to average bandwidth usage is greater than a certain threshold, it indicates that the server has a large amount of available bandwidth margin. In this case, the preset coefficient may be set to a larger value. Accordingly, when the ratio of available bandwidth to average bandwidth usage is less than a certain threshold, it indicates that the server has a small amount of available bandwidth margin. In this case, the preset coefficient may be set to a smaller value.
[0103] In another achievable method, the QPS expected value is determined based on the number of access requests and the preset fluctuation value. The preset fluctuation value can be flexibly set according to demand, or can be set according to the ratio of available bandwidth to average bandwidth usage. For example, when the ratio of available bandwidth to average bandwidth usage is greater than a certain threshold, it indicates that the server has a large amount of available bandwidth margin. In this case, the preset fluctuation value can be set to a larger value. Correspondingly, when the ratio of available bandwidth to average bandwidth usage is less than a certain threshold, it indicates that the server has a small amount of available bandwidth margin. In this case, the preset fluctuation value can be set to a smaller value.
[0104] In some embodiments, Figure 6 As shown, the average bandwidth usage of the access requests received by the server in the preset time period can be obtained in the following manner, that is, the access request processing method provided in the embodiment of the present application also includes:
[0105] S601: The server obtains the number of access requests received by the server in a preset time period.
[0106] Specifically, the number of access requests received by the server in different time periods may be different. For example, in a VOD scheduling scenario, 20:00-21:00 is a time period with more access requests from the requester to the server, while 4:00-5:00 is a time period with fewer access requests from the requester to the server.
[0107] Therefore, in order to accurately determine the average bandwidth usage in the preset time period, the server may obtain the number of access requests in the preset time period.
[0108] S602: The server obtains the total bandwidth usage of access requests received by the server in a preset time period.
[0109] Specifically, since each access request uses a certain amount of bandwidth resources, the server may determine the sum of bandwidth usage of the access requests in a preset time period as the total bandwidth usage of the access requests received by the server in the preset time period.
[0110] S603: The server determines the ratio of the total bandwidth usage to the number of access requests as the average bandwidth usage of the access requests received by the server in a preset time period.
[0111] In some embodiments, Figure 7 As shown, the average bandwidth usage of the access requests received by the server in the preset time period can also be obtained in the following manner, that is, the access request processing method provided in the embodiment of the present application also includes:
[0112] S701: The server obtains the average bandwidth usage of access requests received by the server in a historical time period.
[0113] The historical time period is the time period before the preset time period.
[0114] Specifically, within a certain period, the average bandwidth usage corresponding to the access requests may have a certain regularity. Therefore, the server can obtain the average bandwidth usage of the access requests received by the server in the historical time period, so as to subsequently predict the average bandwidth usage of the access requests received by the server in the preset time period.
[0115] S702: The server predicts an average bandwidth usage of access requests received by the server in a preset time period based on the average bandwidth usage of access requests received by the server in a historical time period.
[0116] In one practicable manner, the server may predict the average bandwidth usage of access requests received by the server in a preset time period based on a change trend of the average bandwidth usage of access requests received by the server in a historical time period.
[0117] In yet another achievable manner, the server may input the average bandwidth usage of access requests received by the server in a historical time period into a prediction model to predict the average bandwidth usage of access requests received by the server in a preset time period.
[0118] The prediction model may be obtained by training based on training samples, which may include average bandwidth usage of access requests received by the server in a large number of different time periods.
[0119] In some embodiments, Figure 8 As shown, the available bandwidth of the server can be obtained in the following manner, that is, the access request processing method provided in the embodiment of the present application also includes:
[0120] S801. The server obtains the maximum bandwidth of the server.
[0121] Optionally, the maximum bandwidth may be set by the server at the factory, or may be set by the server according to current processing performance, which is not limited in the embodiments of the present application.
[0122] S802: The server determines the available bandwidth according to the maximum bandwidth.
[0123] In one practicable manner, the server may directly determine the maximum bandwidth of the server as the available bandwidth of the server.
[0124] In another possible implementation, if the maximum bandwidth of the server is directly determined as the available bandwidth of the server, the stability of the server may be reduced when the maximum bandwidth of the server is fully utilized. Therefore, the server may also obtain the maximum bandwidth of the server, and determine the product of the maximum bandwidth and the preset proportional factor as the available bandwidth.
[0125] The preset scaling factor is related to the processing performance of the server, and the value range of the preset scaling factor is (0,1).
[0126] Exemplarily, when the processing performance of the server is better, for example, the processor of the server is a multi-core processor, the preset scaling factor can be set to a larger value, such as 0.9.
[0127] As another example, when the processing performance of the server is poor, for example, the processor of the server is a single-core processor, the preset scaling factor may be set to a smaller value, such as 0.7.
[0128] Optionally, the available bandwidth of the server may be a fixed value, or may vary with the processing performance of the server or other factors (such as network fluctuations). Therefore, the server may periodically adjust the preset proportional factor so that the server can obtain the accurate available bandwidth.
[0129] In some embodiments, it can be seen from the above description that the available bandwidth of the server may be different in different time periods. Therefore, in the case where the available bandwidth is the available bandwidth of the server in a preset time period, such as Fig. 9 As shown, the available bandwidth of the server can also be obtained in the following manner, that is, the access request processing method provided in the embodiment of the present application also includes:
[0130] S901. The server obtains the available bandwidth of the server in a historical time period.
[0131] The historical time period is the time period before the preset time period.
[0132] Specifically, within a certain period, the available bandwidth of the server may have certain regularity. Therefore, the server can obtain the available bandwidth of the server in a historical time period to facilitate subsequent prediction of the available bandwidth of the server in a preset time period.
[0133] S902: The server predicts the available bandwidth of the server in a preset time period based on the available bandwidth of the server in a historical time period.
[0134] In one practicable manner, the server may predict the available bandwidth of the server in a preset time period according to a change trend of the available bandwidth of the server in a historical time period.
[0135] In yet another achievable manner, the server may input the available bandwidth of the server in a historical time period into a prediction model to predict the available bandwidth of the server in a preset time period.
[0136] The prediction model may be obtained by training based on training samples, which may include a large number of available bandwidths in different time periods.
[0137] In some embodiments, in combination Figure 2 ,like Fig.10 As shown, in the above S202, the method for the server to process the access request according to the QPS expectation value of the server and the number of access requests specifically includes:
[0138] S1001. When the number of access requests is greater than the QPS expected value, the server discards a preset number of access requests and sends data requested by the access requests that are not discarded to the requester.
[0139] The preset number is the difference between the number of access requests and the expected QPS value.
[0140] Specifically, when processing an access request, the server may process the current access request based on the current QPS expected value, or it may process the access request at a certain moment (for example, the first moment) after the QPS expected value is determined, based on the QPS expected value, or it may process the access request at the corresponding moment based on the QPS expected value in the first N moments after the QPS expected value is determined. The embodiments of the present application are not limited to this.
[0141] If the number of access requests is greater than the QPS expected value, it means that the number of access requests currently received has exceeded the number expected by the server. In this case, the server can discard a preset number of access requests to optimize the bandwidth resource utilization of the server.
[0142] Optionally, when the server discards a preset number of access requests, it may discard them according to the order in which the access requests are received, or it may discard them according to the priority of the access requests, which is not limited in this embodiment of the present application.
[0143] Of course, the server may not discard a preset number of access requests, but may process all access requests in a queue, and this embodiment of the present application does not limit this.
[0144] or,
[0145] S1002: When the number of access requests is less than or equal to the QPS expected value, the server sends the data requested by the access request to the requester.
[0146] When the number of access requests is less than or equal to the QPS expected value, it means that the number of access requests currently received does not exceed the number expected by the server. In this case, the server can send the data requested by the access request to the requester.
[0147] The above mainly introduces in detail the various steps of implementing the access request processing method provided in the embodiment of the present application. For ease of understanding, the following describes the overall process of implementing the access request processing method provided in the embodiment of the present application. Fig.11 As shown, the access request processing method provided in the embodiment of the present application specifically includes:
[0148] S1101. The server obtains the current QPS and the total current bandwidth usage of at least one access request.
[0149] The total bandwidth usage satisfies the following formula:
[0150] sum bandwidth=sum(current bandwidth).
[0151] Wherein, sum bandwidth is used to represent the total bandwidth usage of at least one access request, and currentbandwidth is used to represent the current bandwidth usage of each access request.
[0152] S1102: The server determines the ratio of the current total bandwidth usage to the current QPS as the current average bandwidth usage.
[0153] The average bandwidth usage satisfies the following formula:
[0154] average bandwidth=sum bandwidth / current qps.
[0155] Among them, average bandwidth is used to indicate the average bandwidth usage, and current qps is used to indicate the current QPS.
[0156] S1103: The server obtains the current available bandwidth of the server.
[0157] The amount of available bandwidth satisfies the following formula:
[0158] avable bandwith=max bandwidth*avable ratio.
[0159] Among them, avable bandwidth is used to indicate the available bandwidth, max bandwidth is used to indicate the current maximum bandwidth, and avable ratio is used to indicate the preset ratio factor.
[0160] S1104. The server determines the ratio of the current available bandwidth to the current average bandwidth usage as the current QPS upper limit.
[0161] The current QPS upper limit satisfies the following formula:
[0162] bandwidth qps=avable bandwith / average bandwidth.
[0163] Bandwidth qps is used to indicate the current QPS upper limit.
[0164] S1105. The server periodically obtains multiple QPS upper limit values, and determines a QPS expected value according to the multiple QPS upper limit values.
[0165] Among them, the QPS expected value is used to represent the expected number of access requests at the target time, and multiple QPS upper limit values are used to represent the expected number of access requests at multiple times. The target time is located after multiple times, and the multiple times are multiple times closest to the target time. The above period can be a period corresponding to a unit calculation interval (unit interval), for example, one second is a period (also called a schedule unit). The QPS expected value is the upper limit of the number of requests per second (schedule qps) that can be scheduled at the target time.
[0166] S1106. The server processes the access request according to the QPS expectation value at the target time.
[0167] The above mainly introduces the entire process of implementing the access request processing method provided by the embodiment of the present application from the server side, and the access request processing method provided by the embodiment of the present application implemented by the server side is generally applied to the PCDN scheduling system. Therefore, the following describes the timing flow of implementing the access request processing method provided by the embodiment of the present application. Fig.12 As shown, the access request processing method provided in the embodiment of the present application specifically includes:
[0168] S1201. The requesting end sends an access request to the scheduling end.
[0169] Specifically, in the PCDN scheduling scenario, the requesting end held by the user can send an access request for requesting to obtain data corresponding to the user operation to the scheduling end in response to the user operation. For example, when the user wants to view a certain video resource, the operation of viewing the video resource can be performed on the requesting end. Correspondingly, the requesting end can send an access request for requesting to obtain the video resource to the scheduling end in response to the user operation.
[0170] The access request includes an identifier of the requesting end and an identifier of the data requested by the access request.
[0171] Optionally, the number of the access requests may be one or more. In practical applications, the number of access requests is usually multiple, for example, 100.
[0172] Optionally, the access request may be multiple access requests sent by different requesting ends at a certain moment (eg, current moment), or may be multiple access requests sent by at least one requesting end in a certain time period (eg, current time period).
[0173] S1202: The scheduling end determines a target CDN node device corresponding to the access request.
[0174] Specifically, after receiving the access request sent by the requesting end, the scheduling end can determine the CDN node device to be forwarded, that is, the target CDN node device, according to the identifier of the data requested by the access request and the identifier of the requesting end. The target CDN node device stores the data requested by the requesting end.
[0175] When the data requested by the requesting end is stored on multiple CDN node devices, the target CDN node device may be the CDN node device closest to the requesting end.
[0176] It should be noted that since the dispatching end usually forwards the access request of the requesting end and does not need to find the data requested by the access request, the available bandwidth of the dispatching end can generally meet the forwarding requirements of the access request. However, in special circumstances (for example, a large number of requesting ends send a large number of access requests to the dispatching end at the same time), the available bandwidth of the dispatching end may not be able to meet the forwarding requirements of the current large number of access requests. In this case, the dispatching end can determine whether to discard a certain number of access requests based on the QPS expected value of the dispatching end and the number of access requests. Among them, the QPS expected value is determined based on the available bandwidth of the dispatching end and the average bandwidth usage of the access requests.
[0177] After determining the target CDN node device, the scheduling end may execute S1203A or S1203B1-S1203B2.
[0178] S1203A: The scheduling end forwards the access request to the target CDN node device.
[0179] S1203B1. The dispatching end returns the routing information of the target CDN node device to the requesting end.
[0180] S1203B2. The requesting end sends an access request to the target CDN node device according to the routing information of the target CDN node device.
[0181] S1204: The target CDN node device obtains the available bandwidth of the target CDN node device and the average bandwidth usage of the access requests, and determines the QPS expectation value of the server according to the available bandwidth of the target CDN node device and the average bandwidth usage of the access requests.
[0182] Optionally, the specific implementation method of the target CDN node device obtaining the available bandwidth of the target CDN node device can refer to the above Figure 6 or Figure 7 The implementation method provided will not be described in detail here.
[0183] Optionally, the specific implementation method of the target CDN node device obtaining the average bandwidth usage of the access request can refer to the above Figure 8 or Fig. 9 The implementation method provided will not be described in detail here.
[0184] Optionally, the specific implementation method of the target CDN node device determining the QPS expectation value of the server can refer to the above Figure 3 , Figure 4 or Figure 5 The implementation method provided will not be described in detail here.
[0185] S1205A: When the number of access requests is less than or equal to the QPS expected value and the target CDN node device stores the data requested by the access request, the target CDN node device sends the data requested by the access request to the requesting end.
[0186] S1205B1. When the number of access requests is less than or equal to the expected QPS value and the target CDN node device does not store the data requested by the access request, the target CDN node device forwards the access request to the source data storage device.
[0187] S1205B2. The target CDN node device receives the data requested by the access request sent by the source data storage device, and sends the data requested by the access request to the requesting end.
[0188] S1205C1. When the number of access requests is greater than the expected QPS value, the target CDN node device discards a preset number of access requests, where the preset number is the difference between the number of access requests and the expected QPS value.
[0189] S1205C2: When the target CDN node device stores the data requested by the access request that has not been discarded, the target CDN node device sends the data requested by the access request that has not been discarded to the requesting end.
[0190] S1205C3: When the target CDN node device does not store the data requested by the non-discarded access request, the target CDN node device forwards the non-discarded access request to the source data storage device.
[0191] S1205C4. The target CDN node device receives the data requested by the non-discarded access request sent by the source data storage device, and sends the data requested by the non-discarded access request to the requesting end.
[0192] The above mainly introduces the scheme of the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the server includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0193] The embodiment of the present application can divide the functional units of the server according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0194] like Fig.13 As shown, the embodiment of the present application provides an access request processing device, including: a communication unit 1301 and a processing unit 1302;
[0195] The communication unit 1301 is used to receive an access request from a requesting end;
[0196] The processing unit 1302 is used to process the access request according to the expected query rate per second QPS of the server and the number of access requests; the expected QPS is determined according to the available bandwidth of the server and the average bandwidth usage of the access requests.
[0197] Optionally, the processing unit 1302 is further configured to determine an expected QPS value according to a ratio of the available bandwidth to the average bandwidth usage.
[0198] Optionally, in the case where the average bandwidth usage is the average bandwidth usage of the access request in a preset time period, the average bandwidth usage of the access request in the preset time period includes the average bandwidth usage of the access request in each sub-time period in a plurality of sub-time periods; the plurality of sub-time periods are a plurality of sub-time periods within a preset time length before a current moment;
[0199] The processing unit 1302 is specifically configured to:
[0200] For any sub-time period among the multiple sub-time periods, a ratio of the available bandwidth of the sub-time period to the average bandwidth usage of the sub-time period is determined as the expected number of access requests of the sub-time period;
[0201] An average value of the expected number of access requests in multiple sub-time periods is determined as the expected QPS value.
[0202] Optionally, the processing unit 1302 is further configured to determine the QPS expected value according to the number of access requests when the average bandwidth usage is less than or equal to the available bandwidth.
[0203] Optionally, the processing unit 1302 is specifically configured to:
[0204] The number of access requests is determined as the QPS expected value;
[0205] Alternatively, the product of the number of access requests and a preset coefficient is determined as the QPS expected value;
[0206] Alternatively, the QPS expectation value is determined according to the number of access requests and a preset fluctuation value.
[0207] Optionally, the communication unit 1301 is further configured to obtain the number of access requests in a preset time period;
[0208] The communication unit 1301 is also used to obtain the total bandwidth usage of the access request in a preset time period;
[0209] The processing unit 1302 is further configured to determine an average bandwidth usage of the access requests in the preset time period by calculating a ratio of the total bandwidth usage in the preset time period to the number of access requests in the preset time period.
[0210] Optionally, the communication unit 1301 is further used to obtain an average bandwidth usage of access requests in a historical time period; the historical time period is a time period before a preset time period;
[0211] The processing unit 1302 is further configured to predict an average bandwidth usage of access requests in a preset time period according to an average bandwidth usage of access requests in a historical time period.
[0212] Optionally, the communication unit 1301 is further configured to obtain a maximum bandwidth of the electronic device;
[0213] The processing unit 1302 is further configured to determine the available bandwidth according to the maximum bandwidth.
[0214] Optionally, the processing unit 1302 is specifically configured to:
[0215] The product of the maximum bandwidth and a preset scaling factor is determined as the available bandwidth; the preset scaling factor is related to the processing performance of the electronic device;
[0216] Alternatively, the maximum amount of bandwidth is determined to be the amount of available bandwidth.
[0217] Optionally, in the case where the available bandwidth is the available bandwidth of the electronic device in a preset time period, the communication unit 1301 is further used to obtain the available bandwidth of the electronic device in a historical time period; the historical time period is a time period before the preset time period;
[0218] The processing unit 1302 is further configured to predict the available bandwidth of the electronic device in a preset time period according to the available bandwidth of the electronic device in a historical time period.
[0219] Optionally, the processing unit 1302 is specifically configured to:
[0220] In the case where the number of access requests is greater than the expected QPS value, a preset number of access requests are discarded, and the data requested by the access requests that are not discarded are sent to the requesting end; the preset number is the difference between the number of access requests and the expected QPS value;
[0221] Alternatively, when the number of access requests is less than or equal to the QPS expected value, the data requested by the access request is sent to the requesting end.
[0222] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the access request processing method provided by the present disclosure.
[0223] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable an electronic device to execute the access request processing method provided by the present disclosure.
[0224] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, including a computer program, which implements the access request processing method provided by the present disclosure when executed by a processor.
[0225] Fig.14A schematic block diagram of an example electronic device 1400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0226] like Fig.14 As shown, the electronic device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory 1402 or a computer program loaded from a storage unit 1408 into a random access memory 1403. In the random access memory (Random Access Memory, RAM) 1403, various programs and data required for the operation of the electronic device 1400 can also be stored. The computing unit 1401, the read-only memory (Read-Only Memory, ROM) 1402 and the RAM 1403 are connected to each other through a bus 1404. An input / output (Input / Output, I / O) interface 1405 is also connected to the bus 1404.
[0227] Multiple components in the electronic device 1400 are connected to the input / output interface 1405, including: an input unit 1406, such as a keyboard, a mouse, etc.; an output unit 1407, such as various types of displays, speakers, etc.; a storage unit 1408, such as a disk, an optical disk, etc.; and a communication unit 1409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1409 allows the electronic device 1400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0228] The computing unit 1401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors, and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1401 performs the various methods and processes described above, such as a data matching method. For example, in one embodiment, the data matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1408. In one embodiment, part or all of the computer program may be loaded and / or installed on the electronic device 1400 via ROM 1402 and / or communication unit 1409. When the computer program is loaded into RAM 1403 and executed by the computing unit 1401, one or more steps of the data matching method described above may be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform the data matching method in any other appropriate manner (eg, by means of firmware).
[0229] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays, application specific integrated circuits, application specific standard parts (ASSP), system on chip systems (System On Chip, SOC), complex programmable logic devices (Complex Programmable Logic Device, CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0230] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0231] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical fibers, portable compact disk read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0232] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user, such as a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0233] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
[0234] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0235] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.
[0236] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for processing an access request, characterized in that: include: Receive access request from requester; Processing the access request according to the expected query rate per second (QPS) of the server and the number of the access requests; The QPS expected value is determined according to the available bandwidth of the server and the average bandwidth usage of the access request.
2. The method according to claim 1, characterized in that The method further comprises: The QPS expected value is determined according to a ratio of the available bandwidth to the average bandwidth usage.
3. The method according to claim 2, characterized in that In the case where the average bandwidth usage is the average bandwidth usage of access requests received by the server in a preset time period, the average bandwidth usage of access requests received by the server in the preset time period includes: the average bandwidth usage of access requests received by the server in each sub-time period in a plurality of sub-time periods; the plurality of sub-time periods are a plurality of sub-time periods within a preset time length before a current moment; The determining the QPS expected value according to the ratio of the available bandwidth to the average bandwidth usage includes: For any sub-time period of the multiple sub-time periods, determine the ratio of the available bandwidth of the sub-time period to the average bandwidth usage of the access requests received by the server in the sub-time period as the expected number of access requests received by the server in the sub-time period; An average value of the expected number of access requests received by the server in the multiple sub-time periods is determined as the QPS expected value.
4. The method according to claim 1, characterized in that: The method further comprises: When the average bandwidth usage is less than or equal to the available bandwidth, the QPS expected value is determined according to the number of the access requests.
5. The method according to claim 4, characterized in that The determining the QPS expected value according to the number of the access requests includes: Determine the number of the access requests as the QPS expected value; Alternatively, the product of the number of access requests and a preset coefficient is determined as the QPS expected value; Alternatively, the QPS expected value is determined according to the number of the access requests and a preset fluctuation value.
6. The method according to claim 3, characterized in that The method further comprises: Obtaining the number of access requests received by the server in the preset time period; Obtaining the total bandwidth usage of the access requests received by the server in the preset time period; The average bandwidth usage of the access requests received by the server in the preset time period is determined by taking the ratio of the total bandwidth usage to the number of the access requests.
7. The method according to claim 3, characterized in that The method further comprises: Obtaining an average bandwidth usage of access requests received by the server in a historical time period; the historical time period is a time period before the preset time period; According to the average bandwidth usage of the access requests received by the server in the historical time period, the average bandwidth usage of the access requests received by the server in the preset time period is predicted.
8. The method according to claim 1, characterized in that The method further comprises: Obtaining the maximum bandwidth of the server; The available bandwidth amount is determined according to the maximum bandwidth amount.
9. The method according to claim 8, characterized in that The step of determining the available bandwidth amount according to the maximum bandwidth amount includes: The product of the maximum bandwidth and a preset proportional factor is determined as the available bandwidth; the preset proportional factor is related to the processing performance of the server; Alternatively, the maximum bandwidth amount is determined as the available bandwidth amount.
10. The method according to claim 1, characterized in that In the case where the available bandwidth is the available bandwidth of the server in a preset time period, the method further includes: Obtaining the available bandwidth of the server in a historical time period; the historical time period is a time period before the preset time period; The available bandwidth of the server in the preset time period is predicted according to the available bandwidth of the server in the historical time period.
11. The method according to any one of claims 1 to 10, characterized in that: The processing of the access request according to the expected query rate per second (QPS) of the server and the number of the access requests includes: In the case where the number of the access requests is greater than the QPS expected value, discarding a preset number of access requests, and sending the data requested by the access requests that are not discarded to the requesting end; the preset number is the difference between the number of the access requests and the QPS expected value; Alternatively, when the number of the access requests is less than or equal to the QPS expected value, the data requested by the access request is sent to the requesting end.
12. An access request processing device, characterized in that: include: a communication unit and a processing unit; The communication unit is used to receive an access request from a requesting end; The processing unit is used to process the access request according to the QPS expected value of the server and the number of the access requests; the QPS expected value is determined according to the available bandwidth of the server and the average bandwidth usage of the access requests.
13. An electronic device, characterized in that: The electronic device comprises: processor; a memory configured to store instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1-11.
14. A non-volatile storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is read and executed, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product comprising instructions, characterized in that When the instruction is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Bandwidth accurate control method and device based on content distribution network index system
CN112804110A
CDN resource scheduling method and device, electronic equipment and storage medium
CN116233027A
Access request flow limiting method and device, equipment and storage medium
CN117134946A
Method of performing smart hybrid acceleration on resources, device, medium and apparatus
US20200045054A1
