CN109218261B - Data processing method and data processing device - Google Patents

Data processing method and data processing device Download PDF

Info

Publication number
CN109218261B
CN109218261B CN201710532715.5A CN201710532715A CN109218261B CN 109218261 B CN109218261 B CN 109218261B CN 201710532715 A CN201710532715 A CN 201710532715A CN 109218261 B CN109218261 B CN 109218261B
Authority
CN
China
Prior art keywords
data
communication
protocol
information
network
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
CN201710532715.5A
Other languages
Chinese (zh)
Other versions
CN109218261A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710532715.5A priority Critical patent/CN109218261B/en
Publication of CN109218261A publication Critical patent/CN109218261A/en
Application granted granted Critical
Publication of CN109218261B publication Critical patent/CN109218261B/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/24Negotiation of communication capabilities
    • 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/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

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

Abstract

The embodiment of the invention discloses a data processing method and a data processing device, wherein the method comprises the following steps: generating communication data; selecting network data information corresponding to the communication data; traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data; packaging the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol; and sending the communication data packet to transmit the communication data packet to a terminal supporting the communication protocol.

Description

Data processing method and data processing device
Technical Field
The present invention relates to data transmission technologies in the field of communications, and in particular, to a data processing method and a data processing apparatus.
Background
In the process of implementing network communication, it is often necessary to face the situation of selecting different Transmission protocols and packet modes according to a specific network environment of a user, and there are a network that only supports Transmission Control Protocol (TCP) Transmission, a local area network that only opens 80 ports, and a mobile network that continuously switches network boundaries. The user-specific network environment makes it necessary to make specific adaptations during the transmission of network data, using different data packet modes.
At present, the process of transmitting network data is mainly realized by binding service logic and a packet mode in a network environment, so that the situation that multiple logics of the same service correspond to multiple packet modes due to different network environments occurs. However, the multiple logic implementations are associated with multiple encapsulation methods, which significantly increases the software complexity and is not conducive to expansion and maintenance.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a data processing method and a data processing apparatus to solve the problems in the prior art.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:
generating communication data;
selecting network data information corresponding to the communication data;
traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data;
the communication data are packaged into corresponding communication data packets by using a data packet mode matched with the communication protocol;
and sending the communication data packet to transmit the communication data packet to a terminal supporting the communication protocol.
In a second aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes: the device comprises a generating module, a matching module, a processing module, a packaging module and a sending module;
the generating module is used for generating communication data;
the matching module is used for selecting network data information corresponding to the communication data;
the processing module is used for traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data;
the encapsulation module is used for encapsulating the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol;
the sending module is configured to send the communication data packet, so as to transmit the communication data packet to a terminal supporting the communication protocol.
In a third aspect, an embodiment of the present invention provides a data processing apparatus, where the data processing apparatus includes:
a memory for storing a computer program capable of running on the processor;
a processor, configured to execute the steps of the data processing method according to the above embodiment when the computer program is executed.
In a fourth aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data processing method according to the above embodiment.
The data processing method and the data processing device of the embodiment of the invention generate communication data; selecting network data information corresponding to the communication data; traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data; packaging the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol; and sending the communication data packet to transmit the communication data packet to a terminal supporting the communication protocol. Therefore, the embodiment of the invention makes the communication protocol independent of the network environment or service logic processing, so the communication protocol can be flexibly selected according to the specific service requirement, thereby decoupling the data packaging mode and service logic realization in the user network environment, adapting to various network environments only by one set of service realization, flexibly selecting among various data packaging modes, enhancing the adaptability of software to the user network, and only needing iteration without reconstructing the software when dealing with new changes generated by the future user network.
Drawings
FIG. 1 is a schematic flow chart illustrating an implementation of an information processing method according to an embodiment of the present invention;
FIG. 2 is a first flowchart illustrating an implementation of a data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a TCP/IP protocol stack layer according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a second implementation flow of the data processing method according to the embodiment of the present invention;
fig. 5 is a schematic diagram of a correspondence list stored in pre-stored communication protocol information according to an embodiment of the present invention;
FIG. 6 is a third schematic flow chart illustrating an implementation of the data processing method according to the embodiment of the present invention;
fig. 7 is a schematic diagram of a correspondence list stored in pre-stored communication protocol information according to an embodiment of the present invention;
FIG. 8 is a fourth schematic flow chart illustrating an implementation of the data processing method according to the embodiment of the present invention;
FIG. 9 is a flowchart illustrating a conventional data processing method;
FIG. 10 is a flowchart illustrating a data processing method according to an embodiment of the present invention;
FIG. 11 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 12 is a schematic diagram of an alternative hardware structure for implementing the data processing apparatus according to the embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
The present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the examples provided herein are merely illustrative of the present invention and are not intended to limit the present invention. In addition, the following embodiments are provided as partial embodiments for implementing the present invention, not all embodiments for implementing the present invention, and the technical solutions described in the embodiments of the present invention may be implemented in any combination without conflict.
Referring to fig. 1, which is an alternative architecture diagram of the data processing system according to the embodiment of the present invention, in an application scenario where the first terminal 11 performs service interaction with the second terminal 12, the first terminal 11 needs to transmit communication data to the second terminal 12 through a network route. Specifically, the first terminal 11 first determines a communication protocol for transmitting communication data according to a network environment or service logic; further, the first terminal 11 routes the communication data network to a protocol stack corresponding to the determined communication protocol, so as to perform data encapsulation processing on the communication data, generate a communication data packet, and transmit the communication data packet to the second terminal 12. Of course, both the first terminal 11 and the second terminal 12 may be terminal devices or server devices. Therefore, the data packaging mode and the service logic implementation under the user network environment can be decoupled, so that the method can adapt to various network environments only by one set of service implementation, can flexibly select among various data packaging modes, further enhances the adaptability of software to the user network, and only needs iteration without reconstructing the software when dealing with new changes generated by the user network in the future.
Fig. 2 is a schematic view of a first implementation flow of a data processing method according to an embodiment of the present invention, and as shown in fig. 2, the method includes:
Step 201: generating communication data, wherein the communication data can be service data of interaction between a first terminal and a user through an application program;
here, the first terminal may be a terminal device or a server device. When the first terminal is a terminal device, the first terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the first terminal is the server equipment, the first terminal is an application server which runs the application program on the server side.
Here, the communication data is related to application interaction logic, such as chatting data, transfer data, online and offline data, and the like. It should be noted that, in different application scenarios, the manner of obtaining the service data generated by the user in the process of interacting with the application program of the first terminal is different, and as a possible implementation manner, the service data generated by the user in the process of interacting with the application program of the first terminal may be obtained by reading the file storing the service data corresponding to the application program.
Step 202: selecting network data information corresponding to the communication data;
here, the network data information includes network environment information and a service type, i.e., service logic, to which the communication data belongs.
Step 203: traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data;
here, the communication Protocol includes a public Protocol and a private Protocol, wherein the public Protocol mainly includes a TCP Protocol, a User Datagram Protocol (UDP), a File Transfer Protocol (FTP), a Hypertext Transfer Protocol (HTTP), and the like.
In an embodiment, when the network data information is network environment information, the traversing pre-stored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data includes: analyzing the pre-stored data transmission protocol information to obtain information at least comprising network environment information, a communication protocol and a corresponding relation between the network environment information and the communication protocol; and when the network data information is the network environment information, inquiring to obtain a communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol.
In another embodiment, when the network data information is a service type to which communication data belongs, the traversing pre-stored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data includes: analyzing the pre-stored data transmission protocol information to obtain information at least comprising a service type, a communication protocol and a corresponding relation between the service type and the communication protocol; and when the network data information is the service type of the communication data, inquiring to obtain the communication protocol corresponding to the service type according to the corresponding relation between the service type and the communication protocol.
Step 204: packaging the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol;
in an embodiment, the encapsulating the communication data into corresponding communication data packets by using a data packet manner matching with the communication protocol includes: routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set; and encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
It should be understood that, in one embodiment of the present invention, a set of protocol stacks may be preset, and the set of protocol stacks includes at least one of a public protocol stack and a private protocol stack.
The protocol stack set refers to the sum of protocols of each layer in a network, and includes header information of a communication protocol, the number of bits of data transmission bytes, and the like, and as shown in fig. 3, a TCP/IP protocol stack includes an application layer, a transport layer, a network layer, and a network interface layer, where the network interface layer is a base layer of a TCP/IP protocol model and is responsible for sending and receiving data frames. And the network layer encapsulates the data packet into an internet data packet through an interconnection protocol and runs a necessary routing algorithm. The Internet Protocol (IP), Address Resolution Protocol (ARP), Internet Control Message Protocol (ICMP), and Internet Group Management Protocol (IGMP) are four interconnection protocols.
The transport layer provides communication sessions between devices through a transport protocol. The choice of transport protocol depends on the data transport mode and typically includes both TCP and UDP protocols. The application layer is used for accessing the network and mainly comprises common FTP, HTTP, Domain Name System (DNS) protocol and TELNET protocol.
In the four-layer protocol of the TCP/IP protocol stack, the encapsulation condition of each layer of data packet comprises the following steps: when the service data is sent, the service data is packed once from the uppermost layer to the lowermost layer (a header and part of tail information are added); when receiving the service data, the service data is unpacked from the lowest layer to the uppermost layer in sequence (the header and part of the tail information are removed). These packing and unpacking operations are implemented by the TCP/IP protocol stack.
Further, in another embodiment of the present invention, the method may further include: and if the protocol stack corresponding to one or more communication protocols used for transmitting the communication data does not exist in the protocol stack set, adding the missing protocol stack in the protocol stack set.
It is understood that the communication protocol is continuously updated to meet the technological progress, and thus, a part of the communication protocol in the protocol stack set may be updated at a certain time, and at this time, the part of the communication protocol needs to be changed.
Further, in another embodiment of the present invention, the method further comprises: receiving data transmission protocol updating information; and updating the original communication protocol in the data transmission information based on the data transmission protocol updating information.
Step 205: and sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol.
Here, the second terminal may be a terminal device or a server device. When the second terminal is a terminal device, the second terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the second terminal is the server equipment, the second terminal is an application server which runs the application program on the server side.
It should be emphasized that, in the embodiments of the present invention, the communication protocol is independent of a network environment or service logic processing, so that the communication protocol may be flexibly selected according to specific service needs, and if the current application scenario is to send the same communication data to a plurality of second terminals in different protocol stacks, the communication protocol may also be implemented simultaneously, that is, one or more second terminals may be used.
The data processing method of the embodiment of the invention generates communication data, wherein the communication data is service data interacted with a user by a first terminal through an application program; selecting network data information corresponding to the communication data; traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data; packaging the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol; and sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol. Therefore, the embodiment of the invention makes the communication protocol independent of the network environment or service logic processing, so the communication protocol can be flexibly selected according to the specific service requirement, thereby decoupling the data packaging mode and service logic realization in the user network environment, adapting to various network environments only by one set of service realization, flexibly selecting among various data packaging modes, enhancing the adaptability of software to the user network, and only needing iteration without reconstructing the software when dealing with new changes generated by the future user network.
Fig. 4 is a schematic diagram of an implementation flow of a data processing method according to an embodiment of the present invention, where the network data information is a service type, i.e., a service logic, to which communication data belongs, and as shown in fig. 4, the method includes:
step 401: generating communication data, wherein the communication data are service data interacted with a user by a first terminal through an application program;
here, the first terminal may be a terminal device or a server device. When the first terminal is a terminal device, the first terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the first terminal is the server equipment, the first terminal is an application server which runs the application program on the server side.
Here, the communication data is related to application interaction logic, such as chatting data, transfer data, online and offline data, and the like. It should be noted that, in different application scenarios, the manner of obtaining the service data generated by the user in the process of interacting with the application program of the first terminal is different, and as a possible implementation manner, the service data generated by the user in the process of interacting with the application program of the first terminal may be obtained by reading the file storing the service data corresponding to the application program.
Step 402: selecting network data information corresponding to the communication data;
here, the network data information includes a service type, i.e., service logic, to which the communication data belongs.
In addition, the service type is used for indicating the division of the category to which different data processing operations belong, for example, the service type corresponding to the online and offline service data of the user of the chat application program is an account state service type, the service type corresponding to the chat service data of the chat application program is an interactive service type, the service type corresponding to the order service data in the life service application program is a business service type, and the like.
It should be understood that, in the data communication process, in order to implement orderly data exchange, a communication protocol agreed in advance must be followed, the communication protocol is a rule and agreement that must be followed by device-to-device communication, the communication protocol is related to a service type, service types supported by different communication protocols are different, for example, for the service types of a business service type and an account status service type, since the business service type relates to monetary transactions and the like, the communication protocol corresponding to the business service type has a higher security level relative to the communication protocol corresponding to the account status service type, and the like.
Step 403-404: analyzing the pre-stored data transmission protocol information to obtain information at least comprising a service type, a communication protocol and a corresponding relation between the service type and the communication protocol; when the network data information is the service type of the communication data, inquiring to obtain a communication protocol corresponding to the service type according to the corresponding relation between the service type and the communication protocol;
here, the communication protocols include a public protocol and a private protocol, wherein the public protocol mainly includes TCP, UDP, FTP, HTTP and the like.
Specifically, the service type of the service data is detected, for example, the service type corresponding to the service data is obtained according to a pre-stored correspondence between the service data and the service type, or the service type is manually input by a user on a related interface, and pre-stored communication protocol information is queried according to an application program and the service type of the service data, so as to determine a communication protocol used for transmitting the service data, wherein, as there are multiple service types supported by one communication protocol, there may be one or multiple communication protocols used for transmitting the service data.
It should be emphasized that, in different application scenarios, the content in the pre-stored communication protocol information is different, and the following is exemplified:
in a first example, the pre-stored communication protocol information may include a correspondence list between the service type and the communication protocol, so that after the service type to which the service data belongs is obtained, the correspondence list is queried to obtain one or more communication protocols corresponding to the service type.
For example, in this example, if the correspondence list stored in the pre-stored communication protocol information is as shown in fig. 5, if it is known that the service type to which the service data belongs is wireless communication, the correspondence list as shown in fig. 5 is queried, and it is determined that the communication protocol corresponding to the service type is the UDP protocol.
Step 405: the communication data are packaged into corresponding communication data packets by using a data packet mode matched with the communication protocol;
in an embodiment, the encapsulating the communication data into corresponding communication data packets by using a data packet manner matching with the communication protocol includes: routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set; and encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
It should be understood that, in an embodiment of the present invention, a set of protocol stacks may be preset, where the set of protocol stacks includes at least one of a public protocol stack and a private protocol stack.
The protocol stack set refers to the sum of protocols of each layer in a network, and includes header information of a communication protocol, the number of bits of data transmission bytes, and the like, and as shown in fig. 3, a TCP/IP protocol stack includes an application layer, a transport layer, a network layer, and a network interface layer, where the network interface layer is a base layer of a TCP/IP protocol model and is responsible for sending and receiving data frames. And the network layer encapsulates the data packet into an internet data packet through an interconnection protocol and runs a necessary routing algorithm. This includes four interconnection protocols, IP, ARP, ICMP, and IGMP.
The transport layer provides communication sessions between devices through a transport protocol. The choice of transport protocol depends on the data transport mode and typically includes both TCP and UDP protocols. The application layer is used for accessing the network and mainly comprises common FTP, HTTP, DNS protocol and TELNET protocol.
In the four-layer protocol of the TCP/IP protocol stack, the encapsulation condition of each layer of data packet comprises the following steps: when the service data is sent, the service data is packed once from the uppermost layer to the lowermost layer (a header and part of tail information are added); when receiving the service data, the service data is unpacked from the lowest layer to the uppermost layer in sequence (the header and part of the tail information are removed). These packing and unpacking operations are implemented by the TCP/IP protocol stack.
Further, in another embodiment of the present invention, the method may further include: and if the protocol stack set does not have a protocol stack corresponding to one or more communication protocols used for transmitting the communication data, adding the missing protocol stack in the protocol stack set.
It is understood that the communication protocol is continuously updated to meet the technological progress, and thus, a part of the communication protocol in the protocol stack set may be updated at a certain time, and at this time, the part of the communication protocol needs to be changed.
Further, in another embodiment of the present invention, the method further comprises: receiving data transmission protocol updating information; and updating the original communication protocol in the data transmission information based on the data transmission protocol updating information.
Step 406: and sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol.
Here, the second terminal may be a terminal device or a server device. When the second terminal is a terminal device, the second terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the second terminal is the server equipment, the second terminal is an application server which runs the application program on the server side.
It should be emphasized that, in the embodiments of the present invention, the communication protocol is independent of a network environment or service logic processing, so that the communication protocol may be flexibly selected according to specific service needs, and if the current application scenario is to send the same communication data to a plurality of second terminals of different protocol stacks, the communication protocol may also be implemented simultaneously, that is, one or more second terminals may be used.
The data processing method of the embodiment of the invention processes the communication protocol independent of the service logic, so the communication protocol can be flexibly selected according to the specific service requirement, thereby decoupling the data packaging mode and the service logic realization in the user network environment, adapting to various network environments only by one set of service realization, flexibly selecting among various data packaging modes, enhancing the adaptability of software to the user network, and only needing iteration without reconstructing the software when dealing with new changes generated by the future user network.
Fig. 6 is a schematic view of a third implementation flow of the data processing method according to the embodiment of the present invention, and as shown in fig. 6, the method includes:
step 601: generating communication data, wherein the communication data is service data for interaction between a first terminal and a user through an application program;
Here, the first terminal may be a terminal device or a server device. When the first terminal is a terminal device, the first terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a mobile terminal device such as a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the first terminal is the server equipment, the first terminal is an application server which runs the application program on the server side.
Here, the communication data is related to application interaction logic, such as chatting data, transfer data, online and offline data, and the like. It should be noted that, in different application scenarios, the manner of obtaining the service data generated by the user in the process of interacting with the application program of the first terminal is different, and as a possible implementation manner, the service data generated by the user in the process of interacting with the application program of the first terminal may be obtained by reading the file storing the service data corresponding to the application program.
Step 602: selecting network data information corresponding to the communication data;
Here, the network data information includes network environment information.
Step 603 to step 604: analyzing the pre-stored data transmission protocol information to obtain information at least comprising network environment information, a communication protocol and a corresponding relation between the network environment information and the communication protocol; when the network data information is the network environment information, inquiring to obtain a communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol;
here, the communication protocols include a public protocol and a private protocol, wherein the public protocol mainly includes TCP, UDP, FTP, HTTP and the like.
It should be emphasized that, in different application scenarios, the content in the pre-stored communication protocol information is different, and examples are as follows:
in a first example, the pre-stored communication protocol information may include a correspondence list between the network environment information and the communication protocol, so that after the network environment information corresponding to the communication data, that is, the network environment information where the first terminal is located, is obtained, the correspondence list is queried to obtain one or more communication protocols corresponding to the network environment information.
For example, in this example, if the correspondence list stored in the pre-stored communication protocol information is as shown in fig. 7, if it is known that the network environment information corresponding to the communication data is a local area network with only 80 open ports, the correspondence list as shown in fig. 7 is queried, and it is determined that the communication protocol corresponding to the network environment information is the HTTP protocol.
Step 605: the communication data are packaged into corresponding communication data packets by using a data packet mode matched with the communication protocol;
in an embodiment, the encapsulating the communication data into corresponding communication data packets by using a data packet manner matching with the communication protocol includes: routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set; and encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
It should be understood that, in one embodiment of the present invention, a set of protocol stacks may be preset, and the set of protocol stacks includes at least one of a public protocol stack and a private protocol stack.
As shown in fig. 3, the TCP/IP protocol stack includes an application layer, a transport layer, a network layer, and a network interface layer, where the network interface layer is a base layer of a TCP/IP protocol model and is responsible for sending and receiving data frames. And the network layer encapsulates the data packet into an internet data packet through an interconnection protocol and runs a necessary routing algorithm. This includes four interconnection protocols, IP, ARP, ICMP, and IGMP.
The transport layer provides communication sessions between devices through a transport protocol. The choice of transport protocol depends on the data transport mode and usually includes both TCP and UDP protocols. The application layer is used for accessing the network and mainly comprises common FTP, HTTP, DNS protocol and TELNET protocol.
In the four-layer protocol of the TCP/IP protocol stack, the encapsulation condition of each layer of data packet comprises the following steps: when the service data is sent, the service data is packed once from the uppermost layer to the lowermost layer (a header and part of tail information are added); when receiving the service data, the service data is unpacked from the lowest layer to the uppermost layer in sequence (the header and part of the tail information are removed). These packing and unpacking operations are implemented by the TCP/IP protocol stack.
Further, in another embodiment of the present invention, the method may further include: and if the protocol stack corresponding to one or more communication protocols used for transmitting the communication data does not exist in the protocol stack set, adding the missing protocol stack in the protocol stack set.
It is understood that a communication protocol is continuously updated to meet the technological progress, and thus, a part of the communication protocols in the protocol stack set may be updated at a certain time, and at this time, the part of the communication protocols needs to be changed.
Further, in another embodiment of the present invention, the method further comprises: receiving data transmission protocol updating information; and updating the original communication protocol in the data transmission information based on the data transmission protocol updating information.
Step 606: and sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol.
Here, the second terminal may be a terminal device or a server device. When the second terminal is a terminal device, the second terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the second terminal is the server equipment, the second terminal is an application server which runs the application program on the server side.
It should be emphasized that, in the embodiments of the present invention, the communication protocol is independent of a network environment or service logic processing, so that the communication protocol may be flexibly selected according to specific service needs, and if the current application scenario is to send the same communication data to a plurality of second terminals in different protocol stacks, the communication protocol may also be implemented simultaneously, that is, one or more second terminals may be used.
The data processing method of the embodiment of the invention processes the communication protocol independent of the network environment, so the communication protocol can be flexibly selected according to the specific service requirement, and the data packaging mode and the service logic realization under the user network environment can be decoupled, so that the method can be adapted to various network environments only by one set of service realization and can be flexibly selected among various data packaging modes, thereby enhancing the adaptability of software to the user network, and only iteration is needed without reconstructing the software when new changes generated by the future user network are dealt with.
Fig. 8 is a schematic diagram of a fourth implementation flow of the data processing method according to the embodiment of the present invention, as shown in fig. 8, the method includes:
step 601: generating communication data, wherein the communication data are service data interacted with a user by a first terminal through an application program;
here, the first terminal may be a terminal device or a server device. When the first terminal is a terminal device, the first terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the first terminal is the server equipment, the first terminal is an application server which runs the application program on the server side.
Here, the communication data is related to application interaction logic, such as chatting data, transfer data, online and offline data, and the like. It should be noted that, in different application scenarios, the manner of obtaining the service data generated by the user in the process of interacting with the application program of the first terminal is different, and as a possible implementation manner, the service data generated by the user in the process of interacting with the application program of the first terminal may be obtained by reading the file storing the service data corresponding to the application program.
Step 602: selecting network data information corresponding to the communication data;
here, the network data information includes network environment information.
Step 603-604: analyzing the pre-stored data transmission protocol information to obtain information at least comprising network environment information, a communication protocol and a corresponding relation between the network environment information and the communication protocol; when the network data information is the network environment information, inquiring to obtain a communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol;
here, the communication protocols include a public protocol and a private protocol, wherein the public protocol mainly includes TCP, UDP, FTP, HTTP and the like.
It should be emphasized that, in different application scenarios, the content in the pre-stored communication protocol information is different, and the following is exemplified:
in a first example, the pre-stored communication protocol information may include a correspondence list between the network environment information and the communication protocol, so that after the network environment information corresponding to the communication data, that is, the network environment information where the first terminal is located, is obtained, the correspondence list is queried to obtain one or more communication protocols corresponding to the network environment information.
For example, in this example, if the correspondence list stored in the pre-stored communication protocol information is as shown in fig. 7, if it is known that the network environment information corresponding to the communication data is a local area network with only 80 open ports, the correspondence list as shown in fig. 7 is queried, and it is determined that the communication protocol corresponding to the network environment information is the HTTP protocol.
Step 605: packaging the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol;
in an embodiment, the encapsulating the communication data into corresponding communication data packets by using a data packet manner matching with the communication protocol includes: routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set; and encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
It should be understood that, in one embodiment of the present invention, a set of protocol stacks may be preset, and the set of protocol stacks includes at least one of a public protocol stack and a private protocol stack.
The protocol stack set refers to the sum of protocols of each layer in a network, and includes header information of a communication protocol, the number of bits of data transmission bytes, and the like, and as shown in fig. 3, a TCP/IP protocol stack includes an application layer, a transport layer, a network layer, and a network interface layer, where the network interface layer is a base layer of a TCP/IP protocol model and is responsible for sending and receiving data frames. And the network layer encapsulates the data packet into an internet data packet through an interconnection protocol and runs a necessary routing algorithm. This includes four interconnection protocols, IP, ARP, ICMP, and IGMP.
The transport layer provides communication sessions between devices through a transport protocol. The choice of transport protocol depends on the data transport mode and typically includes both TCP and UDP protocols. The application layer is used for accessing the network and mainly comprises common FTP, HTTP, DNS protocol and TELNET protocol.
In the four-layer protocol of the TCP/IP protocol stack, the encapsulation condition of each layer of data packet comprises the following steps: when the service data is sent, the service data is packed once from the uppermost layer to the lowermost layer (a header and part of tail information are added); when receiving the service data, the service data is unpacked from the lowest layer to the uppermost layer in sequence (the header and part of the tail information are removed). These packing and unpacking operations are implemented by the TCP/IP protocol stack.
Further, in another embodiment of the present invention, the method may further include: and if the protocol stack corresponding to one or more communication protocols used for transmitting the communication data does not exist in the protocol stack set, adding the missing protocol stack in the protocol stack set.
It is understood that the communication protocol is continuously updated to meet the technological progress, and thus, a part of the communication protocol in the protocol stack set may be updated at a certain time, and at this time, the part of the communication protocol needs to be changed.
Further, in another embodiment of the present invention, the method further comprises: receiving data transmission protocol updating information; and updating the original communication protocol in the data transmission information based on the data transmission protocol updating information.
Step 606: sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol;
here, the second terminal may be a terminal device or a server device. When the second terminal is a terminal device, the second terminal is a device for running an application program at a user side, and can be a fixed terminal device such as a desktop computer, a television set-top box, an Xbox/PS3 game console, an outdoor advertisement display screen and the like; the mobile terminal device can also be a smart phone, a notebook computer, a tablet computer, a vehicle-mounted advertisement display screen and the like; and when the second terminal is the server equipment, the second terminal is an application server which runs the application program on the server side.
It should be emphasized that, in the embodiments of the present invention, the communication protocol is independent of a network environment or service logic processing, so that the communication protocol may be flexibly selected according to specific service needs, and if the current application scenario is to send the same communication data to a plurality of second terminals in different protocol stacks, the communication protocol may also be implemented simultaneously, that is, one or more second terminals may be used.
Step 801: when the network data information corresponding to the communication data is switched from the first network data information to the second network data information, traversing the pre-stored data transmission protocol information according to the second network data information;
step 802: inquiring the new communication protocol for transmitting the communication data from the data transmission protocol information;
step 803: and packaging the communication data into a corresponding communication data packet by using a data packet mode matched with the new communication protocol, and then sending the communication data packet.
In an example, if it is detected whether network data information corresponding to the communication data changes, the mobile network that the first terminal is in the network boundary and is continuously switched is known. If the first terminal is switched to a wireless fidelity (WiFi) network from a 4G network, traversing pre-stored data transmission protocol information according to the WiFi network; inquiring a new communication protocol for transmitting the communication data from the data transmission protocol information, such as a private protocol 1; further, the communication data is packaged into a corresponding communication data packet by using a data packet mode matched with the private protocol 1, and then the communication data packet is sent.
The data processing method of the embodiment of the invention processes the communication protocol independent of the network environment, so the communication protocol can be flexibly selected according to the specific service requirement, and the data packaging mode and the service logic realization under the user network environment can be decoupled, so that the method can be adapted to various network environments only by one set of service realization and can be flexibly selected among various data packaging modes, thereby enhancing the adaptability of software to the user network, and only iteration is needed without reconstructing the software when new changes generated by the future user network are dealt with.
The specific application scenario is as follows:
fig. 9 is a schematic flowchart of a specific implementation of a conventional data processing method, and as shown in fig. 9, the method includes:
step 901: starting an application program by a user;
step 902: generating interactive logic by the interaction of a user and an application program;
step 903: the communication data generated by interaction needs to be sent to a server or an opposite-end user;
here, the communication data includes chatting data, real-time audio data, real-time video data, and the like.
Step 904: before data transmission, detecting a network environment of a user;
step 905: binding a transmission protocol aiming at a user network environment;
step 906: binding a data packet mode according to a transmission protocol;
Step 907: and transmitting data on the network based on the selected protocol and the selected packet mode to complete network communication.
In the data processing method, step 905 and step 906 directly couple the service logic and the data packet mode in the user network environment, which results in difficult adaptation to different data packet modes in various network environments, is not beneficial to flexible switching in various network environments, and is also not beneficial to simple expansion of new network environments appearing in the future.
Fig. 10 is a schematic diagram of a specific implementation flow of a data processing method according to an embodiment of the present invention, and as shown in fig. 10, the method includes:
step 1001: starting an application program by a user;
step 1002: generating interactive logic by the interaction of a user and an application program;
step 1003: some communication data generated by interaction needs to be sent to a server or an opposite-end user, such as chat data, real-time audio data, real-time video data and the like;
step 1004: selecting a transmission protocol according to the current network environment of a user, such as only supporting TCP or only opening 80 ports, or according to the specific service condition, such as the condition that a network can be directly connected with a service server, but a mobile network involves network boundary switching and the like, and needs to be indirectly connected to the service server through a proxy server;
Step 1005: according to the selected transmission protocol, the communication data is subjected to specific packaging, such as packaging in an environment only supporting TCP transmission, packaging in an environment only opening 80 ports is in an HTTP mode, and packaging in a private proxy protocol mode in a mobile network;
step 1006: and transmitting data on the network based on the selected protocol and the selected packet mode to complete network communication.
In the data processing method according to the embodiment of the present invention, coupling between the user network environment, the specific service implementation and the interactive logic is decoupled through step 1004 and step 1005, and in the software implementation process, the interactive logic does not need to correspond to a specific implementation one by one according to the network environment and the service condition, but only needs to pay attention to the self logic, generate communication data by a set of implementation, route the communication data to different transmission protocols according to the specific condition, and package and transmit the communication data in a specific manner, so that the software has good flexibility, adaptability and expansibility.
Fig. 11 is a schematic diagram of a composition structure of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 11, the apparatus includes: a generating module 1101, a matching module 1102, a processing module 1103, a packaging module 1104 and a sending module 1105;
The generating module 1101 is configured to generate communication data, where the communication data is service data of a first terminal interacting with a user through an application program;
the matching module 1102 is configured to select network data information corresponding to the communication data;
the processing module 1103 is configured to perform traversal processing on pre-stored data transmission protocol information based on the network data information, so as to obtain a communication protocol for transmitting the communication data;
the encapsulating module 1104 is configured to encapsulate the communication data into corresponding communication data packets by using a data packet manner matched with the communication protocol;
the sending module 1105 is configured to send the communication data packet, so as to transmit the communication data packet to a second terminal supporting the communication protocol.
In an embodiment of the present invention, the processing module 1103 includes: the device comprises an analysis unit and a query unit;
the analysis unit is used for analyzing the pre-stored data transmission protocol information to obtain information at least comprising network environment information, a communication protocol and a corresponding relation between the network environment information and the communication protocol;
and the query unit is used for querying to obtain the communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol when the network data information is the network environment information.
In an embodiment of the present invention, the processing module 1103 includes: the device comprises an analysis unit and a query unit;
the analysis unit is used for analyzing the pre-stored data transmission protocol information to obtain information at least comprising a service type, a communication protocol and a corresponding relation between the service type and the communication protocol;
and the query unit is used for querying and obtaining a communication protocol corresponding to the service type according to the corresponding relation between the service type and the communication protocol when the network data information is the service type to which the communication data belongs.
In an embodiment of the present invention, the processing module 1103 is further configured to perform traversal processing on pre-stored data transmission protocol information according to second network data information when the network data information corresponding to the communication data is switched from the first network data information to the second network data information; inquiring the new communication protocol for transmitting the communication data from the data transmission protocol information; and packaging the communication data into a corresponding communication data packet by using a data packet mode matched with the new communication protocol, and then sending the communication data packet.
In an embodiment of the present invention, the encapsulation module 1104 includes a routing unit and an encapsulation unit;
The routing unit is used for routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set;
and the encapsulating unit is used for encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
In an embodiment of the present invention, the apparatus further comprises a setup module 1106;
the setting module 1106 is configured to set a protocol stack set, where the protocol stack set includes at least one of a public protocol stack and a private protocol stack.
In an embodiment of the present invention, the processing module 1103 is further configured to add a missing protocol stack in the protocol stack set if there is no protocol stack corresponding to one or more communication protocols used for transmitting the communication data in the protocol stack set.
In an embodiment of the present invention, the apparatus further includes a receiving module 1107;
the receiving module 1107 is configured to receive data transmission protocol update information;
the processing module 1103 is further configured to update, based on the data transmission protocol update information, an original communication protocol in the data transmission information.
Those skilled in the art will understand that the functions of the modules in the information processing apparatus of the present embodiment can be understood by referring to the related description of the aforementioned information processing method.
In practical applications, each constituent module of the data processing apparatus and each unit corresponding to each module thereof may correspond to a processor. The specific structure of the processor may be a Central Processing Unit (CPU), a Micro Controller Unit (MCU), a Digital Signal Processor (DSP), a Programmable Logic Controller (PLC), or other electronic components or a collection of electronic components having a Processing function. The processor includes executable codes, the executable codes are stored in a storage medium, the processor can be connected with the storage medium through a communication interface such as a bus, and when the corresponding functions of specific units are executed, the executable codes are read from the storage medium and executed. The storage medium is preferably a non-transitory storage medium for storing the portion of the executable code.
Fig. 12 shows an alternative hardware configuration for implementing the data processing apparatus, which includes a processor 121, an input/output interface 122 (e.g. a display screen, a touch screen, a speaker), a storage medium 123 and a network interface 124, and the components may be connected for communication via a system bus 125. Accordingly, the storage medium 123 of the data processing apparatus stores therein executable instructions for executing the data processing method according to the embodiment of the present invention.
The storage medium 123 may be various media capable of storing program codes, such as a removable storage device, a Random Access Memory (RAM), a Read-Only Memory (ROM), a magnetic disk, or an optical disk. Preferably, the storage medium 123 may be a nonvolatile storage medium.
The processor 121 may be a CPU, an MCU, a DSP, a PLC, or a processing circuit, such as an Application Specific Integrated Circuit (ASIC).
Specifically, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and may execute the following steps:
generating communication data, wherein the communication data are service data interacted with a user by a first terminal through an application program;
selecting network data information corresponding to the communication data;
traversing prestored data transmission protocol information based on the network data information to obtain a communication protocol for transmitting the communication data;
packaging the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol;
And sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further performs the following steps:
analyzing the pre-stored data transmission protocol information to obtain information at least comprising network environment information, a communication protocol and a corresponding relation between the network environment information and the communication protocol;
and when the network data information is the network environment information, inquiring to obtain a communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further performs the following steps:
analyzing the pre-stored data transmission protocol information to obtain information at least comprising a service type, a communication protocol and a corresponding relation between the service type and the communication protocol;
and when the network data information is the service type of the communication data, inquiring to obtain the communication protocol corresponding to the service type according to the corresponding relation between the service type and the communication protocol.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further performs the following steps:
when the network data information corresponding to the communication data is switched from the first network data information to the second network data information, traversing the pre-stored data transmission protocol information according to the second network data information;
and inquiring the communication protocol for transmitting the communication data from the data transmission protocol information.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further executes the following steps:
routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set;
and encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further performs the following steps:
And setting a protocol stack set, wherein the protocol stack set comprises at least one protocol stack in a public protocol stack and a private protocol stack.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further performs the following steps:
and if the protocol stack corresponding to one or more communication protocols used for transmitting the communication data does not exist in the protocol stack set, adding the missing protocol stack in the protocol stack set.
In an embodiment of the present invention, the processor 121 reads and executes executable instructions of the data processing method from the storage medium 123 through the system bus 125, and further performs the following steps:
receiving data transmission protocol updating information;
and updating the original communication protocol in the data transmission information based on the data transmission protocol updating information.
The data processing device of the embodiment of the invention processes the communication protocol independently of the network environment and/or the service logic, so the communication protocol can be flexibly selected according to the specific service requirement, the data packaging mode and the service logic realization in the user network environment can be decoupled, and the data processing device can be adapted to various network environments only by one set of service realization and flexibly selects among various data packaging modes, thereby enhancing the adaptability of software to the user network, and only needing iteration without reconstructing the software when dealing with new changes generated by the user network in the future.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described device embodiments are merely illustrative, for example, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present invention, and shall cover 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 (14)

