CN111711650B - Network request scheduling method, device, equipment and storage medium - Google Patents

Network request scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN111711650B
CN111711650B CN202010307776.3A CN202010307776A CN111711650B CN 111711650 B CN111711650 B CN 111711650B CN 202010307776 A CN202010307776 A CN 202010307776A CN 111711650 B CN111711650 B CN 111711650B
Authority
CN
China
Prior art keywords
network
queue
request
observation
network request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010307776.3A
Other languages
Chinese (zh)
Other versions
CN111711650A (en
Inventor
罗熹之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010307776.3A priority Critical patent/CN111711650B/en
Publication of CN111711650A publication Critical patent/CN111711650A/en
Application granted granted Critical
Publication of CN111711650B publication Critical patent/CN111711650B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS

Abstract

The application relates to a method, a device, equipment and a storage medium for scheduling a network request, wherein the method comprises the following steps: acquiring a first network request; judging whether the current network environment is a weak network environment or not; if so, adding the first network request into the normal queue; otherwise, judging whether the domain name information carried by the first network request is the marked domain name information, if so, adding the first network request into the observation queue, otherwise, adding the first network request into the normal queue, wherein the marked domain name information is the domain name information of the network request, the time consumption of which is greater than a first threshold value; wherein the observation queue and the normal queue have equal execution authority. The method and the device are used for solving the problem of network congestion caused by time consumption of network requests or overtime of the network requests.

Description

Network request scheduling method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for scheduling a network request.
Background
The service of an application program is extremely complex, and the number of network requests is extremely large. An application may have hundreds of network requests at a time. However, the network requests that the system can support are limited and can result in a large amount of service queuing if the current network environment is poor or some network requests are time consuming. For example, some services have server failures, which results in long time consumption, and causes the requests to be blocked in the queue to occupy resources; or, in the weak network state, some critical requests are often blocked by some unimportant requests due to the time-out of the requests, so that the probability of network request failure is increased, and finally, the user experience is very poor.
Disclosure of Invention
The application provides a network request scheduling method, device, equipment and storage medium, which are used for solving the problem of network congestion caused by time consumption of a network request or overtime of the network request.
In a first aspect, the present application provides a method for scheduling a network request, where the method includes:
acquiring a first network request;
judging whether the current network environment is a weak network environment or not;
if so, adding the first network request into a normal queue;
otherwise, judging whether the domain name information carried by the first network request is marked domain name information, if so, adding the first network request into an observation queue, otherwise, adding the first network request into the normal queue, wherein the marked domain name information is the domain name information of the network request of which the request time consumption is greater than a first threshold value;
wherein the observation queue and the normal queue have equal execution authority.
Optionally, the normal queue adopts a last-in first-out execution strategy in the weak network environment.
Optionally, before adding the first network request to the observation queue, the method further includes:
judging whether the domain name information carried by a second network request in the observation queue comprises the domain name information carried by the first network request, wherein the second network request is a network request in an execution state in the observation queue;
when judging that the domain name information carried by the second network request in the observation queue comprises the domain name information carried by the first network request, not executing the first network request;
and when judging that the domain name information carried by the second network request in the observation queue does not include the domain name information carried by the first network request, the first network request waits to be executed.
Optionally, before adding the first network request to the normal queue, the method further includes:
judging whether the number of the operation requests of the first network requests of the same domain name information is larger than a second threshold value, wherein the number of the operation requests is the number of the first network requests of the execution state of the same domain name information;
when the number of the operation requests is judged to be larger than the second threshold value, adding the first network request to a storage unit which is arranged at the tail of the normal queue and is in front of the storage unit and waiting for execution;
and when the running request number is not larger than the second threshold value, adding the first network request to the tail or head of the normal queue for execution.
Optionally, after adding the first network request to a normal queue, or after adding the first network request to an observation queue, the method further includes:
calculating the proportion of the number of observation requests in a preset time period, wherein the proportion of the number of the observation requests is the percentage of the number of the observation requests to the total number of the requests, and the total number of the requests is the sum of the number of the observation requests and the number of the normal requests;
wherein, the observation request number is: the number of the first network requests whose request consumed time is greater than the third threshold in the preset time period is as follows: the number of the first network requests within the preset time period for which the request consumption time is not greater than the third threshold value;
adjusting the concurrency number of the observation queue according to the calculated occupation ratio of the observation request number;
wherein the network environment within the preset time period is the non-weak network environment.
Optionally, adjusting the concurrency number of the observation queue according to the calculated percentage of the observation request number includes:
judging whether the calculated proportion of the observation request number exceeds a first preset proportion or not;
when the calculated occupation ratio of the observation request number exceeds the first preset ratio, adjusting the concurrency number of the observation queue to the maximum concurrency number of the observation queue, wherein the maximum concurrency number of the observation queue is a value obtained by multiplying the first preset ratio by a preset total concurrency number;
and when the calculated occupation ratio of the observation request number does not exceed the first preset proportion, adjusting the concurrency number of the observation queue to a value obtained by multiplying the concurrency number occupation ratio of the observation queue by the preset total concurrency number.
Optionally, after determining that the current network environment is a weak network environment, the method further includes:
and increasing the concurrency number of the observation queue until the concurrency number of the observation queue reaches a second preset proportion.
In a second aspect, the present application provides a network request scheduling apparatus, including:
the acquisition module is used for acquiring a first network request;
the judging module is used for judging whether the current network environment is a weak network environment or not;
a first determining module, configured to add the first network request to a normal queue if the current network environment is the weak network environment;
and the second determining module is used for judging whether the domain name information carried by the first network request is marked domain name information or not if the current network environment is not the weak network environment, adding the first network request into an observation queue if the current network environment is not the weak network environment, otherwise, adding the first network request into the normal queue, wherein the marked domain name information is the domain name information of the network request with the request time consumption larger than a first threshold value, and the observation queue and the normal queue have equal execution permission.
In a third aspect, the present application provides an electronic device, comprising: the system comprises a processor, a communication component, a memory and a communication bus, wherein the processor, the communication component and the memory are communicated with each other through the communication bus; the memory for storing a computer program; the processor is used for executing the program stored in the memory and realizing the network request scheduling method.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the network request scheduling method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: the method provided by the embodiment of the application obtains the new network request, judges whether the current network environment is the weak network environment or not, and adds the network request into the normal queue if the current network environment is the weak network environment so as to ensure that the network request can be executed according to the schedule. And if the current network environment is not the weak network environment, judging whether the domain name information carried by the network request is the marked domain name information. And when the judgment result is that the domain name information carried by the network request is the marked domain name information, adding the network request into the observation queue. According to the method, the observation queue is added, so that the network requests marked with the domain name information, namely the network requests with the time consumption larger than the first threshold value are added into the observation queue, and the problem of network congestion caused by overlong request time consumption or overtime network requests of some network requests is solved. In addition, the observation queue and the normal queue have equal execution authority, and the problem that the network request in the observation queue cannot be executed does not occur.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a network request scheduling method in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a scheduling apparatus for network requests in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a network request scheduling method, which is applicable to intelligent devices such as mobile phones, computers, tablets and the like, and also applicable to application programs installed on the intelligent devices such as search-type application programs, video-type application programs, news-type application programs and the like. The method comprises the following specific implementation steps as shown in figure 1:
step 101, a first network request is obtained.
In one embodiment, for example, a news-like application, a user initiates a viewing request when viewing a certain news item, but there may be a case where the news item cannot be accessed due to a network environment, a server failure, or a time-consuming request. At this time, the user cannot access the news, and manually initiates a plurality of viewing requests of the news, or manually initiates a plurality of viewing requests of other news, so that the network requests are too many to be sent. At this time, the view request of the same domain name is instantaneously and concurrently multiple, and actually, the hypertext transfer protocol (HTTP) cannot support so many view requests at the same time, so that false concurrency is caused, a part of the view requests are suspended, and finally, the network request is failed.
And 102, judging whether the current network environment is a weak network environment, if so, executing a step 103, and otherwise, executing a step 104.
Specifically, the network environment is divided into a weak network environment and a non-weak network environment.
Step 103, adding the first network request to the normal queue.
In a specific embodiment, in the weak network environment, the network request is added to the tail of the normal queue, and the normal queue adopts a last-in first-out execution strategy in the weak network environment. In the weak network environment, the normal queue adopts a last-in first-out execution strategy, so as to ensure that more important network requests can be preferentially executed. The last-in first-out execution strategy is formulated as follows: in a weak network environment, a normal queue is not suitable for adopting a first-in first-out execution strategy, because a user important network request is often refreshed by the user, a better execution strategy is last-in first-out at this time, and the purpose is to enable the user important network request to obtain more network resources so as to obtain the maximum possibility of completing the request.
In a specific embodiment, before adding the network requests into the normal queue, it is determined whether the number of running requests of the network requests of the same domain name information in the normal queue is greater than a second threshold, where the number of running requests is the number of network requests of the same domain name information in an execution state. And when the running request number is judged to be larger than the second threshold value, adding the network request to the storage unit which is arranged at the tail of the normal queue and is before the storage unit and waiting for execution. In addition, when the running request number is judged not to be larger than the second threshold value, the network request is added to the tail of the normal queue or the head of the normal queue for execution. Specifically, under the weak network environment, the network request is added to the tail of the queue; and in the non-weak network environment, adding the network request to the head of line. And in the weak network environment, the normal queue adopts a last-in first-out execution strategy, and in the non-weak network environment, the normal queue adopts a first-in first-out execution strategy, so that the more critical network requests of the user are preferentially executed.
Wherein the normal queue has been determined to have remaining storage space prior to adding the network request to the normal queue.
Step 104, determining whether the domain name information carried by the first network request is the marked domain name information, if so, executing step 105, otherwise, executing step 103, wherein the marked domain name information is the domain name information of the network request whose request time consumption is greater than the first threshold, and the observation queue and the normal queue have equal execution permission.
Specifically, the observation queue and the normal queue have equal execution authority, that is, the observation queue and the normal queue can share the concurrency number, that is, network requests in the observation queue and the normal queue have equal opportunities to be executed. For example, assuming that the number of concurrencies for one service IP is 16, the observation queue and the normal queue share the 16 concurrency numbers.
In a specific embodiment, in a non-weak network environment, whether a network request should be added to an observation queue or a normal queue is determined according to whether domain name information carried by the network request is marked. When determining that the domain name information carried by the network request is the marked domain name information, adding the network request into an observation queue; and when determining that the domain name information carried by the network request is not the marked domain name information, adding the network request into a normal queue. The method determines whether the network request should be added into an observation queue or a normal queue by judging whether the domain name information carried in the network request is the marked domain name information, thereby effectively solving the problem of network blockage caused by queuing of the network request which can be quickly completed due to the fact that the request of the individual network request consumes too much time and occupies too much network resources.
Specifically, a new network request may be recorded with a request elapsed time from initiation to completion, and when the request elapsed time of the network request is greater than a first threshold, the domain name information carried by the network request may be marked.
Step 105, adding the first network request to the observation queue.
In a specific embodiment, before adding the first network request into the observation queue, the domain name information of the second network requests in the observation queue is scanned one by one, and whether the domain name information carried by the second network requests in the execution state in the observation queue includes the domain name information carried by the first network request is judged. And when judging that the domain name information carried by the second network request in the observation queue comprises the domain name information carried by the first network request, skipping the first network request, namely not executing the first network request. And when judging that the domain name information carried by the second network request in the observation queue does not include the domain name information carried by the first network request, adding the first network request to the tail of the observation queue to wait for execution.
In addition, when a plurality of network requests of the same domain name information are simultaneously initiated, the network requests of the same domain name information are added into the observation queue, the probability of request failure is further reduced, and the problem of network blockage caused by instantaneous concurrency of a plurality of network requests is solved.
In one embodiment, the percentage of the number of observation requests in the preset time period is calculated after the network request is added to the normal queue, or after the network request is added to the observation queue, or after the network request is successfully requested. The ratio of the observation request number is the percentage of the observation request number to the whole request number, and the whole request number is the sum of the observation request number and the normal request number. Wherein, the number of observation requests is: the number of network requests with the time consumption larger than the third threshold in a preset time period is as follows: and requesting the number of network requests which take no more than a third threshold within a preset time period. And adjusting the concurrency number of the observation queue according to the calculated proportion of the observation request number. Wherein the network environment in the preset time period is a non-weak network environment.
In addition, if there are network requests with successful requests and network requests with unsuccessful requests within the preset time period, the number of requests of network requests with unsuccessful requests is also used as the number of observation requests. Counting the number of requests of which the request time consumption is greater than a third threshold value in a preset time period of the network requests which are successfully requested, and taking the number of the requests as an observation request number; and counting the number of requests which require time consumption which is not more than a third threshold value within a preset time period of the network requests which are successfully requested as a normal request number. Then, the ratio of the number of observation requests in the preset time period is calculated according to the number of observation requests and the number of normal requests. The number of observation requests at this time is: the sum of the number of the network requests which are unsuccessful in request and the number of the network requests which are successful in request and consume more than a third threshold value in a preset time period.
In a specific embodiment, the capacity expansion of the concurrent number of the observation queue is not unlimited, and it needs to be determined whether the percentage of the observation request number exceeds a first preset ratio. And when the calculated occupation ratio of the observation request number exceeds a first preset ratio, adjusting the concurrency number of the observation queue to the maximum concurrency number of the observation queue, wherein the maximum concurrency number of the observation queue is a value obtained by multiplying the first preset ratio by a preset total concurrency number. For example, if the first preset ratio is 50%, and the preset total concurrency number is 16, the maximum concurrency number of the observation queue is 8. The percentage of the number of observation requests calculated is 60%, but the percentage of the number of observation requests calculated exceeds the first preset percentage, so that the concurrency number of the observation queue needs to be adjusted to 8, which is the maximum concurrency number of the observation queue.
On the other hand, when the calculated occupation ratio of the observation request number does not exceed the first preset proportion, the concurrency number of the observation queue is adjusted to a value obtained by multiplying the occupation ratio of the concurrency number of the observation queue by the preset total concurrency number. For example, if the first preset ratio is 50%, and the preset total concurrency number is 16, the maximum concurrency number of the observation queue is 8. The percentage of the number of the calculated observation requests is 30%, the percentage of the number of the calculated observation requests does not exceed a first preset percentage, and the concurrency number of the observation queue is adjusted to be 5.
In a specific embodiment, after the current network environment is determined to be the weak network environment, the concurrency number of the observation queue is increased until the concurrency number ratio of the observation queue reaches a second preset proportion, the observation queue adopts a first-in first-out execution strategy in the weak network environment, and the value of the second preset proportion can be set according to actual conditions. For example, the second preset percentage is set to be 50%, and the concurrence percentage of the observation queue is directly increased to 50% after the current network environment is determined to be the weak network environment. In addition, the first preset proportion and the second preset proportion may be the same or different.
The method provided by the embodiment of the application obtains the new network request, judges whether the current network environment is the weak network environment or not, and adds the network request into the normal queue if the current network environment is the weak network environment so as to ensure that the network request can be executed according to the schedule. And if the current network environment is not the weak network environment, judging whether the domain name information carried by the network request is the marked domain name information. And when the judgment result is that the domain name information carried by the network request is the marked domain name information, adding the network request into an observation queue. According to the method, the observation queue is added, so that the network requests marked with the domain name information, namely the network requests with the time consumption larger than the first threshold value are added into the observation queue, and the problem of network congestion caused by overlong request time consumption or overtime network requests of some network requests is solved. In addition, the observation queue and the normal queue have equal execution authority, and the problem that the network request in the observation queue cannot be executed does not occur.
Based on the same concept, the present application provides a network request scheduling apparatus in an embodiment, and the specific implementation of the apparatus may refer to the description of the method embodiment, and repeated details are not repeated, as shown in fig. 2, the apparatus mainly includes:
the obtaining module 201 is configured to obtain the first network request.
The determining module 202 is configured to determine whether the current network environment is a weak network environment.
The first determining module 203 is configured to add the first network request to the normal queue if the current network environment is the weak network environment.
The second determining module 204 is configured to, if the current network environment is not the weak network environment, determine whether domain name information carried by the first network request is marked domain name information, if so, add the first network request to the observation queue, otherwise, add the first network request to the normal queue, where the marked domain name information is domain name information of a network request whose request time consumption is greater than a first threshold, and where the observation queue and the normal queue have equal execution permission.
Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in fig. 3, the electronic device mainly includes: a processor 301, a communication component 302, a memory 303, and a communication bus 304, wherein the processor 301, the communication component 302, and the memory 303 communicate with each other via the communication bus 304. Wherein, the memory 303 stores programs that can be executed by the processor 301, and the processor 301 executes the programs stored in the memory 303, implementing the following steps: acquiring a first network request; judging whether the current network environment is a weak network environment or not; if so, adding the first network request into the normal queue; otherwise, judging whether the domain name information carried by the first network request is the marked domain name information, if so, adding the first network request into the observation queue, otherwise, adding the first network request into the normal queue, wherein the marked domain name information is the domain name information of the network request, the time consumption of which is greater than a first threshold value; wherein the observation queue and the normal queue have equal execution authority.
The communication bus 304 mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 304 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
The communication component 302 is used for communication between the electronic device and other devices.
The Memory 303 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor 301.
The Processor 301 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like, and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program, which, when run on a computer, causes the computer to execute the scheduling method of network requests described in the above embodiments.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for scheduling a network request, the method comprising:
acquiring a first network request;
judging whether the current network environment is a weak network environment or not;
if so, adding the first network request into a normal queue, wherein the normal queue adopts a last-in first-out execution strategy in the weak network environment;
otherwise, judging whether the domain name information carried by the first network request is marked domain name information, if so, adding the first network request into an observation queue, wherein the observation queue adopts a first-in first-out execution strategy in the weak network environment, otherwise, adding the first network request into the normal queue, wherein the normal queue adopts a first-in first-out execution strategy in the non-weak network environment, and the marked domain name information is the domain name information of the network request with the request time consumption larger than a first threshold value;
wherein the observation queue and the normal queue have equal execution authority.
2. The method of claim 1, wherein before adding the first network request to an observation queue, the method further comprises:
judging whether the domain name information carried by a second network request in the observation queue comprises the domain name information carried by the first network request, wherein the second network request is a network request in an execution state in the observation queue;
when judging that the domain name information carried by the second network request in the observation queue comprises the domain name information carried by the first network request, not executing the first network request;
and when judging that the domain name information carried by the second network request in the observation queue does not include the domain name information carried by the first network request, the first network request waits to be executed.
3. The method of claim 2, wherein before adding the first network request to a normal queue, further comprising:
judging whether the number of the operation requests of the network requests of the same domain name information in the normal queue is larger than a second threshold value, wherein the number of the operation requests is the number of the network requests of the same domain name information in an execution state;
when the number of the operation requests is judged to be larger than the second threshold value, adding the first network request to a storage unit which is arranged at the tail of the normal queue and is in front of the storage unit and waiting for execution;
and when the running request number is not larger than the second threshold value, adding the first network request to the tail or head of the normal queue for execution.
4. The method of claim 3, wherein after adding the first network request to a normal queue or after adding the first network request to an observation queue, the method further comprises:
calculating the proportion of the number of observation requests in a preset time period, wherein the proportion of the number of the observation requests is the percentage of the number of the observation requests to the total number of the requests, and the total number of the requests is the sum of the number of the observation requests and the number of normal requests;
wherein, the observation request number is: the number of the first network requests with the request consumed time greater than a third threshold in the preset time period is as follows: the number of the first network requests within the preset time period when the request consumes time is not more than the third threshold;
adjusting the concurrency number of the observation queue according to the calculated proportion of the observation request number;
wherein the network environment within the preset time period is the non-weak network environment.
5. The method according to claim 4, wherein adjusting the concurrency number of the observation queue according to the calculated percentage of the observation request number comprises:
judging whether the calculated proportion of the observation request number exceeds a first preset proportion or not;
when the calculated occupation ratio of the observation request number exceeds the first preset ratio, adjusting the concurrency number of the observation queue to the maximum concurrency number of the observation queue, wherein the maximum concurrency number of the observation queue is a value obtained by multiplying the first preset ratio by a preset total concurrency number;
and when the calculated occupation ratio of the observation request number does not exceed the first preset proportion, adjusting the concurrency number of the observation queue to a value obtained by multiplying the concurrency number occupation ratio of the observation queue by the preset total concurrency number.
6. The method for scheduling network request according to any of claims 1-5, wherein after determining that the current network environment is weak network environment, further comprising:
and increasing the concurrency number of the observation queue until the concurrency number of the observation queue reaches a second preset proportion.
7. An apparatus for scheduling network requests, comprising:
the acquisition module is used for acquiring a first network request;
the judging module is used for judging whether the current network environment is a weak network environment or not;
a first determining module, configured to add the first network request to a normal queue if the current network environment is the weak network environment, where the normal queue adopts a last-in-first-out execution policy in the weak network environment;
a second determining module, configured to determine whether domain name information carried by the first network request is marked domain name information if the current network environment is not the weak network environment, and if so, add the first network request to an observation queue, where the observation queue adopts a first-in first-out execution policy in the weak network environment, otherwise, add the first network request to the normal queue, where the normal queue adopts a first-in first-out execution policy in the non-weak network environment, and the marked domain name information is domain name information of a network request whose request time consumption is greater than a first threshold, where the observation queue and the normal queue have equal execution permissions.
8. An electronic device, comprising: the system comprises a processor, a communication component, a memory and a communication bus, wherein the processor, the communication component and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor, configured to execute the program stored in the memory, and implement the network request scheduling method according to any one of claims 1 to 6.
9. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the network request scheduling method of any of claims 1-6.
CN202010307776.3A 2020-04-17 2020-04-17 Network request scheduling method, device, equipment and storage medium Active CN111711650B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010307776.3A CN111711650B (en) 2020-04-17 2020-04-17 Network request scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010307776.3A CN111711650B (en) 2020-04-17 2020-04-17 Network request scheduling method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111711650A CN111711650A (en) 2020-09-25
CN111711650B true CN111711650B (en) 2022-07-12

Family

ID=72536637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010307776.3A Active CN111711650B (en) 2020-04-17 2020-04-17 Network request scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111711650B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7349330B1 (en) * 2000-03-27 2008-03-25 Oki Electric Industry Co., Ltd. Packet receiver with the influence of jitter and packet losses reduced before a buffer becomes idle due to data delays and packet receiving method using the same
CN102325316A (en) * 2008-03-21 2012-01-18 联发科技股份有限公司 Transmit the device of Mobile Origination request
CN105940640A (en) * 2014-01-30 2016-09-14 高通股份有限公司 Determination of end-to-end transport quality
CN106302445A (en) * 2016-08-15 2017-01-04 北京百度网讯科技有限公司 For the method and apparatus processing request
CN108512869A (en) * 2017-02-24 2018-09-07 贵州白山云科技有限公司 A kind of method and system handling concurrent data using asynchronization mode
CN110062035A (en) * 2019-04-02 2019-07-26 中山市凯恩斯裕龙投资管理有限公司 A kind of http request method and apparatus based on deque

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9065779B2 (en) * 2009-06-12 2015-06-23 Wi-Lan Labs, Inc. Systems and methods for prioritizing and scheduling packets in a communication network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7349330B1 (en) * 2000-03-27 2008-03-25 Oki Electric Industry Co., Ltd. Packet receiver with the influence of jitter and packet losses reduced before a buffer becomes idle due to data delays and packet receiving method using the same
CN102325316A (en) * 2008-03-21 2012-01-18 联发科技股份有限公司 Transmit the device of Mobile Origination request
CN105940640A (en) * 2014-01-30 2016-09-14 高通股份有限公司 Determination of end-to-end transport quality
CN106302445A (en) * 2016-08-15 2017-01-04 北京百度网讯科技有限公司 For the method and apparatus processing request
CN108512869A (en) * 2017-02-24 2018-09-07 贵州白山云科技有限公司 A kind of method and system handling concurrent data using asynchronization mode
CN110062035A (en) * 2019-04-02 2019-07-26 中山市凯恩斯裕龙投资管理有限公司 A kind of http request method and apparatus based on deque

Also Published As

Publication number Publication date
CN111711650A (en) 2020-09-25

Similar Documents

Publication Publication Date Title
US9832495B2 (en) Hospitality media system that avoids network congestion and server load while providing media experience within guest room, and computer server and method thereof
US8006003B2 (en) Apparatus, system, and method for enqueue prioritization
US20060106926A1 (en) System and program for detecting disk array device bottlenecks
CN109800204B (en) Data distribution method and related product
CN110471749B (en) Task processing method, device, computer readable storage medium and computer equipment
CN109981737B (en) Network request processing method, device, terminal and storage medium
CN110677684B (en) Video processing method, video access method, distributed storage method and distributed video access system
CN112100034A (en) Service monitoring method and device
CN107343023A (en) Resource allocation methods, device and electronic equipment in a kind of Mesos management cluster
CN109117280B (en) Electronic device, method for limiting inter-process communication thereof and storage medium
CN113886069A (en) Resource allocation method and device, electronic equipment and storage medium
CN112653736B (en) Parallel source returning method and device and electronic equipment
US8108573B2 (en) Apparatus, system, and method for enqueue prioritization
CN114500381A (en) Network bandwidth limiting method, system, electronic device and readable storage medium
CN111711650B (en) Network request scheduling method, device, equipment and storage medium
CN112463315A (en) Cluster task scheduling method and device and related components
CN116820769A (en) Task allocation method, device and system
CN109062706B (en) Electronic device, method for limiting inter-process communication thereof and storage medium
CN109962815B (en) Configuration publishing method, device, server and client device
CN109062707B (en) Electronic device, method for limiting inter-process communication thereof and storage medium
CN112134947A (en) Internet service business data platform
JP3736680B2 (en) Access control apparatus and computer program
CN115409547B (en) Advertisement information management method, device, equipment and storage medium of multi-advertisement platform
CN111767137B (en) System deployment method and device, electronic equipment and storage medium
CN114546279B (en) IO request prediction method and device, storage node and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant