Data processing method, related device, equipment and storage medium

A data processing and data packet technology, applied in the Internet field, can solve the problems of reducing data processing efficiency, resource contention, waste, etc.

Pending Publication Date: 2021-03-16
TENCENT TECH (SHENZHEN) CO LTD
View PDF7 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in the case of large network traffic, using blocking queues to pass messages between threads will cause serious resource contention problems, that is,

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
  • Data processing method, related device, equipment and storage medium
  • Data processing method, related device, equipment and storage medium
  • Data processing method, related device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0085] The embodiment of the present application provides a data processing method, related devices, equipment, and storage media, and introduces a non-blocking circular queue as a buffer structure for data packets, that is, threads in the thread pool can wait based on the count value of the consumer counter Or processing operations, not only does not require lock operations during the waiting process, improving data processing efficiency, but also consumes data packets in the ring queue through threads in the thread pool, realizing parallel processing of data packets and reducing the frequency of task preemption. Effectively slows down cache thrashing.

[0086] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under ap...

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 data processing method based on storage and reading. The data processing method comprises the steps: acquiring the storage state of an annular queue; if the annular queue isin a full state or a non-empty state, acquiring a first data packet from the annular queue according to the current count value of a consumer counter; based on the CAS cycle operation, performing atomincremental operation on the current count value of the consumer counter to obtain a next count value; and obtaining a second data packet from the annular queue according to the next count value. Besides, if the annular queue is in an idle state or a non-empty state, adding a data packet into the annular queue according to the current count value of a producer counter, and performing atomic incremental operation on the current count value of the producer counter to obtain the next count value. The invention further provides a related device. The annular queue of a non-blocking mechanism is introduced to serve as a data packet buffer structure, parallel processing of data packets is achieved, the task preemption frequency is reduced, and jolt of a cache memory is effectively relieved.

Description

technical field [0001] The present application relates to the technical field of the Internet, and in particular to a data processing method, related devices, equipment, and storage media. Background technique [0002] With the rapid development of the Internet, during the interaction between the client and the server, the server needs to process a large number of network requests, and these network requests are usually transmitted in the form of data packets. A "packet" is a unit of transmission between a client and a server, and a "queue" is a container that stores packets during data transfer, and the queue acts as a middleman when passing packets from source to destination. [0003] At present, for each data packet, a network communication scheme based on a locked synchronous queue for parallel processing can be used. In the network communication scheme of parallel processing, a blocked synchronization queue is introduced as a synchronization queue as a buffer structure...

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
IPC IPC(8): G06F9/54
CPCG06F9/544G06F9/546G06F2209/548
Inventor 吴岳廷
Owner TENCENT TECH (SHENZHEN) CO LTD
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