CN107171892B - Cross-platform data communication method and system based on QT - Google Patents

Cross-platform data communication method and system based on QT Download PDF

Info

Publication number
CN107171892B
CN107171892B CN201710427929.6A CN201710427929A CN107171892B CN 107171892 B CN107171892 B CN 107171892B CN 201710427929 A CN201710427929 A CN 201710427929A CN 107171892 B CN107171892 B CN 107171892B
Authority
CN
China
Prior art keywords
data
queue
data packet
communication
sending
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.)
Active
Application number
CN201710427929.6A
Other languages
Chinese (zh)
Other versions
CN107171892A (en
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.)
Zhongdian Intelligent Technology Co., Ltd.
Original Assignee
Cec Intelligent Technology Co ltd
6th Research Institute of China Electronics Corp
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 Cec Intelligent Technology Co ltd, 6th Research Institute of China Electronics Corp filed Critical Cec Intelligent Technology Co ltd
Priority to CN201710427929.6A priority Critical patent/CN107171892B/en
Publication of CN107171892A publication Critical patent/CN107171892A/en
Application granted granted Critical
Publication of CN107171892B publication Critical patent/CN107171892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a cross-platform data communication method and a system based on QT, wherein the method comprises the following steps: receiving communication data or file transmission data of an upper computer or a lower computer; carrying out classification processing, priority processing or sub-packet processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems; and sending the data packet sending queue to a lower computer or uploading the data packet to an upper computer. The invention can achieve the effect of uniformly and completely managing the network condition by separately and independently designing the data transmission function of the bottom layer of the Ethernet and the upper application program, thereby avoiding repeated work and various conflicts of the network, and having good flexibility, expansibility and low coupling.

Description

