CN114520836A - Network communication protocol method and system capable of multiplexing and preventing data tampering - Google Patents

Network communication protocol method and system capable of multiplexing and preventing data tampering Download PDF

Info

Publication number
CN114520836A
CN114520836A CN202210029868.9A CN202210029868A CN114520836A CN 114520836 A CN114520836 A CN 114520836A CN 202210029868 A CN202210029868 A CN 202210029868A CN 114520836 A CN114520836 A CN 114520836A
Authority
CN
China
Prior art keywords
data
application server
data packet
request number
network communication
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.)
Granted
Application number
CN202210029868.9A
Other languages
Chinese (zh)
Other versions
CN114520836B (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.)
Shenzhen Minimally Invasive Yunqi Technology Co ltd
Original Assignee
Shenzhen Minimally Invasive Yunqi Technology Co ltd
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 Shenzhen Minimally Invasive Yunqi Technology Co ltd filed Critical Shenzhen Minimally Invasive Yunqi Technology Co ltd
Priority to CN202210029868.9A priority Critical patent/CN114520836B/en
Publication of CN114520836A publication Critical patent/CN114520836A/en
Application granted granted Critical
Publication of CN114520836B publication Critical patent/CN114520836B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network communication protocol method and a system capable of multiplexing and preventing data tampering, wherein the method comprises the following steps: establishing a plurality of TCP/IP channels on a transmission layer, wherein the same group of clients share the same TCP/IP channel to be in communication connection with an application server; before a client sends a data packet of a task to an application server, generating a corresponding request number; storing the corresponding relation between the request number and the callback hook into a callback hook pool; the application server responds to the data according to the request number when receiving the data packet, the invention adopts a multiplexing method, one connection can simultaneously process a plurality of tasks, and the invention can judge whether the data is falsified by data signature because of adding a request number and data signature mechanism in the transmission process, thereby saving time and having high reliability.

Description

