CN102486740A - Multithreading real-time data processing device and method - Google Patents

Multithreading real-time data processing device and method Download PDF

Info

Publication number
CN102486740A
CN102486740A CN201010572330XA CN201010572330A CN102486740A CN 102486740 A CN102486740 A CN 102486740A CN 201010572330X A CN201010572330X A CN 201010572330XA CN 201010572330 A CN201010572330 A CN 201010572330A CN 102486740 A CN102486740 A CN 102486740A
Authority
CN
China
Prior art keywords
real
communication
data
time
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201010572330XA
Other languages
Chinese (zh)
Inventor
贾春萍
朱丹
佟新鑫
栗霄峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang Institute of Automation of CAS
Original Assignee
Shenyang Institute of Automation of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang Institute of Automation of CAS filed Critical Shenyang Institute of Automation of CAS
Priority to CN201010572330XA priority Critical patent/CN102486740A/en
Publication of CN102486740A publication Critical patent/CN102486740A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention relates to a multithreading real-time data processing device and a multithreading real-time data processing method. The method comprises the following steps: performing corresponding initial setting according to the type and the quantity of communication interfaces; creating and starting multiple threads; defining and calling a callback function of each of the threads; receiving or sending real-time communication data by the callback function of each of the threads; if a verifying or encrypting measure exists in a communication protocol of the communication data, performing resolving and checking operations on the communication data by the callback function of each of the threads; performing processing, displaying and storing operations on the real-time communication data by the callback function of each of the threads; if a communication counter reaches a designated value, cleaning a data receiving/sending buffer area; and if the communication is ended, ending and deleting the threads and closing all initialized ports. A master control module of the device is provided with a plurality of PCI (Peripheral Component Interconnect) expansion slots and USB (Universal Serial Bus) ports. Real-time data transmission is performed between the master control module and a lower computer through a communication interface module. The method and the device provided by the invention are beneficial to the communication between the master control module and various lower computers, the efficiency and the accuracy of data processing are increased.

Description

