Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Message processing method and device

A message processing and message technology, applied in digital transmission systems, electrical components, transmission systems, etc., can solve problems such as expensive, difficult to expand, and processing performance degradation, so as to improve hit rate, reduce mutual influence, and improve processing efficiency effect

Inactive Publication Date: 2015-12-23
GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF10 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The current high-speed network traffic analysis modules are all installed in a dedicated network processor architecture, which is expensive and difficult to expand
Or the high-speed network traffic analysis module uses the 86 architecture processor. The 86 architecture is a common architecture now, but it is easy to cause a sharp drop in processing performance due to improper handling. The high-speed network traffic analysis module usually chooses to discard part of the performance and use the X86 architecture processor.

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
  • Message processing method and device
  • Message processing method and device
  • Message processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0023] figure 1 It is a flow chart of a message processing method provided in Embodiment 1 of the present invention. The method can be executed by any device for performing message processing, and the device can be implemented by software and / or hardware. Such as figure 1 As shown, the method includes:

[0024] S110. In the main thread, sequentially copy the received messages into the array.

[0025] In this embodiment, the packets may be packets such as IP packets, TCP packets, or UDP packets.

[0026] Exemplarily, before the main thread receives the message, a two-dimensional array may be created first, and when the main thread receives the message, the received message is copied into the two-dimensional array. Preferably, the received messages can be copied into the two-dimensional array in the received order. Preferably, the headers of the received packets may be copied into a two-dimensional array in sequence. For example, create a two-dimensional array G_PKG[MAX*N][...

Embodiment 2

[0037] figure 2 The flow chart of a packet processing method provided by the embodiment of the present invention is further optimized on the basis of the foregoing embodiments.

[0038] Furthermore, before copying the received messages to the array in the main thread, first create the main thread, the message shunting thread and no less than two worker threads, and bind these threads to different CPUs respectively. Specifically include:

[0039] S210. Create a main thread, and bind the main thread to a corresponding CPU.

[0040] Exemplarily, create a main thread HANDLE, and bind the thread to the corresponding CPU, so that the CPU only needs to process the work of the thread, that is, only need to process the work of copying the message, for example, the HANDLE thread can be bound to on CUP1. Preferably, before creating the main thread, the memory in the user state can be directly mapped to the network card through memory mapping, so that the packets received by the netwo...

Embodiment 3

[0051] image 3 It is a structural block diagram of a message processing device provided in Embodiment 3 of the present invention. As shown in FIG. 4 , the device includes: a message receiving module 301 , an address extraction module 302 , an address calculation module 303 and a message distribution module 304 .

[0052] Wherein the message receiving module 301 is used to copy the received messages into the array in the main thread; the address extraction module 302 is used to extract the source address and the source address of the message in the array in the message shunting thread Target address; address calculation module 303, used to calculate the source address and the destination address according to a preset algorithm; message distribution module 304, used to send the message to the corresponding worker according to the calculation result thread.

[0053] On the basis of the above embodiments, the message receiving module may be specifically configured to: create a ...

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 message processing method and device. The method comprises the following steps: sequentially copying received messages into an array in a main thread; extracting source addresses and target addresses of the messages in the array in a message distribution thread; computing the source addresses and the target addresses; and sending the messages to corresponding working threads according to computing results. Through adoption of the technical scheme in the embodiment, different CPUs (Central Processing Units) can directly obtain messages needing to be processed, so that the utilization ratios of the CPUs are increased greatly; the message processing efficiency is increased; the hit rate of CPU caches is increased; and influences among different threads are avoided.

Description

technical field [0001] The present invention relates to the field of message processing, in particular to a message processing method and device. Background technique [0002] Denial of Service attack (Dos, Denial of Service) refers to using various service requests to exhaust the system resources of the attacked network, so that the attacked network cannot process the requests of legitimate users. However, with the rise of botnets, distributed denial of service attacks (DDos, Distributed of Service) are rapidly growing and flooding. Distributed denial of service attack refers to the use of client / server technology to combine multiple computers as an attack platform to launch a DoS attack on one or more targets. The attack method of DDos is simple, the impact is great, and it is difficult to trace. It forms a huge attack and network traffic, which causes great harm to the attacked network. [0003] With the continuous improvement and development of DDos attack technology, ...

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/24
CPCH04L41/14H04L41/0823
Inventor 梁润强黄劲聪曾宪力史伟梁永堂麦剑刘杰
Owner GUANGDONG EFLYCLOUD COMPUTING CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products