1. A method of data processing, the method comprising:
generating communication data, wherein the communication data is service data for interaction between a first terminal and a user through an application program;
selecting network data information corresponding to the communication data;
when the network data information comprises network environment information, analyzing prestored data transmission protocol information to obtain information at least comprising the network environment information, a communication protocol and a corresponding relation between the network environment information and the communication protocol, and inquiring to obtain the communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol;
when the network data information comprises the service type of the communication data, analyzing the prestored data transmission protocol information to obtain information at least comprising the service type, the communication protocol and the corresponding relation between the service type and the communication protocol, and inquiring to obtain the communication protocol corresponding to the service type according to the corresponding relation between the service type and the communication protocol;
The communication data are packaged into corresponding communication data packets by using a data packet mode matched with the communication protocol;
and sending the communication data packet to transmit the communication data packet to a second terminal supporting the communication protocol.
2. The method of claim 1, further comprising:
when the network data information corresponding to the communication data is switched from the first network data information to the second network data information, traversing the pre-stored data transmission protocol information according to the second network data information;
inquiring the new communication protocol for transmitting the communication data from the data transmission protocol information;
and packaging the communication data into a corresponding communication data packet by using a data packet mode matched with the new communication protocol, and then sending the communication data packet.
3. The method of claim 1, wherein encapsulating the communication data into corresponding communication data packets using data packets matching the communication protocol comprises:
routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set;
And encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
4. The method of claim 3, further comprising, prior to generating communication data:
and setting a protocol stack set, wherein the protocol stack set comprises at least one protocol stack in a public protocol stack and a private protocol stack.
5. The method of claim 3, further comprising:
and if the protocol stack corresponding to one or more communication protocols used for transmitting the communication data does not exist in the protocol stack set, adding the missing protocol stack in the protocol stack set.
6. The method according to any one of claims 1 to 5, further comprising:
receiving data transmission protocol updating information;
and updating the original communication protocol in the data transmission information based on the data transmission protocol updating information.
7. A data processing apparatus, characterized in that the apparatus comprises: the device comprises a generating module, a matching module, a processing module, a packaging module and a sending module;
the generating module is used for generating communication data, wherein the communication data is service data interacted with a user by a first terminal through an application program;
The matching module is used for selecting network data information corresponding to the communication data;
the processing module is used for analyzing prestored data transmission protocol information when the network data information comprises network environment information to obtain information at least comprising the network environment information, a communication protocol and the corresponding relation between the network environment information and the communication protocol, and inquiring to obtain the communication protocol corresponding to the network environment information according to the corresponding relation between the network environment information and the communication protocol;
the processing module is further configured to, when the network data information includes a service type to which communication data belongs, parse the pre-stored data transmission protocol information to obtain information at least including the service type, a communication protocol, and a correspondence between the service type and the communication protocol, and query the information according to the correspondence between the service type and the communication protocol to obtain a communication protocol corresponding to the service type;
the encapsulation module is used for encapsulating the communication data into corresponding communication data packets by using a data packet mode matched with the communication protocol;
The sending module is configured to send the communication data packet, so as to transmit the communication data packet to a second terminal that supports the communication protocol.
8. The apparatus of claim 7,
the processing module is further configured to perform traversal processing on pre-stored data transmission protocol information according to second network data information when the network data information corresponding to the communication data is switched from the first network data information to the second network data information; inquiring the new communication protocol for transmitting the communication data from the data transmission protocol information; and packaging the communication data into a corresponding communication data packet by using a data packet mode matched with the new communication protocol, and then sending the communication data packet.
9. The apparatus of claim 7, wherein the encapsulation module comprises a routing unit and an encapsulation unit;
the routing unit is used for routing the communication data to a protocol stack corresponding to the communication protocol in a protocol stack set;
and the encapsulating unit is used for encapsulating the communication data into corresponding communication data packets according to the protocol stack format of the protocol stack.
10. The apparatus of claim 9, further comprising a setup module;
the setting module is used for setting a protocol stack set, and the protocol stack set comprises at least one protocol stack of a public protocol stack and a private protocol stack.
11. The apparatus of claim 9,
the processing module is further configured to add a missing protocol stack in the protocol stack set if a protocol stack corresponding to one or more communication protocols used for transmitting the communication data does not exist in the protocol stack set.
12. The apparatus according to any one of claims 7 to 11, wherein the apparatus further comprises a receiving module;
the receiving module is used for receiving the update information of the data transmission protocol;
the processing module is further configured to update an original communication protocol in the data transmission information based on the data transmission protocol update information.
13. A data processing apparatus, characterized in that the data processing apparatus comprises:
a memory for storing a computer program capable of running on the processor;
a processor for performing the data processing method of any one of claims 1 to 6 when running the computer program.
14. A computer-readable storage medium having stored thereon executable instructions for implementing the data processing method of any one of claims 1 to 6 when executed by a processor.
CN201710532715.5A 2017-07-03 2017-07-03 Data processing method and data processing device Active CN109218261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710532715.5A CN109218261B (en) 2017-07-03 2017-07-03 Data processing method and data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710532715.5A CN109218261B (en) 2017-07-03 2017-07-03 Data processing method and data processing device