A kind of multithreading real-time data processor and method
Technical field
The present invention relates to a kind of microcomputer data processing, a kind of specifically multithreading real-time data processor and method.
Background technology
In the real-time data acquisition disposal system, often need receive and dispatch and handle several data simultaneously, higher to the real-time and the accuracy requirement of data.But current real-time data acquisition disposal system is more bigger with data volume at data class, and the problem that data communication is blocked takes place easily, influences the real-time and the accuracy of data processing.
Summary of the invention
The problem that data communication is blocked when communicating by letter for solving big data quantity, the present invention provides a kind of can improve the efficient of real time data processing and the multithreading real-time data processor and the method for accuracy.
The technical scheme that the present invention adopts is:
A kind of multithreading real-time data processing method of the present invention may further comprise the steps:
Carry out corresponding initial setting up according to communication interface type of being selected for use and quantity;
Establishment also starts a plurality of threads;
Define and call the call back function of each thread;
Each thread call back function carries out the reception or the transmit operation of real-time communication data;
If verification or encryption measures are arranged in the communication protocol of communication data, then the thread call back function resolves and proofreads operation to communication data;
Real-time communication data is handled, is shown and preserves operation through each thread call back function;
If communications counter reaches designated value, then clear up Data Receiving, send buffer zone;
If sign off then finishes and deletes thread, close the port of each initialization.
If communication does not finish, then return reception or transmit operation step that each thread call back function carries out real-time communication data.
If communications counter does not reach designated value, then return reception or transmit operation step that each thread call back function carries out real-time communication data.
If do not have verification, encryption measures in the communication protocol of communication data, then carry out each thread call back function and handle, show and preserve operation steps carrying out real-time communication data.
A kind of multithreading real-time data processor of the present invention comprises: main control module, communication interface modules and slave computer; Wherein, main control module has a plurality of pci expansion slots and USB port, carries out real-time Data Transmission through communication interface modules and slave computer.
Main control module adopts technical grade to reinforce pocket computer, and computing machine, LCD and mouse-keyboard are integrated in one.
The communication interface type of said communication interface modules is one or more of serial port, pci bus interface or USB port; Communication interface quantity is one or more.
The type of said slave computer is a kind or multiple, and quantity has following beneficial effect and advantage for one or more the present invention:
1. the present invention can handle the data of multiple conventional computer communication interfaces such as comprising serial port, pci bus and USB port simultaneously, helps main control module and polytype slave computer communicates.
2. the present invention adopts Microsoft Windows multithreading, can handle multiple real time data simultaneously, helps improving data processing efficiency and accuracy.
3. the present invention adopts the send buffer of regularly clearing up communication data and the method for sending buffer zone, the problem that the data buffer is blocked when helping solving big data quantity communication.
Description of drawings
Fig. 1 is apparatus of the present invention structural representation;
Fig. 2 is the inventive method process flow diagram.
Embodiment
In conjunction with the drawings native system is done further explain below.
Multithreading real-time data processor of the present invention comprises: main control module, communication interface modules and slave computer.Wherein, main control module is made up of main control computer, display and keyboard and mouse etc., has a plurality of pci expansion slots and USB port; Communication interface modules is made up of multiport serial port board, pci bus interface data collecting card or other integrated circuit board and USB port equipment through pci bus transmission data etc.; Slave computer communicates or carries out the equipment that main control software is ordered with main control module.
As shown in Figure 1, confirm the formation of communication interface modules according to slave computer practical application needs, can adopt one or more of serial port, pci bus interface or USB port; Same type of interface like serial port, also can extend to a plurality of to satisfy application request.Select corresponding integrated circuit board or equipment according to communication interface type of selecting for use and quantity, and selected integrated circuit board or equipment is installed in the main control computer, and main control module is connected with slave computer through corresponding data cable.
In the present embodiment, main control module adopts technical grade to reinforce pocket computer, and computing machine, LCD and mouse-keyboard are integrated in one; The communication interface type of communication interface modules is 2 serial ports, 2 USB ports; 2 motor-drive circuit plates of slave computer, 2 sensors.Sensor in real time acquisition system temperature and target velocity, drive circuit board are used for drive motor and carry out corresponding actions; The real time data that main control module sends through the USB port receiving sensor, and according to the corresponding serial port control motor execution corresponding action of passing in principle,
According to the slave computer type, formulate the data communication protocol of communicating by letter between main control module and the slave computer, this agreement is as one of important evidence of establishment main control software.In order to prevent loss of data or error code, when formulating data communication protocol, can add measures such as verification, encryption.
As shown in Figure 2, multithreading real-time data processing method of the present invention may further comprise the steps: carry out corresponding initial setting up according to interface type of being selected for use and quantity; Establishment also starts a plurality of threads; Define and call the call back function of each thread; Carry out the reception and the transmission of real-time communication data by each thread call back function; If verification, encryption measures are arranged in the communication protocol of communication data, then the thread call back function resolves and proofreads operation to communication data; Real-time communication data is handled, is shown and preserves operation through each thread call back function; If communications counter reaches designated value, then clear up Data Receiving, send buffer zone; If sign off then finishes and deletes thread, close the port of each initialization.
If communication does not finish, then return reception or transmit operation step that each thread call back function carries out real-time communication data.
If communications counter does not reach designated value, then return reception or transmit operation step that each thread call back function carries out real-time communication data.
If do not have verification, encryption measures in the communication protocol of communication data, then carry out each thread call back function and handle, show and preserve operation steps carrying out real-time communication data.
In the present embodiment, the main control software according to above-mentioned multithreading real-time data processing method establishment when initialization, carries out corresponding initial setting up according to interface type of being selected for use and quantity; Establishment also starts a plurality of threads, defines and call call back function separately.At the main control software run duration, accomplish the operations such as reception, transmission, processing, demonstration and preservation of real time data by each thread call back function; If measures such as verification, encryption are arranged in the data communication protocol, the call back function of thread also will be responsible for operations such as the resolving of data, check and correction.When withdrawing from main control software, close and delete each thread.After software withdraws from, can check the text data that is kept in the hard disc of computer, so that check.