Network communication protocol method and system capable of multiplexing and preventing data tampering
Technical Field
The present invention relates to network communication technologies, and in particular, to a network communication protocol method and system capable of multiplexing and preventing data tampering.
Background
In the prior art, a client can establish connection with an application server by using a TCP protocol or an IP protocol, the client sends a data packet to the application server and waits for the response of the application server, and the application server cannot verify whether data is tampered in the transmission process after receiving the data packet sent by the client.
The prior art has the problems that one connection can only process one task, if the application server processes more tasks, only one task can be processed in sequence, a plurality of tasks cannot be processed synchronously, and the data of the tasks can be tampered in the transmission process.
Disclosure of Invention
In view of the above technical problems, the present invention provides a network communication protocol method and system capable of multiplexing and preventing data tampering.
The embodiment of the invention provides a network communication protocol method capable of multiplexing and preventing data from being tampered, which comprises the following steps: establishing a plurality of TCP/IP channels on a transmission layer, wherein the same group of clients share the same TCP/IP channel to be in communication connection with an application server; before a client sends a data packet of a task to an application server, generating a corresponding request number; storing the corresponding relation between the request number and the callback hook into a callback hook pool; and the application server responds to the data according to the request number when receiving the data packet.
Optionally, the method further comprises: and the client receives the response data, retrieves the callback hook from the callback hook pool and executes the callback.
Optionally, the data packet is encapsulated according to a preset protocol format.
Optionally, the step of responding to the data according to the request number when the application server receives the data packet includes: the application server verifies whether the data packet matches the request number when receiving the data packet,
and if the data packet is matched with the data packet, responding to the data of the data packet.
Optionally, the client continuously sends a plurality of data packets to the application server.
Optionally, each of the plurality of data packets corresponds to a request number.
Optionally, the other end of the application server communicates with the client through a TCP/IP channel.
The invention also provides a network communication protocol system capable of multiplexing and preventing data tampering, which comprises an application server and clients, wherein a plurality of TCP/IP channels are established in a transmission layer, and the same group of clients share the same TCP/IP channel to be in communication connection with the application server; before a client sends a data packet of a task to an application server, generating a corresponding request number; storing the corresponding relation between the request number and the callback hook into a callback hook pool; and the application server responds to the data according to the request number when receiving the data packet.
Optionally, the data packet is encapsulated according to a preset protocol format.
Another embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, which when executed by a computer, implements the network communication protocol method capable of multiplexing and preventing data tampering as described in any one of the above.
In the technical scheme provided by the embodiment of the invention, before a client sends a data packet of a task, a corresponding request number is generated, the corresponding relation between the request number and a callback hook is stored in a callback hook pool, when an application server receives the data packet, the data packet is analyzed, whether the signature value of the data packet is matched with the calculated signature value is judged, if the signature value of the data packet is matched with the calculated signature value, the data is not tampered, the proxy application server responds to the data according to a specified protocol, the client receives the response data, the callback hook is retrieved from the callback groove pool, and the callback is executed.
Drawings
FIG. 1 is a flow chart illustrating a network communication protocol method for multiplexing and preventing data tampering according to the present invention;
fig. 2 is a schematic diagram of data transmission of a network communication protocol method capable of multiplexing and preventing data tampering according to the present invention.
Detailed Description
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 present invention provides a network communication protocol method capable of multiplexing and preventing data tampering, please refer to fig. 1, which includes the following steps:
and step S10, a plurality of TCP/IP channels are established on the transmission layer, and the same group of clients share the same TCP/IP channel to be in communication connection with the application server.
The invention is a TCP/IP transport protocol, i.e. transmission control/network protocol, also called network communication protocol. It is the most basic communication protocol in the use of networks. The TCP/IP transport protocol specifies the standards and methods for communicating between various parts of the internet. In addition, the TCP/IP transmission protocol is two important protocols for ensuring timely and complete transmission of network data information. The TCP/IP transport protocol is strictly a four-layer architecture, including the application layer, the transport layer, the network layer and the data link layer. The TCP/IP protocol is used to receive data from the transport layer or to transmit data to the transport layer in different application requirements and manners.
In step S20, before the client sends the data packet of the task to the application server, a corresponding request number is generated. And the data packet is packaged according to a preset protocol format.
Before a client sends a plurality of task data packets to an application server, the method stores the corresponding relation between the request number and the callback hook corresponding to each task data packet locally.
And step S30, storing the request number and the callback hook corresponding relation into a callback hook pool.
And step S40, the application server responds to the data according to the request number when receiving the data packet.
The step of responding data according to the request number when the application server receives the data packet comprises the following steps:
the application server verifies upon receipt of the data packet whether the signature value of the data packet matches the calculated signature value,
and if the data packet is matched with the data packet, responding to the data of the data packet.
When the application server receives the data packet, whether the data packet is in compliance is judged, if so, the data packet is analyzed, whether the data signature value in the data packet is matched with the calculated signature value is judged, if so, the data is not tampered, and the proxy application server responds to the data according to a specified protocol.
In one embodiment of the present invention, the method further includes the following steps:
and the client receives the response data, retrieves the callback hook from the callback hook pool and executes the callback.
Each of the plurality of data packets corresponds to a request number.
And the other end of the application server communicates with the client through a TCP channel.
Referring to fig. 2, before sending a data packet of a task, a client generates a corresponding request number, stores a correspondence between the request number and a callback hook in a callback hook pool, when an application server receives the data packet, analyzes the data packet, determines whether a data signature value in the data packet matches a calculated signature value, if so, indicates that the data is not tampered, proxies the application server responds to the data according to a specified protocol, and the client receives the response data, retrieves the callback hook from the callback slot pool, and executes callback.
The specific application scenarios are as follows:
when the customer needs to view the goods information, and has obtained 10 goods lists, the customer needs to request the details of each goods from the application server. Each request takes 5 seconds. If the prior art is adopted, a task of requesting commodity details needs to wait for the application server to return to continue the next task, 10 × 5 — 50 seconds are needed to obtain details of 10 commodities, and the commodity details cannot know whether data is falsified in the transmission process, for example, the original price is 20 yuan, which is falsified into 10 yuan.
The invention does not need to wait after sending a commodity detail task, and continues to obtain the next commodity detail, and only 5 seconds are needed for obtaining the details of 10 commodities, thereby saving 45/50-90% of time. Because the request number and the data signature mechanism are added in the transmission process, if the data is tampered, the data signatures cannot be matched.
The invention adopts a multiplexing method, one connection can process a plurality of tasks at the same time, and the invention can judge whether the data is falsified by the data signature because of adding the request number and the data signature mechanism in the transmission process, thereby saving time and having high reliability.
In one embodiment of the invention, the system comprises an application server and a client, wherein a plurality of TCP channels are established in a transmission layer, and the same group of clients share the same TCP channel to be in communication connection with the application server;
before a client sends a data packet of a task to an application server, generating a corresponding request number;
storing the corresponding relation between the request number and the callback hook into a callback hook pool;
and the application server responds to the data according to the request number when receiving the data packet.
In one embodiment of the present invention, a computer-readable storage medium is further provided, where the computer-readable storage medium stores a computer program, and the computer program enables a computer to implement the network communication protocol method capable of multiplexing and preventing data from being tampered according to the foregoing embodiments when the computer program is executed.
It should be noted that, the program embodiment and the method embodiment of the network communication protocol method capable of multiplexing and preventing data tampering on the storage medium belong to the same concept, and the specific implementation process thereof is described in detail in the method embodiment, and the technical features in the method embodiment are applicable to the embodiments of the storage medium, which is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A network communication protocol method that is multiplexed and resistant to data tampering, the method comprising:
establishing a plurality of TCP/IP channels on a transmission layer, wherein the same group of clients share the same TCP/IP channel to be in communication connection with an application server;
before a client sends a data packet of a task to an application server, generating a corresponding request number;
storing the corresponding relation between the request number and the callback hook into a callback hook pool;
and the application server responds to the data according to the request number when receiving the data packet.
2. The network communication protocol method capable of multiplexing and preventing data tampering as claimed in claim 1, further comprising:
and the client receives the response data, retrieves the callback hook from the callback hook pool and executes the callback.
3. The network communication protocol method of claim 1, wherein the data packet is encapsulated according to a predetermined protocol format.
4. The network communication protocol method capable of multiplexing and preventing data tampering as claimed in claim 1, wherein the step of responding to the data according to the request number when the application server receives the data packet comprises:
the application server verifies upon receipt of the data packet whether the signature value of the data packet matches the calculated signature value,
and if the data packet is matched with the data packet, responding to the data of the data packet.
5. The network communication protocol method capable of multiplexing and preventing data tampering as claimed in claim 1, wherein the client continuously sends a plurality of data packets to the application server.
6. The network communication protocol method capable of being multiplexed and preventing data tampering as claimed in claim 5, wherein each of the plurality of data packets corresponds to a request number.
7. The network communication protocol method capable of multiplexing and preventing data tampering as claimed in claim 1, wherein the other end of the application server communicates with the client through a TCP/IP channel.
8. A network communication protocol system capable of multiplexing and preventing data tampering is characterized by comprising an application server and clients, wherein a plurality of TCP/IP channels are established in a transmission layer, and the same group of clients share the same TCP/IP channel to be in communication connection with the application server;
before a client sends a data packet of a task to an application server, generating a corresponding request number;
storing the corresponding relation between the request number and the callback hook into a callback hook pool;
and the application server responds to the data according to the request number when receiving the data packet.
9. The network communication protocol system of claim 1, wherein the data packet is encapsulated according to a predetermined protocol format.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the computer program is used to enable a computer to execute the method according to any one of claims 1 to 7.
CN202210029868.9A 2022-01-12 2022-01-12 Multiplexing network communication protocol method and system capable of preventing data tampering Active CN114520836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210029868.9A CN114520836B (en) 2022-01-12 2022-01-12 Multiplexing network communication protocol method and system capable of preventing data tampering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210029868.9A CN114520836B (en) 2022-01-12 2022-01-12 Multiplexing network communication protocol method and system capable of preventing data tampering

