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

Automatic TCP/UDP (Transmission Control Protocol/User Datagram Protocol) data packing and unpacking method based on PYTHON language

A data packet and group packet technology, applied in the direction of program control devices, etc., can solve the problems of cumbersome and complex construction and analysis, difficult expansion, inflexibility, etc., to increase scalability and flexibility, improve accuracy and efficiency , the effect of simplifying the coding work

Inactive Publication Date: 2011-01-12
FUJIAN XINO COMM TECH
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, most of the grouping and unpacking of TCP / UDP-based communication protocols are directly processed in the program code. When the data is received, it is transferred to the corresponding protocol processor for processing. It is necessary to write the code of each protocol, and the protocol structure has It is very inflexible and not easy to expand the system when it is changed. It is very inflexible and not easy to expand the system; for the program in the debugging and testing stage, it is more necessary to construct and analyze the protocol field by field. This process is very It is cumbersome and complicated, and it is easy to make mistakes in construction and analysis due to the complexity of the protocol

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
  • Automatic TCP/UDP (Transmission Control Protocol/User Datagram Protocol) data packing and unpacking method based on PYTHON language
  • Automatic TCP/UDP (Transmission Control Protocol/User Datagram Protocol) data packing and unpacking method based on PYTHON language
  • Automatic TCP/UDP (Transmission Control Protocol/User Datagram Protocol) data packing and unpacking method based on PYTHON language

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment

[0168] A method for grouping and unpacking data packets based on TCP / UPD communication of the present invention is implemented in the supply and marketing communication system. There are commodity download agreements, commodity order agreements, etc. in the supply and marketing system. The invention is used to package and unpack the data of the commodity order agreement. Such as figure 2 shown.

[0169] The specific steps are:

[0170] 1. Packing process

[0171] 1) Define the protocol that needs to be converted as an XML file, and the XML format is as the example above;

[0172] 2) The program loads the XML data and returns the LIST data type after analysis and processing, and selects the specified protocol to be packaged;

[0173] 3) According to the selected protocol, generate the data of each field;

[0174] 4) Then combine the data according to the protocol rules to generate the required protocol communication data packets.

[0175] 2. Unpacking process

[0176] ...

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 relates to a TCP / UDP communication data packet packing and unpacking method based on a PYTHON language. A communication data structure is defined by an XML file form to form a transformational relation mapping table that data packets and configuration structures establish one-to-one correspondence, and the transformational relation mapping table is resident in an internal storage, and packing and unpacking are completed through the transformational relation mapping table. In the packing process, the data of each field of a protocol is generated according to the transformational relation mapping table, and then the data is combined to form a complete data message. In the unpacking process, the complete data message is split into a plurality of fields according to the transformational relation mapping table. The invent greatly increases the developed and test speed of a TCP / UDP data communication program to make a programmer more concentrate on the development of the business logic of the program, whereas a tester does not need to check the communication data byte by byte, and thereby, the accuracy and the efficiency of a test can be improved.

Description

【Technical field】 [0001] The invention belongs to the field of computer software communication, and specifically refers to a method for automatically grouping and unpacking TCP / UDP data based on PYTHON language. 【Background technique】 [0002] In the field of computer software communication, TCP is a connection-oriented protocol that ensures reliable transmission. Through TCP protocol transmission, what is obtained is a sequential error-free data stream. UDP is a protocol corresponding to TCP. It is a connectionless protocol, and each datagram is an independent message. TCP / UDP are applied to different fields respectively, such as TCP applied in remote connection (Telnet), hypertext transfer (HTTP) and file transfer (FTP); UDP applied in video conferencing system, etc. [0003] At present, most of the grouping and unpacking of TCP / UDP-based communication protocols are directly processed in the program code. When the data is received, it is transferred to the corresponding ...

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): G06F9/44
Inventor 林万枝陈夏洋
Owner FUJIAN XINO COMM TECH
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