Claims (8)

1. multithreading real-time data processing method is characterized in that may further comprise the steps:
Carry out corresponding initial setting up according to communication interface type of being selected for use and quantity;
Establishment also starts a plurality of threads;
Define and call the call back function of each thread;
Each thread call back function carries out the reception or the transmit operation of real-time communication data;
If verification or encryption measures are arranged in the communication protocol of communication data, then the thread call back function resolves and proofreads operation to communication data;
Real-time communication data is handled, is shown and preserves operation through each thread call back function;
If communications counter reaches designated value, then clear up Data Receiving, send buffer zone;
If sign off then finishes and deletes thread, close the port of each initialization.
2. by the described multithreading real-time data processing method of claim 1, it is characterized in that:, then return reception or transmit operation step that each thread call back function carries out real-time communication data if communication does not finish.
3. by the described multithreading real-time data processing method of claim 1, it is characterized in that:, then return reception or transmit operation step that each thread call back function carries out real-time communication data if communications counter does not reach designated value.
4. by the described multithreading real-time data processing method of claim 1; It is characterized in that:, then carry out each thread call back function and handle, show and preserve operation steps carrying out real-time communication data if do not have verification, encryption measures in the communication protocol of communication data.
5. a multithreading real-time data processor is characterized in that comprising: main control module, communication interface modules and slave computer; Wherein, main control module has a plurality of pci expansion slots and USB port, carries out real-time Data Transmission through communication interface modules and slave computer.
6. by the described thread real-time data processor of claim 5, it is characterized in that: main control module adopts technical grade to reinforce pocket computer, and computing machine, LCD and mouse-keyboard are integrated in one.
7. by the described thread real-time data processor of claim 5, it is characterized in that: the communication interface type of said communication interface modules is one or more of serial port, pci bus interface or USB port; Communication interface quantity is one or more.
8. by the described thread real-time data processor of claim 5, it is characterized in that: the type of said slave computer is a kind or multiple, and quantity is one or more.
CN201010572330XA 2010-12-03 2010-12-03 Multithreading real-time data processing device and method Pending CN102486740A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010572330XA CN102486740A (en) 2010-12-03 2010-12-03 Multithreading real-time data processing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010572330XA CN102486740A (en) 2010-12-03 2010-12-03 Multithreading real-time data processing device and method

Publications (1)

Publication Number Publication Date
CN102486740A true CN102486740A (en) 2012-06-06

Family

ID=46152237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010572330XA Pending CN102486740A (en) 2010-12-03 2010-12-03 Multithreading real-time data processing device and method

Country Status (1)

Country Link
CN (1) CN102486740A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704767A (en) * 2016-08-08 2018-02-16 北大方正集团有限公司 Data creation method and data generating device
CN110023907A (en) * 2017-10-09 2019-07-16 华为技术有限公司 A kind of processing method and processing device
CN110231983A (en) * 2019-05-13 2019-09-13 北京百度网讯科技有限公司 Data Concurrent processing method, apparatus and system, computer equipment and readable medium
CN111400367A (en) * 2020-02-28 2020-07-10 金蝶蝶金云计算有限公司 Business report generation method and device, computer equipment and storage medium
CN112527724A (en) * 2020-12-17 2021-03-19 武汉光庭信息技术股份有限公司 Multi-USB storage device scanning method and device of vehicle-mounted information entertainment system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2684272Y (en) * 2004-04-15 2005-03-09 北京世纪瑞尔技术股份有限公司 Modularized data acquisition unit
CN1874560A (en) * 2005-06-01 2006-12-06 英华达(上海)电子有限公司 Safeguard protection system of handset
CN101699857A (en) * 2009-10-21 2010-04-28 南京邮电大学 Implementation method for cross-platform videophone system between set-top box and computer
CN201886459U (en) * 2010-12-03 2011-06-29 中国科学院沈阳自动化研究所 Multithreading real-time data processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2684272Y (en) * 2004-04-15 2005-03-09 北京世纪瑞尔技术股份有限公司 Modularized data acquisition unit
CN1874560A (en) * 2005-06-01 2006-12-06 英华达(上海)电子有限公司 Safeguard protection system of handset
CN101699857A (en) * 2009-10-21 2010-04-28 南京邮电大学 Implementation method for cross-platform videophone system between set-top box and computer
CN201886459U (en) * 2010-12-03 2011-06-29 中国科学院沈阳自动化研究所 Multithreading real-time data processing device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704767A (en) * 2016-08-08 2018-02-16 北大方正集团有限公司 Data creation method and data generating device
CN110023907A (en) * 2017-10-09 2019-07-16 华为技术有限公司 A kind of processing method and processing device
CN110023907B (en) * 2017-10-09 2021-08-20 华为技术有限公司 Processing method and device
CN110231983A (en) * 2019-05-13 2019-09-13 北京百度网讯科技有限公司 Data Concurrent processing method, apparatus and system, computer equipment and readable medium
CN110231983B (en) * 2019-05-13 2022-01-28 北京百度网讯科技有限公司 Data concurrent processing method, device and system, computer equipment and readable medium
CN111400367A (en) * 2020-02-28 2020-07-10 金蝶蝶金云计算有限公司 Business report generation method and device, computer equipment and storage medium
CN111400367B (en) * 2020-02-28 2023-12-29 金蝶蝶金云计算有限公司 Service report generation method, device, computer equipment and storage medium
CN112527724A (en) * 2020-12-17 2021-03-19 武汉光庭信息技术股份有限公司 Multi-USB storage device scanning method and device of vehicle-mounted information entertainment system

Similar Documents

Publication Publication Date Title
CN102486740A (en) Multithreading real-time data processing device and method
CN109118160B (en) Information sharing method, device, terminal equipment and medium
CN104951688B (en) Suitable for the exclusive data encryption method and encrypted card under Xen virtualized environment
CN102023960A (en) Computer network system, computer and hardware equipment remote management method thereof
CN107592250B (en) Multi-rate self-adaptive test equipment based on aviation FC bus
CN104182683A (en) Method, device and system for monitoring online transactions
CN103488488A (en) Text input check method, device ad mobile terminal
CN101533375B (en) USB equipment accessing method, device and control system thereof in virtual machine system
US20080104303A1 (en) Low latency event communication system and method
CN201886459U (en) Multithreading real-time data processing device
CN104063297A (en) Method and device capable of diagnosing computer hardware through USB interfaces
CN105279110B (en) A kind of method and USB device of USB device identification host system
US8788834B1 (en) Systems and methods for altering the state of a computing device via a contacting sequence
CN105354704A (en) Resource processing method, apparatus and system
CN104123253A (en) Method and device for interconnecting chips to be verified
CN104932820B (en) Touch screen application method and system based on USB mapping
CN107196767A (en) Certificate request method and device
CN107547542B (en) USB serial port communication detection method and device
CN101488175B (en) Method for preventing credible client virtual domain starting crash based on polling mechanism
CN203658991U (en) Computer evidence obtaining system
CN103853683B (en) A kind of Multi-serial port data communication implementation method
CN111027103A (en) Chip detection method and device based on register fuzzy configuration and storage equipment
CN104361458B (en) The user task management system that Effect-based operation drives
CN103759951A (en) Tester capable of simultaneously testing brake performance of multiple agricultural vehicles and test method
CN105592032A (en) Internet-based security information interaction method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120606