Network request asynchronous processing method and device

A network request and asynchronous processing technology, applied in the network field, can solve problems such as blocking, abnormal task execution, and affecting server processing performance, so as to achieve the effect of not being blocked and improving processing performance

Inactive Publication Date: 2017-03-15
GUANGZHOU HUADUO NETWORK TECH
View PDF4 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The threads in the thread pool are responsible for task creation and execution at the same time. When the server receives a large number of network requests and creates tasks for a large number of network requests, it is easy to cause blockage. Once blockage occurs, the tasks already created in the task list will be blocked. It cannot be executed normally, which affects the processing performance of the server

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Network request asynchronous processing method and device
  • Network request asynchronous processing method and device
  • Network request asynchronous processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0045] figure 1 It is a flow chart of a network request asynchronous processing method provided by an embodiment of the present invention. The execution subject of this embodiment of the invention is a server, see figure 1 , the server is configured with a creation thread pool and an execution thread pool, the creation thread pool includes creation threads for creating tasks, and the execution thread pool includes execution threads for executing ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a network request asynchronous processing method and device and belongs to the technical field of a network. The method is applied to a server. The server is equipped with an establishment thread pool and a performance thread pool. The establishment thread pool comprises establishment threads for establishing tasks. The performance thread pool comprises performance threads for performing the tasks. The method comprises the steps of receiving network requests sent by clients, establishing tasks for the network requests and adding the tasks to a task queue through the establishment threads; extracting the tasks from the task queue and performing the tasks through the performance threads; and when the tasks are performed completely, sending performance results of the tasks to the clients through the performance threads. According to the method and the device, even if a great number of network requests are received, the network requests can be processed orderly, congestion is not liable to cause, even if the congestion is caused, the performance threads are not influenced on performing the tasks, and the processing performance of the server is improved, thereby facilitating repaid solution of a congestion phenomenon.

Description

technical field [0001] The invention relates to the field of network technology, in particular to a method and device for asynchronously processing network requests. Background technique [0002] With the increasing scale of the network, a large number of concurrent network requests pose a great challenge to the processing ability of the server, and the processing efficiency of network requests has become an important indicator to measure the performance of the server. [0003] Usually, the server configures a thread pool and a task queue. The thread pool includes multiple threads. When the server receives a network request sent by the client, it creates a task for the network request through any thread and adds it to the task queue. . Afterwards, when there is an idle thread in the thread pool, the task is extracted from the task queue through the thread, and the task is executed, and the execution result is sent to the client after the execution is completed. [0004] In...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/801H04L12/865H04L47/6275
CPCH04L47/12H04L47/6275
Inventor 匡凌轩陈高昌
Owner GUANGZHOU HUADUO NETWORK TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products