Cross-platform data communication method and system based on QT
Technical Field
The invention relates to the field of industrial automation control, in particular to a cross-platform data communication method and system based on QT.
Background
Under the promotion of the development of modern science and technology, the industrial technology is gradually developed towards the direction of modernization, automation and intellectualization. At present, the industrial automation technology becomes a main production technology in many industrial fields, the production efficiency is greatly improved, and the product quality is improved. When an industrial automation technology is used for production, the most important link is to make automation control.
However, with the development of industry and the increase of control devices, the problem that the real-time data acquisition and processing requirements of various devices in an industrial control field can not be met under the kylin operating system and the Windows operating system in the winning bid can not be met at the same time, and further repeated work and various conflicts of networks are caused.
Disclosure of Invention
The QT-based cross-platform data communication method and system provided by the invention can achieve the effect of uniformly and completely managing the network condition by separately and independently designing the data transmission function of the bottom layer of the Ethernet and the upper application program, so that the Ethernet does not depend on an operating system and a hardware environment, thereby avoiding repeated work and various conflicts of the network, and have good flexibility, expansibility and low coupling.
In a first aspect, the present invention provides a QT-based cross-platform data communication method, including:
receiving communication data or file transmission data of an upper computer or a lower computer;
carrying out classification processing, priority processing or sub-packet processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems;
and sending the data packet sending queue to a lower computer or uploading the data packet to an upper computer.
Optionally, the classifying, prioritizing, or packetizing the communication data or the file transmission information and forming a data packet transmission queue includes:
carrying out classification processing or subpackage processing on the communication data or the file transmission data;
calling a related function in a network operation dynamic library for supporting files, memories, commands or sending/receiving and opening a path;
calling a related function in a network communication dynamic library for providing remote login, obtaining/network address or specified state, and putting classified or sub-packaged communication data or file transmission data into a corresponding queue in a data packet sending queue according to priority;
and inquiring each queue in the data packet sending queue according to a priority algorithm, and sending the data of each queue to a destination address.
Optionally, the issuing the data packet sending queue to the lower computer or uploading the data packet sending queue to the upper computer includes:
acquiring network communication interfaces appointed to be transmitted by each queue in a data packet transmission queue;
and issuing each queue to a lower computer or uploading each queue to an upper computer according to the network communication interface.
Optionally, after the classifying, prioritizing, or packetizing the communication data or the file transfer data and forming a data packet sending queue, the method further includes:
and acquiring time information and adding the time information into a data packet sending queue.
Optionally, the obtaining and adding the time information to the data packet sending queue includes:
packaging the communication data and the file transmission data to form a first data packet and sending the first data packet to a history station, adding time information into the first data packet by the history station to form a second data packet, and synchronizing the second data packet in the whole network;
and adding the second data packet into the data packet sending queue.
Optionally, after uploading the data packet sending queue to the upper computer, the method further includes:
analyzing and processing according to the data packet sending queue and acquiring corresponding communication data or file transmission data;
and generating a corresponding message according to the corresponding communication data or the file transmission data and informing the upper application software.
Optionally, after uploading the data packet sending queue to the upper computer, the method further includes:
receiving network data and obtaining a data type;
and sending the data to the destination address according to the data type.
In a second aspect, the present invention provides a QT-based cross-platform data communication system, comprising:
the receiving module is used for acquiring communication data or file transmission data of the upper computer or the lower computer;
the data communication assembly is used for carrying out classification processing, priority processing or sub-packet processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems;
and the network communication component is used for sending the data packet sending queue to the lower computer or uploading the data packet sending queue to the upper computer.
Optionally, the data communication component comprises:
the network operation dynamic library is used for supporting files, memories, commands or sending/receiving;
the first calling unit is used for calling the related functions in the network operation dynamic library and opening a path;
the network communication dynamic library is used for providing remote login, obtaining/network address or specified state;
the second calling unit is used for calling related functions in the network communication dynamic library and putting communication data or file transmission data into a corresponding queue in a data packet sending queue according to the priority;
and the sending unit is used for inquiring each queue in the data packet sending queues according to the priority algorithm and sending the data of each queue to the destination address.
Optionally, the network communication component comprises:
the device comprises an acquisition unit, a transmission unit and a processing unit, wherein the acquisition unit is used for acquiring network communication interfaces appointed to be transmitted by each queue in a data packet transmission queue;
and the transmission unit is used for transmitting each queue to the lower computer or uploading the queue to the upper computer according to the network communication interface.
Optionally, the system further comprises:
the data packet sending module is used for packaging the communication data and the file transmission data to form a first data packet and sending the first data packet to the history station;
a synchronization module for receiving the second data packet and synchronizing the second data packet;
and the processing module is used for adding the second data packet into the data packet sending queue.
Optionally, the system further comprises:
the analysis processing module is used for carrying out analysis processing according to the data packet sending queue and acquiring corresponding communication data or file transmission data;
and the notification module is used for generating a corresponding message according to the corresponding communication data or the file transmission data and notifying the upper application software.
The cross-platform data communication method and system based on QT provided by the embodiment of the invention mainly receive the communication data or the file transmission data of the upper computer, classify, prioritize or packetize the communication data or the file transmission data and form a data packet sending queue, so that the communication data or the file transmission data are issued to the lower computer and corresponding operations are executed by the lower computer without depending on an operating system and a hardware environment between the lower computer and the upper computer, and therefore, the work of configuration synchronization, process control, file maintenance and the like of the lower computer is realized. Or receiving the communication data or the file transmission data of the lower computer, uploading the processed data to a receiving queue of the upper computer, and realizing real-time state monitoring work on the lower computer.
The method in the embodiment of the invention mainly utilizes the independent design of the data transmission function of the bottom layer of the Ethernet and the upper application program, thereby not depending on an operating system and a hardware environment, achieving the effect of uniformly and completely managing the network condition, further avoiding repeated work and various conflicts of the network, and having good flexibility, expansibility and low coupling.
Drawings
FIG. 1 is a flow chart of a QT-based cross-platform data communication method according to an embodiment of the invention;
FIG. 2 is a flow chart of a QT-based cross-platform data communication method according to another embodiment of the invention;
FIG. 3 is a diagram illustrating a structure of a notification packet according to an embodiment of the present invention;
FIG. 4 is a flow chart of a QT-based cross-platform data communication method according to another embodiment of the invention;
FIG. 5 is a schematic structural diagram of a QT-based cross-platform data communication device according to an embodiment of the invention;
FIG. 6 is a schematic structural diagram of a cross-platform data communication device based on QT according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a QT-based cross-platform data communication method, as shown in FIG. 1, the method comprises the following steps:
s1, receiving communication data or file transmission data of the upper computer or the lower computer;
s2, carrying out classification processing, priority processing or subpackage processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems;
and S3, sending the data packet sending queue to a lower computer or uploading the data packet to an upper computer.
The embodiment of the invention provides a cross-platform data communication method based on QT, wherein the QT: a cross-platform C + + graphical user interface application;
cross-platform: the method is independent of operating systems and hardware environments, and the application developed under one operating system can still normally run when the application is put under the other operating system;
a history station: the server for keeping the historical data for a long time and having the function of directly sending out the control command;
an upper computer: refers to a computer that can directly send out control commands;
a lower computer: and a computer for directly controlling the equipment to acquire the equipment condition.
The method of the embodiment mainly receives the communication data or the file transmission data of the upper computer, performs classification processing, priority processing or sub-packet processing on the communication data or the file transmission data, and forms a data packet sending queue, so that the method does not depend on an operating system and a hardware environment between the lower computer and the upper computer, and also issues the communication data or the file transmission data to the lower computer and executes corresponding operations by the lower computer, thereby realizing the work of configuration synchronization, process control, file maintenance and the like of the lower computer.
Or receiving the communication data or the file transmission data of the lower computer, performing classification processing, priority processing or sub-packet processing on the communication data or the file transmission data, forming a data packet sending queue, so that the communication data or the file transmission data are split according to a data format, priority and data transmission load, then uploading the split data or the file transmission data to a receiving queue of the upper computer, and informing upper application software in a message mode after the split data or the file transmission data are correspondingly processed by the upper computer; the communication data or the file transmission data are all communication data and file transmission data required by upper-layer application software, and therefore real-time state monitoring work is achieved on the lower computer.
The method in the embodiment mainly utilizes the separated and independent design of the data transmission function of the bottom layer of the Ethernet and the upper application program, so that the method does not depend on an operating system and a hardware environment, achieves the effect of uniformly and completely managing the network condition, further avoids repeated work and various conflicts of the network, and has good flexibility, expansibility and low coupling.
Optionally, as shown in fig. 2 to 4, the performing classification processing, priority processing, or packetization processing on the communication data or the file transmission information and forming a data packet sending queue includes:
carrying out classification processing or subpackage processing on the communication data or the file transmission data;
calling a related function in a network operation dynamic library for supporting files, memories, commands or sending/receiving and opening a path;
calling a related function in a network communication dynamic library for providing remote login, obtaining/network address or specified state, and putting classified or sub-packaged communication data or file transmission data into a corresponding queue in a data packet sending queue according to priority;
and inquiring each queue in the data packet sending queue according to a priority algorithm, and sending the data of each queue to a destination address.
Specifically, in this embodiment, the upper computer performs classification processing, priority processing or sub-packet processing on the communication data or the file transmission information, and forms a data packet sending queue, and first performs classification processing or sub-packet processing on the communication data or the file transmission information according to the type and size of the data when the communication data or the file transmission information is sent to a destination address in an application program; for example, when the data size of the file transmission information is greater than a set value, the file transmission information is divided into at least two smaller data packets, so that the efficiency of the cross-platform data communication is improved. Then, calling a related function in the network operation dynamic library and opening a path; calling a related function in the network communication dynamic library and putting the communication data or the file transmission data after classification processing or sub-packet processing into a corresponding queue in a data packet sending queue according to the priority; and finally, inquiring each queue in the data packet sending queue according to a priority algorithm, and sending the data of each queue to a destination address. The data packet sending queue comprises the following components in sequence from high priority to low priority: the data communication method comprises an instant sending queue, a command sending queue, a fast memory queue, a medium-speed memory queue, a slow memory queue and a file queue, wherein each queue can comprise a plurality of data packets or files, and further provides a data communication method for communication between single-machine application programs and communication between different machine application programs on the basis of improving the efficiency of data communication.
Wherein the packetization process includes:
judging whether the size of the data packet exceeds a set value, if so, executing the next step; if not, priority processing is carried out;
detecting the network load of the Ethernet, judging whether the network load of the Ethernet exceeds a threshold value, and if so, executing the next step; if not, priority processing is carried out;
determining the sub-packet quantity according to the network load of the Ethernet with the size of the data packet, and sub-packaging the data packet according to the sub-packet quantity. Therefore, the load monitoring of the Ethernet is effectively realized, and the data communication efficiency is ensured. In this embodiment, the network load of the ethernet in the method is no more than 20% at most, and preferably, the network load of the ethernet is less than 10%.
In this embodiment, the communication data includes all data packets that need network transmission, such as an inter-station status data packet, a real-time data table data packet, a historical data packet, a command packet, and a request packet; the file transmission information includes all file data which needs network transmission and synchronization, such as configuration files, Log files and the like. The data communication method transmits the data packet transmission queue formed by the classification processing, the priority processing or the sub-packet processing of the multiple types of data packets such as the memory data, the real-time data, the command data, the operation instruction, the file data, the state data, the response data and the like between the upper computer and the lower computer of the Windows operating system or the winning kylin operating system or between the upper computer and the upper computer by the method, so that the problems of incompatibility and mutual transmission of data between the upper computer and the lower computer of the Windows operating system or the winning kylin operating system or between the upper computer and the upper computer are avoided, and the flexibility, the expansibility and the low coupling of the data communication method are further improved.
In summary, in the method of this embodiment, the communication data or the file transmission data is firstly subjected to classification processing or sub-packet processing to form corresponding data packets, then priority processing is performed on the data packets to form a data packet sending queue, and then priority control on the data packet sending queue is implemented according to the priority algorithm, so that the data packets with different priorities are sent according to a high-priority first-sending principle, priority sending of important data is ensured, and processing efficiency is improved.
Optionally, the issuing the data packet sending queue to the lower computer or uploading the data packet sending queue to the upper computer includes:
acquiring network communication interfaces appointed to be transmitted by each queue in a data packet transmission queue;
and issuing each queue to a lower computer or uploading each queue to an upper computer according to the network communication interface.
Specifically, in the method of this embodiment, when each queue is issued to the lower computer according to the network communication interface, the lower computer receives the data packets in the data packet transmission queue to the received data queue, and correspondingly analyzes the data packets in the received data queue, extracts the corresponding command, and executes the command, for example, the method may perform control such as starting with parameters, starting at fixed time, stopping at fixed time, monitoring, etc. on the process of the lower computer in a process control command packet manner; or, the method can also carry out operations of starting online, starting online at fixed time, stopping online at fixed time and the like on other lower computers in a station control command packet mode; or, the method can also realize the communication between the points, including one-to-one or one-to-many point-to-point communication, and the communication between the points includes a TCP transmission mode and a non-connection UDP transmission mode. The TCP approach is used for large data block replication and synchronization, and the UDP is used for small data transmission. For example, the periodic data is transmitted by UDP, and the event data is transmitted by TCP.
Or when the data packet sending queue is sent to the lower computer and the upper computer cannot be directly sent to the lower computer, the data packet sending queue is forwarded to the lower computer through the remote controller, wherein the upper computer sends the data packet sending queue to the remote controller, and then the remote controller sends the corresponding data packet sending queue to the corresponding lower computer.
Meanwhile, the network communication interface used for transmitting data and each application program between the upper computer and the lower computer or between the upper computer and the upper computer or between the lower computer and the lower computer under different operating system platforms (Windows or kylin), in the embodiment, includes: the system comprises a process notification sending interface on the same computer, a process notification sending interface between different computers, a file sending interface, a memory synchronous sending interface and an operation data sending interface; for example, when sending a notification to a specified process on a specified machine, the send notification packet structure is as shown in FIG. 3.
The interface provided for other application programs in the method of the embodiment includes: the method of the embodiment runs under different operating systems (Windows or Chinese kylin), but the two different operating systems have different definitions of the message, so the embodiment adopts a local Socket technology encapsulation message mechanism of QT to realize message communication between processes, and an external interface mode adopts a Windows-like message mode.
Optionally, after the classifying, prioritizing, or packetizing the communication data or the file transfer data and forming a data packet sending queue, the method further includes:
and acquiring time information and adding the time information into a data packet sending queue.
Specifically, the method according to this embodiment adds the time information to the data packet transmission queue to achieve the function of timing data, where the time information is mainly periodically transmitted to the entire network by the history station, and other stations passively receive the time information data and modify their own clocks to keep the time information data consistent with the history station.
Optionally, the obtaining and adding the time information to the data packet sending queue includes:
packaging the communication data and the file transmission data to form a first data packet and sending the first data packet to a history station, adding time information into the first data packet by the history station to form a second data packet, and synchronizing the second data packet in the whole network;
and adding the second data packet into the data packet sending queue.
Specifically, the method according to this embodiment mainly adds time information to a packet sending queue, so that the packet sending queue can implement timing calibration, for example, as shown in fig. 4, after the lower computer executes an operation, corresponding operation processing data is formed, the data is packaged to form a first packet without time information, the first packet is sent to the master history station and/or the slave history station through a packet sending module, then the time information is added to the first packet through the master history station to form a second packet with time information, the slave history station and the lower computer synchronize the second packet at the same time, and finally the lower computer adds the second packet to the packet sending queue and uploads the second packet to the upper computer, thereby implementing operation feedback on the upper computer.
The method can also identify the type of a data packet, and determine to put the data packet into an input interface queue or an output interface queue according to the type of the data packet, wherein the data packet comprises an analog quantity data packet and a digital quantity operation queue; the analog quantity packet type is one, the digital quantity operation queue comprises a picture digital quantity operation packet type and a non-picture digital quantity operation packet type, and the non-picture digital quantity operation packet type is an artificial digit-setting value. The image operation packet needs DO zero clearing processing, and the non-image operation packet cannot be cleared. And the above two kinds of data packets are written by the PC where the operator is located, but the time stamp with the time information is written when the data is packed by the master history station,
optionally, after uploading the data packet sending queue to the upper computer, the method further includes:
analyzing and processing according to the data packet sending queue and acquiring corresponding communication data or file transmission data;
and generating a corresponding message according to the corresponding communication data or the file transmission data and informing the upper application software.
Optionally, after uploading the data packet sending queue to the upper computer, the method further includes:
receiving network data and obtaining a data type;
and sending the data to the destination address according to the data type.
Specifically, in the method of this embodiment, after the data packet transmission queue is uploaded to the upper computer, or after the remote controller transmits the data packet transmission queue to the upper computer, the method further includes receiving network data and determining the type of the network data, and if the data is AO, DO, or the like, the network data is put into an interface input queue; if the command is received, immediately notifying the target application program; if the data is the memory data for the application program, the data is put into a receiving memory queue, and the upper application program is immediately informed to receive the processing.
An embodiment of the present invention further provides a QT-based cross-platform data communication system, as shown in fig. 5, the system includes:
the receiving module is used for acquiring communication data or file transmission data of the upper computer or the lower computer;
the data communication assembly is used for carrying out classification processing, priority processing or sub-packet processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems;
and the network communication component is used for sending the data packet sending queue to the lower computer or uploading the data packet sending queue to the upper computer.
The QT-based cross-platform data communication system provided by the embodiment of the invention mainly receives communication data or file transmission data of an upper computer through a receiving module, performs classification processing, priority processing or sub-packet processing on the communication data or the file transmission data through a data communication assembly, and forms a data packet sending queue, so that the data packet sending queue is independent of an operating system and a hardware environment between a lower computer and the upper computer, and finally, the communication data or the file transmission data are sent to the lower computer through a network communication assembly and corresponding operations are executed by the lower computer, so that the work of configuration synchronization, process control, file maintenance and the like of the lower computer is realized.
Or receiving the communication data or the file transmission data of the lower computer, performing classification processing, priority processing or sub-packet processing on the communication data or the file transmission data, forming a data packet sending queue, so that the communication data or the file transmission data are split according to a data format, priority and data transmission load, then uploading the split data or the file transmission data to a receiving queue of the upper computer, and informing upper application software in a message mode after the split data or the file transmission data are correspondingly processed by the upper computer; the communication data or the file transmission data are all communication data and file transmission data required by upper-layer application software, and therefore real-time state monitoring work is achieved on the lower computer.
The system in this embodiment is mainly implemented by separately and independently designing the data transmission function of the bottom layer of the ethernet network and the upper layer application program, so that the system does not depend on an operating system and a hardware environment, achieves the effect of uniformly and completely managing the network status, further avoids repeated work and various conflicts of the network, and has good flexibility, expansibility and low coupling.
Optionally, as shown in fig. 6, the data communication component includes:
the network operation dynamic library is used for supporting files, memories, commands or sending/receiving;
the first calling unit is used for calling the related functions in the network operation dynamic library and opening a path;
the network communication dynamic library is used for providing remote login, obtaining/network address or specified state;
the second calling unit is used for calling related functions in the network communication dynamic library and putting communication data or file transmission data into a corresponding queue in a data packet sending queue according to the priority;
and the sending unit is used for inquiring each queue in the data packet sending queues according to the priority algorithm and sending the data of each queue to the destination address.
Optionally, the network communication component comprises:
the device comprises an acquisition unit, a transmission unit and a processing unit, wherein the acquisition unit is used for acquiring network communication interfaces appointed to be transmitted by each queue in a data packet transmission queue;
and the transmission unit is used for transmitting each queue to the lower computer or uploading the queue to the upper computer according to the network communication interface.
Optionally, the system further comprises:
the data packet sending module is used for packaging the communication data and the file transmission data to form a first data packet and sending the first data packet to the history station;
a synchronization module for receiving the second data packet and synchronizing the second data packet;
and the processing module is used for adding the second data packet into the data packet sending queue.
Optionally, the system further comprises:
the analysis processing module is used for carrying out analysis processing according to the data packet sending queue and acquiring corresponding communication data or file transmission data;
and the notification module is used for generating a corresponding message according to the corresponding communication data or the file transmission data and notifying the upper application software.
The system of this embodiment may be configured to implement the technical solutions of the method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A cross-platform data communication method based on QT is characterized by comprising the following steps:
receiving communication data or file transmission data of an upper computer or a lower computer;
carrying out classification processing, priority processing or sub-packet processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems;
sending the data packet sending queue to a lower computer or uploading the data packet sending queue to an upper computer;
the step of issuing the data packet sending queue to the lower computer or uploading the data packet sending queue to the upper computer comprises the following steps: acquiring network communication interfaces appointed to be transmitted by each queue in a data packet transmission queue; and issuing each queue to a lower computer or uploading each queue to an upper computer according to the network communication interface.
2. The method of claim 1, wherein the classifying, prioritizing, or packetizing the communication data or file transfer information and forming a packet transmission queue comprises:
carrying out classification processing or subpackage processing on the communication data or the file transmission data;
calling a related function in a network operation dynamic library for supporting files, memories, commands or sending/receiving and opening a path;
calling a related function in a network communication dynamic library for providing remote login, acquiring a network address or an appointed state, and putting classified or sub-packaged communication data or file transmission data into a corresponding queue in a data packet sending queue according to priority;
and inquiring each queue in the data packet sending queue according to a priority algorithm, and sending the data of each queue to a destination address.
3. The method according to any one of claims 1-2, wherein after the classifying, prioritizing or packetizing the communication data or the file transfer data and forming a data packet transmission queue, the method further comprises:
and acquiring time information and adding the time information into a data packet sending queue.
4. The method of claim 3, wherein obtaining and adding time information to a packet transmit queue comprises:
packaging the communication data and the file transmission data to form a first data packet and sending the first data packet to a history station, adding time information into the first data packet by the history station to form a second data packet, and synchronizing the second data packet in the whole network;
and adding the second data packet into the data packet sending queue.
5. The method of claim 1, wherein after uploading the packet send queue to the upper computer, the method further comprises:
analyzing and processing according to the data packet sending queue and acquiring corresponding communication data or file transmission data;
and generating a corresponding message according to the corresponding communication data or the file transmission data and informing the upper application software.
6. The method of claim 5, wherein after uploading the packet send queue to the upper computer, the method further comprises:
receiving network data and obtaining a data type;
and sending the data to the destination address according to the data type.
7. A QT-based cross-platform data communication system, comprising:
the receiving module is used for acquiring communication data or file transmission data of the upper computer or the lower computer;
the data communication assembly is used for carrying out classification processing, priority processing or sub-packet processing on the communication data or the file transmission data and forming a data packet sending queue so that the communication data or the file transmission data can be transmitted between an upper computer and a lower computer with different operating systems;
the network communication component is used for sending the data packet sending queue to the lower computer or uploading the data packet to the upper computer;
the network communication component comprises: the device comprises an acquisition unit, a transmission unit and a processing unit, wherein the acquisition unit is used for acquiring network communication interfaces appointed to be transmitted by each queue in a data packet transmission queue; and the transmission unit is used for transmitting each queue to the lower computer or uploading the queue to the upper computer according to the network communication interface.
8. The system of claim 7, wherein the data communication component comprises:
the network operation dynamic library is used for supporting files, memories, commands or sending/receiving;
the first calling unit is used for calling the related functions in the network operation dynamic library and opening a path;
the network communication dynamic library is used for providing remote login, obtaining/network address or specified state;
the second calling unit is used for calling related functions in the network communication dynamic library and putting communication data or file transmission data into a corresponding queue in a data packet sending queue according to the priority;
and the sending unit is used for inquiring each queue in the data packet sending queues according to the priority algorithm and sending the data of each queue to the destination address.
9. The system according to any one of claims 7-8, further comprising:
the data packet sending module is used for packaging the communication data and the file transmission data to form a first data packet and sending the first data packet to the history station;
a synchronization module for receiving the second data packet and synchronizing the second data packet;
and the processing module is used for adding the second data packet into the data packet sending queue.
10. The system of claim 7, further comprising:
the analysis processing module is used for carrying out analysis processing according to the data packet sending queue and acquiring corresponding communication data or file transmission data;
and the notification module is used for generating a corresponding message according to the corresponding communication data or the file transmission data and notifying the upper application software.
CN201710427929.6A 2017-06-08 2017-06-08 Cross-platform data communication method and system based on QT Active CN107171892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710427929.6A CN107171892B (en) 2017-06-08 2017-06-08 Cross-platform data communication method and system based on QT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710427929.6A CN107171892B (en) 2017-06-08 2017-06-08 Cross-platform data communication method and system based on QT