Publications (2)

Publication Number Publication Date
CN109218261A CN109218261A (en) 2019-01-15
CN109218261B true CN109218261B (en) 2022-06-28

Family

ID=64993355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710532715.5A Active CN109218261B (en) 2017-07-03 2017-07-03 Data processing method and data processing device

Country Status (1)

Country Link
CN (1) CN109218261B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111416845B (en) * 2020-03-12 2023-09-26 腾讯云计算(北京)有限责任公司 Method, device and storage medium for configuring edge equipment
CN111601285B (en) * 2020-05-19 2023-02-10 江苏徐工工程机械研究院有限公司 Communication method, apparatus, system, and computer-readable storage medium
CN111654545B (en) * 2020-06-03 2023-02-07 湖南工业大学 General analysis method and system for sensor data
CN112583818B (en) * 2020-12-08 2021-12-24 清华大学 Adaptive transport protocol selection method and device for mobile Web service
CN112509172A (en) * 2020-12-08 2021-03-16 广州优胜汽车科技有限公司 Data transmission method, automobile communication terminal, mobile terminal and readable storage medium
CN112784300A (en) * 2021-01-22 2021-05-11 重庆秦嵩科技有限公司 Multi-stage log encryption processing system and method
CN113381999B (en) * 2021-06-08 2023-04-28 杭州昊美科技有限公司 Communication method and device and electronic equipment
CN114024990A (en) * 2021-11-19 2022-02-08 深圳创维智慧科技有限公司 General access method for Internet of things platform, network equipment and readable storage medium
CN114172734B (en) * 2021-12-10 2023-01-20 中国电子科技集团公司第十五研究所 Data processing method and device for complex network communication and computer storage medium
CN114785874B (en) * 2022-06-16 2022-09-06 成都中科合迅科技有限公司 Method for providing high-availability transmission channel based on multi-network protocol
CN116437159A (en) * 2023-03-14 2023-07-14 深圳感臻智能股份有限公司 Data processing method, system and medium based on digital television protocol

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102958105A (en) * 2012-10-23 2013-03-06 大唐软件技术股份有限公司 Internet of things terminal access method and device
CN104125208A (en) * 2013-10-15 2014-10-29 腾讯科技(深圳)有限公司 Data transmission method and data transmission device
CN104902464A (en) * 2014-03-05 2015-09-09 中国移动通信集团江西有限公司 Method and device for recognizing user behavior
CN106454814A (en) * 2016-11-10 2017-02-22 中国科学院计算技术研究所 GTP tunnel communication system and method
CN106844251A (en) * 2015-12-03 2017-06-13 中兴通讯股份有限公司 Data transmission method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8214875B2 (en) * 2004-02-26 2012-07-03 Vmware, Inc. Network security policy enforcement using application session information and object attributes
CN103970614B (en) * 2013-01-24 2018-07-06 腾讯科技(深圳)有限公司 A kind of service test method and device
CN104144156B (en) * 2013-05-10 2018-09-21 华为技术有限公司 Message processing method and device
CN104144149A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Transmission processing method and system for data of sensing Internet of Things and gateway
US10944590B2 (en) * 2015-12-10 2021-03-09 Nicira, Inc. Transport protocol task offload emulation to detect chunks of data for communication with a private network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102958105A (en) * 2012-10-23 2013-03-06 大唐软件技术股份有限公司 Internet of things terminal access method and device
CN104125208A (en) * 2013-10-15 2014-10-29 腾讯科技(深圳)有限公司 Data transmission method and data transmission device
CN104902464A (en) * 2014-03-05 2015-09-09 中国移动通信集团江西有限公司 Method and device for recognizing user behavior
CN106844251A (en) * 2015-12-03 2017-06-13 中兴通讯股份有限公司 Data transmission method and device
CN106454814A (en) * 2016-11-10 2017-02-22 中国科学院计算技术研究所 GTP tunnel communication system and method