Publications (2)

Publication Number Publication Date
CN114520836A true CN114520836A (en) 2022-05-20
CN114520836B CN114520836B (en) 2024-04-19

Family

ID=81596967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210029868.9A Active CN114520836B (en) 2022-01-12 2022-01-12 Multiplexing network communication protocol method and system capable of preventing data tampering

Country Status (1)

Country Link
CN (1) CN114520836B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006074072A2 (en) * 2004-12-30 2006-07-13 Citrix Systems, Inc. Systems and methods for providing client-side acceleration techniques
CN103023987A (en) * 2012-11-27 2013-04-03 蓝盾信息安全技术股份有限公司 Multiplexing method based on transmission control protocol (TCP) connection
CN103391289A (en) * 2013-07-16 2013-11-13 中船重工(武汉)凌久高科有限公司 Multilink safety communication method based on completion port model
CN105553986A (en) * 2015-12-18 2016-05-04 中国科学院信息工程研究所 UDP-based multi-addressing limited real-time node communication method
CN109743323A (en) * 2019-01-08 2019-05-10 中国石油大学(华东) A kind of Resources Sharing based on block chain technology
CN110233880A (en) * 2019-05-23 2019-09-13 北京字节跳动网络技术有限公司 Transmission method, system, medium and the electronic equipment of UDP message packet
CN110493030A (en) * 2019-07-05 2019-11-22 中国平安财产保险股份有限公司 Network optimized approach, device, computer equipment and storage medium
CN111741129A (en) * 2020-07-31 2020-10-02 南京天创电子技术有限公司 MQTT protocol communication method and system for realizing multiplexing
CN113242250A (en) * 2021-05-19 2021-08-10 苏州瑞立思科技有限公司 Multiplexing protocol and transmission method
CN113923261A (en) * 2021-10-29 2022-01-11 深圳壹账通智能科技有限公司 Service request response method, system, equipment and computer readable medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006074072A2 (en) * 2004-12-30 2006-07-13 Citrix Systems, Inc. Systems and methods for providing client-side acceleration techniques
CN103023987A (en) * 2012-11-27 2013-04-03 蓝盾信息安全技术股份有限公司 Multiplexing method based on transmission control protocol (TCP) connection
CN103391289A (en) * 2013-07-16 2013-11-13 中船重工(武汉)凌久高科有限公司 Multilink safety communication method based on completion port model
CN105553986A (en) * 2015-12-18 2016-05-04 中国科学院信息工程研究所 UDP-based multi-addressing limited real-time node communication method
CN109743323A (en) * 2019-01-08 2019-05-10 中国石油大学(华东) A kind of Resources Sharing based on block chain technology
CN110233880A (en) * 2019-05-23 2019-09-13 北京字节跳动网络技术有限公司 Transmission method, system, medium and the electronic equipment of UDP message packet
CN110493030A (en) * 2019-07-05 2019-11-22 中国平安财产保险股份有限公司 Network optimized approach, device, computer equipment and storage medium
CN111741129A (en) * 2020-07-31 2020-10-02 南京天创电子技术有限公司 MQTT protocol communication method and system for realizing multiplexing
CN113242250A (en) * 2021-05-19 2021-08-10 苏州瑞立思科技有限公司 Multiplexing protocol and transmission method
CN113923261A (en) * 2021-10-29 2022-01-11 深圳壹账通智能科技有限公司 Service request response method, system, equipment and computer readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIANLI SUN: ""TCP/IP Socket I/O Multiplexing Using a Hybrid Polling Event System"", 《2009 29TH IEEE INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS WORKSHOPS》, 7 July 2009 (2009-07-07) *
王振宇;孔文峰;: "SCUT-EAI中TCP/IP通用适配器的分析和设计", 计算机工程与设计, no. 12, 23 June 2007 (2007-06-23) *