Publications (2)

Publication Number Publication Date
CN107171892A CN107171892A (en) 2017-09-15
CN107171892B true CN107171892B (en) 2020-05-22

Family

ID=59826029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710427929.6A Active CN107171892B (en) 2017-06-08 2017-06-08 Cross-platform data communication method and system based on QT

Country Status (1)

Country Link
CN (1) CN107171892B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196515A (en) * 2017-12-21 2018-06-22 中国电子信息产业集团有限公司第六研究所 Cross-platform real-time data processing method and device
CN111988240B (en) * 2020-07-27 2024-03-29 北京北方华创微电子装备有限公司 Data transmission method and device, electronic equipment and storage medium
CN113055486A (en) * 2021-03-22 2021-06-29 北京计算机技术及应用研究所 Cross-platform communication data fusion distribution design implementation method
CN113539451A (en) * 2021-06-04 2021-10-22 贵州医科大学附属医院 Qt-based medical linear accelerator regular maintenance data recording system and maintenance method
CN115202891B (en) * 2022-09-15 2022-11-15 北京科云时代信息技术有限公司 Cross-process data acquisition and transmission method and system based on big data and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996854A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 Integrated processing system and method for the data exchange between different application systems
CN101303644A (en) * 2007-05-08 2008-11-12 西北民族大学 Brahma-sutra Tibetan input method based on Windows OS and Linux OS
US7788386B2 (en) * 2005-11-04 2010-08-31 Bea Systems, Inc. System and method for shaping traffic
CN103248561A (en) * 2013-03-30 2013-08-14 百度在线网络技术(北京)有限公司 Cross-platform and cross-terminal communication method and message system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7788386B2 (en) * 2005-11-04 2010-08-31 Bea Systems, Inc. System and method for shaping traffic
CN1996854A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 Integrated processing system and method for the data exchange between different application systems
CN100499462C (en) * 2006-12-22 2009-06-10 中国建设银行股份有限公司 Integrated processing system and method for the data exchange between different application systems
CN101303644A (en) * 2007-05-08 2008-11-12 西北民族大学 Brahma-sutra Tibetan input method based on Windows OS and Linux OS
CN103248561A (en) * 2013-03-30 2013-08-14 百度在线网络技术(北京)有限公司 Cross-platform and cross-terminal communication method and message system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于ETL的校园数据交换平台设计与实现;褚珩;《中国优秀硕士学位论文全文数据库》;20160315;全文 *

