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

Multi-priority thread message processing method

A message processing, multi-priority technology, applied in multi-program devices, inter-program communication, etc., can solve the problems of complex functions, difficult to unify the interface form, transfer parameters, etc., to achieve real-time and functional improvement, simple and clear interface , easy-to-use effects

Active Publication Date: 2015-03-04
THE 41ST INST OF CHINA ELECTRONICS TECH GRP
View PDF7 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The software functions of modern spectrum analyzers and other measuring instruments are complex, and are generally based on Windows system and adopt multi-thread design. The message mechanism in Windows system is mature and easy to use, but its thread message processing interface can only handle asynchronous messages. The combination of usability and multi-threading enables threads to have the ability to process messages of different priorities, which will greatly improve the real-time processing capability of the software and enrich the functions of the software at the same time
[0003] In multi-thread communication, methods such as event or mutual exclusion are often used for synchronization. Although the synchronization of thread operation can be realized, parameters cannot be passed between threads, which greatly limits the complex functions of measuring instruments.
Under this design, the way to achieve parameter transfer between threads is generally to use an additional data area for auxiliary communication, but the design of the data area depends on various specific devices and designers, the interface form is difficult to unify, and the reusability is almost impossible to achieve
[0004] The message mechanism is flexible, mature and reliable. It can transmit various parameters and has wide applicability. However, only window message transmission has synchronous callback and synchronous priority, and thread message transmission only has asynchronous priority. Therefore, the original platform provides The function does not meet the software function requirements of the measuring instrument

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-priority thread message processing method
  • Multi-priority thread message processing method
  • Multi-priority thread message processing method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] figure 1 It is a flowchart of a multi-priority thread message processing method in the first embodiment of the present invention, including:

[0045] Step 101: Judge the thread priority of the message;

[0046] Step 102: If the message has an asynchronous priority, forward the message to the thread preprocessing interface for preprocessing through the thread message routing provided by the Windows platform; after preprocessing, it is sent to a specific thread message router;

[0047] Step 103: If the message is a callback or synchronization priority, the message is forwarded to the window for processing through the thread message routing provided by the Windows platform, and after window processing is performed, it is sent to the specific thread message router;

[0048] Step 104: If the message is a safe call priority, send the message to the specific thread message router;

[0049] Step 105: If it is determined that the message is an urgent call, send the message to the specific...

Embodiment 2

[0076] The second embodiment will describe the thread message priority mechanism.

[0077] The technical problems to be solved in the second embodiment include:

[0078] Expand the priority of thread processing messages from one level to five levels to enhance the real-time and functionality of message processing;

[0079] The message processing mechanism is expanded based on the existing platform, which is mature and reliable;

[0080] The message processing interface is clear and simple, and has good reusability.

[0081] 1. The thread message priority mechanism used by the method provided in the first embodiment is shown in Table 1:

[0082]

[0083] Table 1

[0084] The thread processing message priority provided by the platform is only asynchronous priority, so it is powerless to handle some time-demanding processing. Increasing the priority of thread message processing is achieved by using the window message mechanism provided by the platform to expand, window and thread custom ass...

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-priority thread message processing method. The method provides five different priority designs for message processing, processing mechanism design for thread messages different in priority and customized thread message router design. By means of the multi-priority thread message processing method, timeliness and functionality in thread message processing can be remarkably improved; improvement is carried out on the basis of existing message mechanisms of operating systems, so that maturity and reliability are achieved; the method is suitable for all Windows platforms so as to be high in applicability; interfaces are simple and clear, and easiness in utilization is realized.

Description

Technical field [0001] The invention relates to the technical field of message processing, in particular to a multi-priority thread message processing method. Background technique [0002] The software functions of modern spectrum analyzers and other measuring instruments are complex. They are generally based on the Windows system and adopt multi-threaded design. The message mechanism in the Windows system is mature and easy to use, but its threaded message processing interface can only handle asynchronous messages. The combination of usability and multithreading enables threads to have the ability to process messages of different priority levels, which will greatly improve the real-time processing capabilities of the software and at the same time enrich the functions of the software. [0003] In multi-threaded communication, methods such as events or mutual exclusion are often used to synchronize. Although the synchronization of thread operation can be achieved, parameters cannot ...

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
Inventor 马风军
Owner THE 41ST INST OF CHINA ELECTRONICS TECH GRP
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