Also Published As

Publication number Publication date
CN114520836B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
US9379997B1 (en) Service request management
CN110233881B (en) Service request processing method, device, equipment and storage medium
EP3499845B1 (en) Data packet transmission method and system
CN106603311A (en) OTA upgrade method, client, server and system
US20030182432A1 (en) Method and system for client-based adaptive networking system
CN101953139B (en) DHCP in response to Internet connectedness initializes
CN101217512B (en) A client-end state maintenance method, system, client-end and application server
EP3128713B1 (en) Page push method and system
CN105991689A (en) HTTP message processing method, system, HTTP client and server
CN101621532B (en) Method for realizing HTTP application by thread pool
CN109167762A (en) A kind of IEC104 message checking method and device
CN110995829B (en) Instance calling method and device and computer storage medium
US20030055881A1 (en) Method and apparatus for transmitting data over a network
CN113407234A (en) Cross-platform cross-browser operation and maintenance access method, system and storage medium
CN111371668B (en) Method, device, equipment and storage medium for periodically sending based on free ARP
CN114520836A (en) Network communication protocol method and system capable of multiplexing and preventing data tampering
US8060568B2 (en) Real time messaging framework hub to intercept and retransmit messages for a messaging facility
FI111587B (en) Communication method and system
US7406496B2 (en) System and method for processing callback requests, which include a client port and address, included in web-based procedure calls
GB2580420A (en) Electronic message adaptation
AU2018373682B2 (en) Method for remote management of a device connected to a residential gateway
CN111669364B (en) Data transmission method, device, electronic equipment and medium
CN113452754A (en) CoAP protocol-based power distribution Internet of things network communication system
CN113411250B (en) Real-time message processing method, system, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant