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

Multi-thread message processing method based on netty framework

A framework and message technology, applied in transmission systems, electrical components, etc., can solve problems such as message blocking, reducing server system performance, limiting netty's asynchronous multiprocessing message capability, etc., to achieve the effect of improving effective utilization and processing speed.

Pending Publication Date: 2022-04-29
北京理工大学重庆创新中心
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, for the same client, netty only provides one worker thread for channel connection and message processing, which greatly limits the ability of netty to asynchronously multi-process messages, easily leads to message blocking, and reduces the performance of the server system

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
  • Multi-thread message processing method based on netty framework
  • Multi-thread message processing method based on netty framework

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] Embodiment 1 of the present invention discloses a multi-threaded message processing method based on the netty framework, and the method is applied to a udp client and a udp server built based on netty; for example, a multi-unmanned aerial vehicle collaborative system platform, java background as a server terminal, connect the UAV plug-in through the UDP protocol and receive various message data information of the drone, and then use the polling netty internal multi-thread pool to analyze and process the message, so that the single client corresponding to the single client in the netty framework The thread work mode becomes multi-thread work mode, so as to achieve the control of the UAV cluster.

[0026] Such as figure 1 As shown, the specific steps are as follows:

[0027] S1: Create an event loop group through eventLoopGroup, as an internal thread of the netty framework, used to receive multiple client connections and process messages sent by the client;

[0028] Cre...

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 provides a multi-thread message processing method based on a netty framework, which relates to the technical field of computer information processing, and comprises the following steps: creating an event loop group to construct a thread pool, creating an udp starting class, binding a user-defined processing class, associating a specified port to monitor, and realizing a loop algorithm for the event loop group in the user-defined processing class. And executing message analysis in a mode of polling the thread pool. According to the method and the device, a single-thread processing mode in the netty is changed into a multi-thread processing mode by polling the netty thread pool at the server side, so that the message processing speed is increased.

Description

technical field [0001] The invention relates to the technical field of message processing and communication, in particular to a netty framework-based multi-threaded message processing method. Background technique [0002] Netty is a nio-based client-server (client-server) framework, which greatly simplifies and optimizes network programming such as tcp and udp socket servers, and its performance and security have been significantly improved in many aspects. [0003] In the multi-UAV collaborative system platform, under normal circumstances, multiple UAVs are integrated in the same UDP client, and the UDP server is built based on the netty framework on the web side to interact with the UAV client. However, for the same client, netty only provides one worker thread for channel connection and message processing, which greatly limits the ability of netty to asynchronously multi-process messages, easily leads to message blocking, and reduces the performance of the server system. ...

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): H04L67/01H04L67/02H04L67/141H04L69/22
CPCH04L67/02H04L67/141H04L69/22
Inventor 刘映影陈伟蒋龙生代锡玻
Owner 北京理工大学重庆创新中心
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