Also Published As

Publication number Publication date
CN109218261A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN109218261B (en) Data processing method and data processing device
US11128493B2 (en) Method for implementing residential gateway service function, and server
EP2448183A1 (en) Relay device and method thereof
CN103166874A (en) Message forwarding method and device
CN112333019B (en) Router configuration and test method and system and readable storage medium
CN109151084A (en) File transmitting method and device, system, CGN equipment
JPWO2013172391A1 (en) Multi-tenant system, switch, controller, and packet transfer method
EP4057576A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
WO2024012001A1 (en) Method and system for implementing access to open source community in multi-modal network
CN110545230B (en) Method and device for forwarding VXLAN message
CN103095608A (en) Delegation forwarding method for domain name system (DNS) data package
CN107483369B (en) Message processing method and virtual switch
CN111464879B (en) Data communication method and device
CN106130863B (en) Transfer approach, device and the system of LAN protocol message
CN108737347B (en) Data communication method, device and equipment
CN106063169A (en) Data processing method and device
CN110351394B (en) Network data processing method and device, computer device and readable storage medium
CN108259350B (en) Message transmission method and device and machine-readable storage medium
CN106973014B (en) Anycast route publishing system and method and electronic equipment
US20170149669A1 (en) Method, apparatus and system for configuring quality of service (qos) parameters
CN111447131B (en) Message de-encapsulation method and device and message encapsulation method and device
JP5213070B2 (en) Wireless communication network connection system and wireless communication network connection method
CN113365296B (en) Network configuration method and equipment of communication central station
CN113114565B (en) Data message forwarding method and device, storage medium and electronic equipment
CN109756454A (en) The methods, devices and systems of data interaction

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