Also Published As

Publication number Publication date
CN107171892A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN107171892B (en) Cross-platform data communication method and system based on QT
CN108809852B (en) Method and system for resilient network configuration for time sensitive services
CN110495145B (en) Method, system and computer medium for optimizing operation control of installed product
US20200099762A1 (en) Transmission Method
KR20190050998A (en) Communication device, control device and communication method
US10185598B2 (en) Method and system for offloading industrial tasks in a human-machine interface panel to other devices
CN114253224A (en) Integrating a container arrangement system with an operating technology device
CN114296405A (en) Implementation of serverless functionality using container orchestration systems and operating technology devices
US10877803B2 (en) Control apparatus, control method and non-transitory storage medium
US20190166202A1 (en) Control device, control method, and non-transitory computer-readable recording medium
CN110851252A (en) Protocol conversion equipment and protocol conversion method based on TSN (traffic service network) architecture
US20150127821A1 (en) Control device
CN112489409A (en) Data processing method and system for hybrid access of multi-protocol Internet of things terminal to RS485 bus
CN101893876B (en) Control network method for large-scale distributed control system
CN104486188B (en) A kind of method to set up and device for receiving and dispatching separate threads
US11750334B2 (en) Data collection management device and data collection system
CN103353750A (en) Multi-bus microwave metallurgical control system and method
US11522762B2 (en) Coordination device and method for providing control applications via a communication network for transmitting time-critical data
CN110161893A (en) The communication means and storage medium of slave device, control system, response data
CN114513383B (en) Real-time Ethernet field bus data packet processing method based on original socket
CN113848834A (en) Workshop equipment access system and method based on edge cloud cooperation
EP3790241B1 (en) Method and gateway device for transmitting datagrams via two or more networks
KR20210015387A (en) Method and apparatus for distributed smart factory operation using opc ua
WO2023176164A1 (en) Control system
US11582127B2 (en) IIoT asymmetric reactive buffering to dynamically manage and optimize in-motion data batch size

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190819

Address after: 102209 Building D, China Electronic Information Security Industry Base, Southern District of Future Science City, Changping District, Beijing

Applicant after: No.6 Research Institute of China Electronics Corporation

Applicant after: Zhongdian Intelligent Technology Co., Ltd.

Address before: No. 25 Tsinghua East Road, Haidian District, Beijing 100085

Applicant before: No.6 Research Institute of China Electronics Corporation

GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wang Hao

Inventor after: Han Qingmin

Inventor after: Wang Yixuan

Inventor after: Song Liding

Inventor after: Xu Yifeng

Inventor after: Zheng Er

Inventor after: Zhang Hanwen

Inventor after: Niu Hening

Inventor after: Zhang Lei

Inventor before: Wang Hao

Inventor before: Han Qingmin

Inventor before: Wang Yixuan

Inventor before: Xu Yifeng

Inventor before: Zheng Er

Inventor before: Zhang Hanwen

Inventor before: Niu Hening

Inventor before: Zhang Lei