CN107332857B - Network data transmission method, device, system and storage medium - Google Patents
Network data transmission method, device, system and storage medium Download PDFInfo
- Publication number
- CN107332857B CN107332857B CN201710638670.XA CN201710638670A CN107332857B CN 107332857 B CN107332857 B CN 107332857B CN 201710638670 A CN201710638670 A CN 201710638670A CN 107332857 B CN107332857 B CN 107332857B
- Authority
- CN
- China
- Prior art keywords
- protocol
- transmission
- transmission protocol
- service server
- uplink data
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/326—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the transport layer [OSI layer 4]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention discloses a network data transmission method, a device, a system and a storage medium; the embodiment may obtain a first transmission protocol, call a corresponding first transmission protocol interface, receive uplink data sent by a terminal through the first transmission protocol interface, determine a corresponding service server and a second transmission protocol according to transmission parameters carried by the uplink data, analyze the uplink data by using the first transmission protocol, and encapsulate the analyzed uplink data by using the second transmission protocol to transmit the uplink data to the service server; the scheme can flexibly call the required protocol interface according to the actual requirement, flexibly convert different protocols and greatly improve the development efficiency and the maintainability of products.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, and a storage medium for network data transmission.
Background
The existing network data transmission modes mainly include two modes, namely transmission between a client and a back-end service and transmission between a webpage and the back-end service. The client may send a request to the backend service by establishing a private channel with the backend service, and the web page generally achieves the purpose of data transmission by calling a hypertext Transfer Protocol (HTTP) interface provided by the backend service, which leads to a situation that the same backend service cannot simultaneously meet the calling requirements of the client and the web page, and often requires to encapsulate the backend service into two sets of interfaces of a client Protocol and an HTTP Protocol.
In view of the above problems, the prior art also provides a technology for providing an interface for a web page by a client, that is, when a web page, such as a hypertext Markup Language 5 (H5) page, needs to perform data transmission with a backend service, an H5 page may transmit a backend service interface and data to be called to the client, the client calls the backend service through a private link channel, and then returns data returned by the backend service to the H5 page, so that the backend service may not need to provide two sets of protocol interfaces, but only needs to provide one set of protocol interface between the client and the backend service.
In the research and practice process of the prior art, it is found that the prior art needs to ensure that an H5 page runs under a client environment, but due to the requirements of products, operation and the like, in many scenarios, an H5 page does not run under a client, so that no client interface can be called, and therefore, a back-end service still needs to provide a separate HTTP interface for calling an H5 page, and the H5 page also needs to maintain interface calling modes under two environments, so that the implementation is complex, and the development efficiency and the maintainability of the products are greatly affected.
Disclosure of Invention
The embodiment of the invention provides a network data transmission method, a device, a system and a storage medium, which are simple to realize and can greatly improve the development efficiency and the maintainability of products.
The embodiment of the invention provides a network data transmission method, which comprises the following steps:
acquiring a first transmission protocol and calling a first transmission protocol interface;
receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, wherein the uplink data carries transmission parameters;
determining a service server and a second transmission protocol corresponding to the transmission parameters according to the transmission parameters;
analyzing the uplink data by adopting the first transmission protocol, and encapsulating the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet;
and sending the uplink data packet to the service server according to the second transmission protocol.
Correspondingly, an embodiment of the present invention further provides a network data transmission apparatus, including:
the calling unit is used for acquiring a first transmission protocol and calling a first transmission protocol interface;
the device comprises an uplink receiving unit, a first transmission protocol interface and a second transmission protocol interface, wherein the uplink receiving unit is used for receiving uplink data triggered by a terminal through a webpage through a first transmission protocol interface, and the uplink data carries transmission parameters;
a determining unit, configured to determine, according to the transmission parameter, a service server and a second transmission protocol corresponding to the transmission parameter;
the processing unit is used for analyzing the uplink data by adopting the first transmission protocol and packaging the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet;
and the uplink sending unit is used for sending the uplink data packet to the service server according to the second transmission protocol.
In addition, the embodiment of the invention also provides a network data transmission system, which comprises a terminal, a service server and a network data transmission device;
the terminal is used for sending uplink data to the network data transmission device through the webpage, and the uplink data carry transmission parameters;
the network data transmission device is used for acquiring a first transmission protocol, calling a first transmission protocol interface, receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, determining a service server and a second transmission protocol corresponding to the transmission parameters according to the transmission parameters carried by the uplink data, analyzing the uplink data by adopting the first transmission protocol, packaging the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet, and sending the uplink data packet to the service server according to the second transmission protocol;
and the service server is used for receiving the uplink data packet sent by the network data transmission device.
The embodiment of the present invention further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in any network data transmission method provided in the embodiment of the present invention.
The embodiment of the invention can obtain a first transmission protocol, call a corresponding first transmission protocol interface, then receive uplink data sent by a terminal through the first transmission protocol interface, determine a corresponding service server and a second transmission protocol according to transmission parameters carried by the uplink data, then analyze the uplink data by adopting the first transmission protocol, and package the analyzed uplink data by adopting the second transmission protocol so as to transmit the uplink data to the service server; according to the scheme, the uplink data triggered by the webpage through the terminal can be received by calling the first transmission protocol interface, then the uplink data is encapsulated again and is sent to the service server through another transmission protocol, namely, through the scheme, the required protocol interface can be flexibly called according to actual requirements, and different protocols are flexibly converted, so that only one interface calling mode needs to be maintained for both the terminal and the service server, and compared with the existing scheme of maintaining multiple interface calling modes, the scheme is simpler to implement, and the development efficiency and the maintainability of products can be greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic view of a network data transmission system provided in an embodiment of the present invention;
fig. 1b is a flowchart of a network data transmission method according to an embodiment of the present invention;
fig. 2a is a schematic structural diagram of a proxy server according to an embodiment of the present invention;
fig. 2b is another flowchart of a network data transmission method according to an embodiment of the present invention;
fig. 2c is a schematic view of a scenario of a network data transmission method according to an embodiment of the present invention;
fig. 2d is a schematic diagram of a framework of a network data transmission method according to an embodiment of the present invention;
fig. 3 is another schematic diagram of a network data transmission method according to an embodiment of the present invention;
fig. 4a is a schematic structural diagram of a network data transmission apparatus according to an embodiment of the present invention;
fig. 4b is another schematic structural diagram of a network data transmission apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a network data transmission system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a proxy server according to an embodiment of 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 embodiment of the invention provides a network data transmission method, a device, a system and a storage medium.
The network data transmission system may include any network data transmission apparatus provided in the embodiments of the present invention, and the network data transmission apparatus may be specifically integrated in a device such as a proxy server or a gateway. In addition, the network data transmission system may also include other devices, such as terminals and service servers.
For example, taking the example that the network data transmission apparatus is integrated in a proxy server, referring to fig. 1a, the proxy server may obtain a first transmission protocol, and call a corresponding first transmission protocol interface, such as an HTTP protocol, and call an HTTP interface, then receive uplink data triggered by a terminal through a web page through the first transmission protocol interface, such as the HTTP interface, and determine a corresponding service server and a second transmission protocol, such as a socket protocol, according to transmission parameters carried in the uplink data, so as to analyze the uplink data using the first transmission protocol, and encapsulate the analyzed uplink data using the second transmission protocol, and then send an uplink data packet obtained by encapsulating to the service server according to the second transmission protocol.
And then, the service server can also send the downlink data returned by the uplink data packet to the proxy server, the proxy server analyzes the downlink data by adopting a second transmission protocol, encapsulates the analyzed downlink data by adopting a first transmission protocol, and sends the encapsulated downlink data packet to the terminal through a first transmission protocol interface, so that the purpose of protocol forwarding is realized on the premise of not changing the protocol interfaces of the terminal and the service server.
The following are detailed below. It should be noted that the numbers of the following examples are not intended to limit the order of preference of the examples.
The first embodiment,
In this embodiment, the description will be made from the perspective of a network data transmission device, and the network data transmission device may be specifically integrated in a proxy device, such as a proxy service server or a proxy gateway, or may be integrated in a proxy layer of a service server, which is not described herein again.
A network data transmission method, comprising: the method comprises the steps of obtaining a first transmission protocol, calling a first transmission protocol interface, receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, carrying transmission parameters on the uplink data, determining a service server and a second transmission protocol according to the transmission parameters, analyzing the uplink data by adopting the first transmission protocol, packaging the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet, and sending the uplink data packet to the service server according to the second transmission protocol.
As shown in fig. 1b, the specific process of the network data transmission method may be as follows:
101. and acquiring a first transmission protocol and calling a corresponding first transmission protocol interface.
For example, the first transmission protocol may be obtained according to a preset configuration, and the first transmission protocol interface corresponding to the first transmission protocol is called.
The first transmission Protocol and the first transmission Protocol interface may be determined according to the requirements of the actual application, for example, the first transmission Protocol and the first transmission Protocol interface may be an HTTP Protocol or a File Transfer Protocol (FTP), and the like. For convenience of description, the embodiments of the present invention will be described by taking the first transmission protocol, specifically, the HTTP protocol, as an example.
Optionally, in order to improve flexibility, in addition to acquiring the first transmission protocol and invoking the first transmission protocol interface according to a preset configuration, the method may also be invoked according to actual requirements, that is, before the step "acquiring the first transmission protocol", the method for transmitting network data may further include:
and receiving an interface calling request, and analyzing the interface calling request according to a preset analysis algorithm to determine interface information needing to be called.
For example, an interface call request sent by a client or other applications may be received, and then the interface call request is analyzed according to a preset analysis algorithm to determine interface information to be called.
Then, the step of "acquiring the first transport protocol and invoking the corresponding first transport protocol interface" may include: and acquiring a corresponding acquired first transmission protocol according to the interface information, and calling a corresponding first transmission protocol interface according to the interface information.
102. And receiving uplink data triggered by the terminal through a webpage through a first transmission protocol interface, wherein the uplink data carries information such as transmission parameters.
For example, an HTTP request triggered by a terminal through a web page, such as an H5 page, may be specifically received through an HTTP interface, where the HTTP request may carry information such as transmission parameters.
The transmission parameter may include a terminal identifier, a network server identifier, and the like, where the terminal identifier may include a terminal name, a device number, a port, and/or an Internet Protocol (IP) Address, and the service server identifier may include information such as a name, a device number, a device model, a port, and/or an IP Address of the service server.
103. And determining a service server and a second transmission protocol corresponding to the transmission parameter according to the transmission parameter.
For example, the service configuration information may be specifically obtained according to the transmission parameter, and the service server and the second transmission protocol may be determined according to the obtained service configuration information.
The second transmission protocol may be determined according to the requirements of the actual application, and may be, for example, a socket protocol. Socket refers to the end of a two-way communication link between two programs on a network that exchanges data via the link. Through the socket protocol, a web page (e.g., H5 page) may establish a socket channel with a service server and transmit data according to an agreed-upon proprietary protocol through the socket channel.
104. And analyzing the uplink data by adopting a first transmission protocol, and encapsulating the analyzed uplink data by adopting a second transmission protocol to obtain an uplink data packet.
For example, a first protocol processing process corresponding to the first transmission protocol may be called, the uplink data is analyzed through the first protocol processing process, a second protocol processing process corresponding to the second transmission protocol is called, and the analyzed uplink data is encapsulated through the second protocol processing process to obtain an uplink data packet.
For example, taking the first transmission protocol as an HTTP protocol specifically, and the second transmission protocol as a socket protocol as an example, at this time, an HTTP protocol processing process corresponding to the HTTP protocol may be called, the uplink data may be analyzed through the HTTP protocol processing process, and a socket protocol processing process corresponding to the socket protocol may be called, and the analyzed uplink data may be encapsulated through the socket protocol processing process to obtain an uplink data packet.
105. And sending the uplink data packet to the service server according to a second transmission protocol.
For example, a corresponding second transmission protocol channel may be specifically established according to the second transmission protocol, and the uplink data packet is sent to the service server through the second transmission protocol channel.
For example, if the second transmission protocol is specifically a socket protocol, at this time, a corresponding socket channel may be established according to the socket protocol, and then the uplink data packet is sent to the service server through the socket channel.
Optionally, after sending the uplink data packet to the service server, the uplink data packet may also receive data returned by the service server, perform protocol conversion on the data, and send the data to the terminal. For convenience of description, in the embodiment of the present invention, data returned to the terminal by the service server is referred to as downlink data. That is, after the step "sending the uplink data packet to the service server", the network data transmission method may further include:
and the receiving service server analyzes the downlink data by adopting a second transmission protocol according to the downlink data returned by the uplink data packet, encapsulates the analyzed downlink data by adopting a first transmission protocol to obtain a downlink data packet, and sends the downlink data packet to the terminal through a first transmission protocol interface.
For example, if the first transmission protocol is specifically an HTTP protocol, and the second transmission protocol is a socket protocol, then, at this time, downlink data returned by the service server according to the uplink data packet may be received through a socket channel, then, the socket protocol is used to analyze the downlink data, and the HTTP protocol is used to encapsulate the analyzed downlink data, so as to obtain a downlink data packet, and then, the downlink data packet is sent to the terminal through the HTTP interface.
Optionally, if the network data transmission device transmits the uplink data packet to the service server, the corresponding relationship between the first transmission protocol and the second transmission protocol is not recorded, for example, which first transmission protocol is used to analyze the uplink data, and which second transmission protocol is used to encapsulate the analyzed uplink data, at this time, the transmission parameters may be carried in the downlink data, so that after the network data transmission device receives the downlink data, the network data transmission device may obtain corresponding terminal configuration information according to the carried transmission parameters, and further determine the corresponding terminal and the first transmission protocol according to the obtained terminal configuration information, so that the analyzed downlink data may be encapsulated by using the first transmission protocol subsequently, and the encapsulated downlink data packet is sent to the determined terminal.
As can be seen from the above, in this embodiment, a first transmission protocol may be obtained, a corresponding first transmission protocol interface is called, then, uplink data sent by a terminal is received through the first transmission protocol interface, and a corresponding service server and a second transmission protocol are determined according to transmission parameters carried by the uplink data, and then, the uplink data may be analyzed by using the first transmission protocol, and the analyzed uplink data is encapsulated by using the second transmission protocol to be transmitted to the service server; according to the scheme, the uplink data triggered by the webpage through the terminal can be received by calling the first transmission protocol interface, then the uplink data is encapsulated again and is sent to the service server through another transmission protocol, namely, through the scheme, the required protocol interface can be flexibly called according to actual requirements, and different protocols are flexibly converted, so that only one interface calling mode needs to be maintained for both the terminal and the service server, and compared with the existing scheme of maintaining multiple interface calling modes, the scheme is simpler to implement, and the development efficiency and the maintainability of products can be greatly improved.
Example II,
The method described in the first embodiment is further illustrated by way of example.
In this embodiment, the network data transmission device is specifically integrated in a proxy server as an example.
As shown in fig. 2a, the network data transmission device integrated in the proxy server may include a network module, a protocol plug-in module and a service configuration module (i.e. the proxy server may include the network module, the protocol plug-in module and the service configuration module), wherein the functions of the respective modules may be as follows:
(1) a network module;
the network module is used for receiving and transmitting data, such as uplink data, downlink data and the like.
For example, referring to fig. 2a, the network module may specifically include a first protocol processing sub-module and a second protocol processing sub-module, where:
the first protocol processing submodule is used for receiving and processing uplink data sent by a terminal, acquiring corresponding service configuration information from the service configuration module according to information such as transmission parameters and the like carried in the uplink data, determining a corresponding service server and a second transmission protocol according to the acquired service configuration information, determining a corresponding protocol plug-in and the sequence of the protocol plug-in, and transmitting the uplink data to the protocol plug-in module so that the plug-in module processes the uplink data according to the sequence of the protocol plug-in; in addition, the first protocol processing sub-module can also call other services related to the first transmission protocol through the first transmission protocol.
The second protocol processing submodule can send an uplink data packet to the service server through a second transmission protocol, receive downlink data returned by the service server, acquire corresponding terminal configuration information from the service configuration module according to the downlink data packet, determine a corresponding terminal and a first transmission protocol according to the acquired terminal configuration information, determine a corresponding protocol plug-in, the sequence of the protocol plug-in and the like, and transmit the downlink data to the protocol plug-in module so that the plug-in module processes the downlink data according to the sequence of the protocol plug-in; in addition, the second protocol processing sub-module may also receive an interface call request sent by a service server or other devices.
(2) A protocol plug-in module;
the protocol plug-in module may include a plurality of protocol plug-ins, such as, for example, protocol plug-in 1, protocol plug-in 2, … … protocol plug-in N, and so on, as seen in FIG. 2 a. Each protocol plug-in is independent, and the protocol plug-ins can be collocated for use to realize the analysis and encapsulation (i.e. unpacking and packing) of data.
For example, after the protocol plug-in corresponding to the first transmission protocol receives the uplink data transmitted by the first protocol processing sub-module, the uplink data may be analyzed by using the first transmission protocol, and then the analyzed uplink data is transmitted to the protocol plug-in corresponding to the second transmission protocol, and the protocol plug-in corresponding to the second transmission protocol encapsulates the analyzed uplink data by using the second transmission protocol to obtain an uplink data packet, and then transmits the uplink data packet to the second protocol processing sub-module.
For another example, after the protocol plug-in corresponding to the second transmission protocol receives the downlink data transmitted by the second protocol processing sub-module, the second transmission protocol may be used to analyze the downlink data, and then transmit the analyzed downlink data to the protocol plug-in corresponding to the first transmission protocol, and the protocol plug-in corresponding to the first transmission protocol uses the first transmission protocol to encapsulate the analyzed downlink data to obtain a downlink data packet, and then transmit the uplink data packet to the first protocol processing sub-module.
(3) A service configuration module;
the service configuration module may store a plurality of configuration information corresponding to the transmission parameters, where each configuration information is used to record terminal information or service server information, and for convenience of description, in an embodiment of the present invention, the configuration information in which the terminal information is recorded is referred to as terminal configuration information, and the configuration information in which the service server information is recorded is referred to as service configuration information.
The terminal configuration information may include information such as a terminal identifier, a call address of the terminal, a first transmission protocol used by the terminal, and a protocol plug-in corresponding to the terminal.
The service configuration information may include information such as an identifier of the service server, a calling address of the service server, a second transmission protocol used by the service server, a protocol plug-in corresponding to the service server, and an order of the protocol plug-ins.
Based on the structure of the network data transmission device, the following description will take a web page as H5 page, uplink data as HTTP request, a first transmission protocol as HTTP protocol, and a second transmission protocol as socket protocol as examples.
As shown in fig. 2b, a specific process of a network data transmission method may be as follows:
201. the terminal triggers an HTTP request through the H5 page.
The HTTP request carries information such as transmission parameters, where the transmission parameters may include a terminal identifier, a network server identifier, and the like, the terminal identifier may include a terminal name, a device number, a port, and/or an IP address, and the service server identifier may include information such as a name, a device number, a device model, a port, and/or an IP address of the service server.
202. And a first protocol processing sub-module in the proxy server acquires the HTTP protocol from the service configuration module according to preset configuration and calls a corresponding HTTP interface according to the HTTP protocol.
The preset configuration can be pre-agreed between the proxy server and the H5 page of the terminal according to the requirements of the actual application.
203. And the first protocol processing submodule receives an HTTP request sent by the terminal through the called HTTP interface.
204. The first protocol processing submodule extracts transmission parameters from the HTTP request and determines the corresponding service server, the socket protocol, the protocol plug-in and the sequence of the protocol plug-in according to the transmission parameters.
For example, referring to fig. 2c, the first protocol processing sub-module may specifically obtain corresponding service configuration information from the service configuration module according to the transmission parameter, then determine a corresponding backend service according to the obtained service configuration information, and further obtain information related to the backend service, such as a service server, a socket protocol, a protocol plug-in, and a sequence of the protocol plug-in, and the like.
205. The first protocol processing sub-module sends the HTTP request to a protocol plug-in module so that the protocol plug-in module can analyze and encapsulate the HTTP request according to the sequence of the protocol plug-in module to obtain an uplink data packet.
For example, referring to fig. 2d, the protocol plug-ins are protocol plug-in 1 and plug-in 2, and the sequence of the protocol plug-ins is: the protocol plug-in 1 — the protocol plug-in 2 is taken as an example, then at this time, the HTTP request may be transmitted to the protocol plug-in 1 in the protocol plug-in module, the protocol plug-in 1 analyzes the uplink data by using an HTTP protocol, after the analysis is completed, the protocol plug-in 1 transmits the analyzed HTTP request to the protocol plug-in 2, and the protocol plug-in 2 encapsulates the analyzed HTTP request by using a socket protocol to obtain an uplink data packet.
206. And the protocol plug-in module transmits the obtained uplink data packet to a second protocol processing submodule, and the second protocol processing submodule sends the uplink data packet to the service server according to a socket protocol.
For example, referring to fig. 2c and fig. 2d, the second protocol processing sub-module may specifically send the uplink data packet to the service server (i.e., backend service) through a socket channel.
It should be noted that, if there is no socket channel, the second protocol processing sub-module may establish a corresponding socket channel according to the socket protocol, and then send the uplink data packet to the service server through the established socket channel.
Optionally, after receiving the uplink data packet, the network server may further return corresponding data to the terminal, that is, the network data transmission method may further include steps 207 to 210, as follows:
207. and the service server acquires downlink data according to the uplink data packet and sends the downlink data to the proxy server.
For example, after receiving the uplink data packet, the service server may analyze the uplink data packet by using a socket protocol to obtain an HTTP request, then obtain corresponding webpage data according to the HTTP request, encapsulate the webpage data by using the socket protocol to obtain downlink data, and then return the downlink data to the second protocol processing sub-module of the proxy server through a socket channel, for example, see fig. 2 c.
208. And after receiving the downlink data, a second protocol processing submodule of the proxy server determines the corresponding terminal, the HTTP protocol, the protocol plug-in and the sequence of the protocol plug-in.
For example, the second protocol processing sub-module may specifically acquire corresponding terminal configuration information from the service configuration module, determine a corresponding terminal and an HTTP protocol according to the acquired terminal configuration information, and determine a corresponding protocol plug-in, a sequence of the protocol plug-in, and the like.
It should be noted that, the protocol plug-in used at this time is the same as the protocol plug-in used when the upstream data is analyzed and encapsulated, but the order of the protocol plug-ins is the reverse, for example, if the order of the protocol plug-ins used when the upstream data is analyzed and encapsulated is: protocol plug-in 1- > protocol plug-in 2, as shown in fig. 2d, the sequence of the protocol plug-ins used when parsing and encapsulating the downstream data may be: protocol plug-in 2- > protocol plug-in 1, which will not be described in detail herein.
209. The second protocol processing submodule sends the downlink data to a protocol plug-in module so that the protocol plug-in module can analyze and package the downlink data according to the sequence of the protocol plug-in module to obtain a downlink data packet.
For example, if the order of the protocol plug-ins is: the protocol plug-in 2 — > the protocol plug-in 1, then at this time, the second protocol processing sub-module may transmit the downlink data to the protocol plug-in 2 in the protocol plug-in module, the protocol plug-in 2 uses the socket protocol to receive information for the downlink data, after the analysis is completed, the protocol plug-in 1 transmits the analyzed downlink data to the protocol plug-in 1, and the protocol plug-in 1 uses the HTTP protocol to encapsulate the analyzed downlink data, so as to obtain a downlink data packet.
210. The protocol plug-in module transmits the obtained downlink data packet to the first protocol processing submodule, and the first protocol processing submodule transmits the downlink data packet to the terminal through an HTTP (hyper text transport protocol).
For example, the first protocol processing sub-module may call a corresponding HTTP interface according to the HTTP protocol, and send the downlink data packet to the terminal through the HTTP interface, for example, referring to fig. 2c, specifically send the downlink data packet to an H5 page in the terminal, and so on.
As can be seen from the above, the embodiment may obtain an HTTP protocol, call a corresponding HTTP interface, then receive an HTTP request sent by a terminal through the HTTP interface, determine a corresponding service server and a socket protocol according to transmission parameters carried in the HTTP request, then parse the HTTP request by using the HTTP protocol, and encapsulate the parsed HTTP request by using the socket protocol, so as to transmit the parsed HTTP request to the service server, and similarly, may also send data returned by the service server to an H5 page in a similar manner; because the scheme can flexibly call the required protocol interface according to the actual requirement and flexibly convert different protocols, only one interface calling mode is required to be maintained for both the terminal and the service server, the realization is simpler compared with the existing scheme which needs to maintain various interface calling modes, and the development efficiency and the maintainability of products can be greatly improved.
Example III,
On the basis of the second embodiment, optionally, in order to improve flexibility, in addition to acquiring the HTTP protocol from the service configuration module according to the preset configuration and calling the corresponding HTTP interface according to the HTTP protocol, the network data transmission method may also directly call the HTTP interface according to actual requirements, that is, before performing step 202 (that is, the first protocol processing sub-module in the proxy server acquires the HTTP protocol from the service configuration module according to the preset configuration and calls the corresponding HTTP interface according to the HTTP protocol), the network data transmission method may further include the following processing:
(1) and the calling party encapsulates the HTTP interface information to be called according to a specified protocol mode to obtain an interface calling request, and then sends the interface calling request to the proxy server.
For example, if the specified protocol mode is a socket protocol and the caller is a client, at this time, the client may encapsulate HTTP interface information to be called by using the socket protocol to obtain an interface call request, and then send the interface call request to the second protocol processing sub-module in the proxy server.
(2) And after receiving the interface calling request sent by the calling party, a second protocol processing submodule in the proxy server sends the interface calling request to a protocol plug-in module for analysis to obtain HTTP interface information.
For example, taking a protocol plug-in corresponding to the socket protocol as a protocol plug-in 2 and a protocol plug-in corresponding to the HTTP protocol as a protocol plug-in 1, as shown in fig. 3, after receiving an interface call request sent by a caller, the second protocol processing sub-module may obtain corresponding service configuration information from the service configuration module, determine a corresponding protocol plug-in such as "protocol plug-in 2 and protocol plug-in 1" according to the service configuration information, and the sequence of the protocol plug-ins is "protocol plug-in 2- > protocol plug-in 1", then send the interface call request to the protocol plug-in 2, analyze the interface call request by the protocol plug-in 2, and package the analyzed data by using the protocol plug-in 1 to obtain the HTTP interface information.
(3) And the protocol plug-in module sends the HTTP interface information to the first protocol processing module.
Therefore, after receiving the HTTP interface information, the first protocol processing module may obtain the corresponding acquisition HTTP protocol and the corresponding HTTP interface according to the HTTP interface information. That is, step 202 may specifically be:
and the first protocol processing sub-module acquires the corresponding acquired HTTP protocol according to the HTTP interface information and calls a corresponding HTTP interface according to the HTTP interface information.
Thereafter, steps 203 to 206 may be continuously performed, and optionally, steps 207 to 210 may also be performed, where the execution of steps 203 to 210 may specifically refer to embodiment two, and is not described herein again.
Because the embodiment can support the calling party to reversely call the HTTP interface, for the client, the calling can still be performed through the private link channel without affecting the use thereof, and meanwhile, the HTTP interface can not be exposed to the outside due to the calling, so that the security can be improved, that is, the embodiment can improve the flexibility and the security of the implementation thereof in addition to the beneficial effect of the second embodiment.
Example four,
In order to better implement the above method, an embodiment of the present invention further provides a network data transmission apparatus, where the network data transmission apparatus may be specifically integrated in a proxy device, such as a proxy service server or a proxy gateway, or may be integrated in a proxy layer of a service server, and details are not described herein again.
For example, as shown in fig. 4a, the network data transmission apparatus includes a calling unit 301, an uplink receiving unit 302, a determining unit 303, a processing unit 304, and an uplink sending unit 305, as follows:
(1) a calling unit 301;
the invoking unit 301 is configured to obtain the first transport protocol and invoke the first transport protocol interface.
For example, the invoking unit 301 may be specifically configured to obtain a first transmission protocol according to a preset configuration, and invoke a first transmission protocol interface corresponding to the first transmission protocol, and so on.
The first transmission protocol and the first transmission protocol interface may be determined according to the requirements of the actual application, for example, the first transmission protocol and the first transmission protocol interface may be an HTTP protocol or an FTP protocol.
(2) An uplink receiving unit 302;
an uplink receiving unit 302, configured to receive, through a first transmission protocol interface, uplink data triggered by a terminal through a web page, where the uplink data carries transmission parameters.
For example, the uplink receiving unit 302 may be specifically configured to receive, through an HTTP interface, an HTTP request triggered by a web page, for example, an H5 page, where the HTTP request may carry information such as a transmission parameter.
The transmission parameter may include a terminal identifier, a network server identifier, and the like, where the terminal identifier may include a terminal name, a device number, a port, and/or an IP address, and the service server identifier may include information such as a name, a device number, a device model, a port, and/or an IP address of the service server.
(3) A determination unit 303;
a determining unit 303, configured to determine, according to the transmission parameter, a service server and a second transmission protocol corresponding to the transmission parameter.
For example, the determining unit 303 may be specifically configured to obtain corresponding service configuration information according to the transmission parameter, and determine a corresponding service server and a second transmission protocol according to the obtained service configuration information.
The second transmission protocol may be determined according to the requirements of the actual application, and may be, for example, a socket protocol.
(4) A processing unit 304;
the processing unit 304 is configured to analyze the uplink data by using the first transmission protocol, and encapsulate the analyzed uplink data by using the second transmission protocol to obtain an uplink data packet.
For example, the processing unit 304 may be specifically configured to invoke a first protocol processing process corresponding to the first transmission protocol, and parse the uplink data through the first protocol processing process; and calling a second protocol processing process corresponding to the second transmission protocol, and encapsulating the analyzed uplink data through the second protocol processing process to obtain an uplink data packet.
For example, taking the first transmission protocol as an HTTP protocol specifically, and the second transmission protocol as a socket protocol as an example, at this time, the processing unit 304 may call an HTTP protocol processing process corresponding to the HTTP protocol, analyze the uplink data through the HTTP protocol processing process, call a socket protocol processing process corresponding to the socket protocol, and encapsulate the analyzed uplink data through the socket protocol processing process to obtain the uplink data packet.
(5) An uplink transmission unit 305;
an uplink sending unit 305, configured to send the uplink data packet to the service server according to a second transmission protocol.
For example, the uplink sending unit 305 may be specifically configured to establish a corresponding second transmission protocol channel according to the second transmission protocol, and send the uplink data packet to the service server through the second transmission protocol channel.
For example, if the second transmission protocol is specifically a socket protocol, at this time, the uplink sending unit 305 may establish a corresponding socket channel according to the socket protocol, and then send the uplink data packet to the service server through the socket channel.
Optionally, in order to improve flexibility, the calling unit 301 may obtain the first transmission protocol and call the first transmission protocol interface according to a preset configuration, and may also call according to an actual requirement, that is:
the uplink receiving unit 302 may also be configured to receive an interface call request.
The processing unit 304 may further be configured to parse the interface call request according to a preset parsing algorithm, so as to determine interface information that needs to be called.
At this time, the invoking unit 301 may be specifically configured to acquire the corresponding acquired first transmission protocol according to the interface information, and invoke the corresponding first transmission protocol interface according to the interface information.
Optionally, after sending the uplink data packet to the service server, the uplink data packet may also receive data returned by the service server, perform protocol conversion on the data, and send the data to the terminal. That is, as shown in fig. 4b, the network data transmission apparatus may further include a downlink receiving unit 306 and a downlink sending unit 307, as follows:
the downlink receiving unit 306 may be configured to receive downlink data returned by the service server according to the uplink data packet.
The processing unit 304 may also be configured to analyze the downlink data by using the second transmission protocol, and encapsulate the analyzed downlink data by using the first transmission protocol to obtain a downlink data packet.
The downlink sending unit 307 may be configured to send the downlink data packet to the terminal through the first transport protocol interface.
For example, if the first transmission protocol is specifically an HTTP protocol, and the second transmission protocol is a socket protocol, then at this time, the downlink receiving unit 306 may receive downlink data returned by the service server according to the uplink data packet through a socket channel, then the processing unit 304 analyzes the downlink data by using the socket protocol, and encapsulates the analyzed downlink data by using the HTTP protocol to obtain a downlink data packet, and then the downlink sending unit 307 sends the downlink data packet to the terminal through an HTTP interface, and so on.
In specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same or several entities, for example, the invoking unit 301, the uplink receiving unit 302, the determining unit 303, the uplink sending unit 305, the downlink receiving unit 306, and the downlink sending unit 307 may be implemented by a network module and a service configuration module in embodiment two, and the processing unit 304 may be implemented by a protocol plug-in module in embodiment two, and so on; the specific implementation of each unit can refer to the foregoing method embodiments, and is not described herein again.
As can be seen from the above, the invoking unit 301 in the network data transmission device in this embodiment may obtain the first transmission protocol, and invoke the corresponding first transmission protocol interface, then the uplink receiving unit 302 receives the uplink data sent by the terminal through the first transmission protocol interface, and the determining unit 303 determines the corresponding service server and the second transmission protocol according to the transmission parameters carried by the uplink data, and then the processing unit 304 may analyze the uplink data by using the first transmission protocol, encapsulate the analyzed uplink data by using the second transmission protocol, and transmit the uplink data to the service server by the uplink transmitting unit 305; according to the scheme, the uplink data triggered by the webpage through the terminal can be received by calling the first transmission protocol interface, then the uplink data is encapsulated again and is sent to the service server through another transmission protocol, namely, through the scheme, the required protocol interface can be flexibly called according to actual requirements, and different protocols are flexibly converted, so that only one interface calling mode needs to be maintained for both the terminal and the service server, and compared with the existing scheme of maintaining multiple interface calling modes, the scheme is simpler to implement, and the development efficiency and the maintainability of products can be greatly improved.
Example V,
Correspondingly, the embodiment of the present invention further provides a network data transmission system, which may include any one of the network data transmission apparatuses provided in the embodiment of the present invention, and optionally, the network data transmission system may further include other devices, such as a terminal and a service server.
For example, as shown in fig. 5, taking the network data transmission system as an example including a terminal 401, a network data transmission device 402, and a service server 403, the functions of each device may specifically be as follows:
the terminal 401 is configured to send uplink data to the network data transmission device 402 through a web page, where the uplink data carries transmission parameters.
The network data transmission device 402 is configured to obtain a first transmission protocol, call a corresponding first transmission protocol interface, receive uplink data triggered by the terminal 401 through a web page through the first transmission protocol interface, determine a service server 403 and a second transmission protocol corresponding to the transmission parameter according to the transmission parameter carried by the uplink data, analyze the uplink data by using the first transmission protocol, encapsulate the analyzed uplink data by using the second transmission protocol to obtain an uplink data packet, and send the uplink data packet to the service server 403 according to the second transmission protocol.
The service server 403 is configured to receive an uplink data packet sent by the network data transmission device 402.
Optionally, after sending the uplink data packet to the service server, the network data transmission device 402 may further receive data returned by the service server 403, perform protocol conversion on the data, and send the data to the terminal 401, that is:
the service server may be further configured to send downlink data to the network data transmission device 402 according to the uplink data packet.
The network data transmission device 402 may also be configured to receive downlink data sent by the service server 403, analyze the downlink data by using the second transmission protocol, encapsulate the analyzed downlink data by using the first transmission protocol to obtain a downlink data packet, and send the downlink data packet to the terminal 401 through the first transmission protocol interface.
The terminal 401 may also be configured to receive a downlink data packet sent by the network data transmission device 402.
Optionally, in order to improve flexibility, the network data transmission device 402 may obtain the first transmission protocol and call the first transmission protocol interface according to a preset configuration, and may also call according to an actual requirement, that is:
the service server 403 may also be configured to send an interface call request to the network data transmission device 402.
The network data transmission device 402 may be specifically configured to receive an interface call request sent by the service server 403, parse the interface call request according to a preset parsing algorithm to determine interface information to be called, obtain a corresponding first transmission protocol according to the interface information, and call a corresponding first transmission protocol interface according to the interface information.
The first transmission protocol and the second transmission protocol may be set according to requirements of actual applications. The specific implementation of each device can be referred to the previous embodiment, and is not described herein again.
Since the network data transmission system may include any network data transmission device provided in the embodiment of the present invention, beneficial effects that can be achieved by any network data transmission device provided in the embodiment of the present invention can be achieved, which can be specifically referred to in the foregoing embodiments and will not be described herein again.
Example six,
An embodiment of the present invention further provides a proxy server, as shown in fig. 6, which shows a schematic structural diagram of the proxy server according to the embodiment of the present invention, specifically:
the proxy server may include components such as a processor 501 of one or more processing cores, memory 502 of one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that the proxy server architecture shown in fig. 6 does not constitute a limitation of a proxy server and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 501 is a control center of the proxy server, connects various parts of the entire proxy server by various interfaces and lines, and performs various functions of the proxy server and processes data by running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the proxy server. Optionally, processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501.
The memory 502 may be used to store software programs and modules, and the processor 501 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the proxy server, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
The proxy server further comprises a power supply 503 for supplying power to each component, and preferably, the power supply 503 may be logically connected to the processor 501 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 503 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The proxy server may also include an input unit 504, and the input unit 504 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the proxy server may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 501 in the proxy server loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 501 runs the application program stored in the memory 502, thereby implementing various functions as follows:
the method comprises the steps of obtaining a first transmission protocol, calling a corresponding first transmission protocol interface, receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, determining a service server and a second transmission protocol corresponding to the transmission parameters according to the transmission parameters carried by the uplink data, analyzing the uplink data by adopting the first transmission protocol, packaging the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet, and sending the uplink data packet to the service server according to the second transmission protocol.
The first transmission protocol and the second transmission protocol may be set according to requirements of actual applications, and are not described herein again.
Optionally, after sending the uplink data packet to the service server, the processor 501 may further receive data returned by the service server, perform protocol conversion on the data, and send the data to the terminal, that is, the processor 501 may further run an application program stored in the memory 502, so as to implement the following functions:
and the receiving service server analyzes the downlink data by adopting a second transmission protocol according to the downlink data returned by the uplink data packet, encapsulates the analyzed downlink data by adopting a first transmission protocol to obtain a downlink data packet, and sends the downlink data packet to the terminal through a first transmission protocol interface.
Optionally, in order to improve flexibility, the network data transmission apparatus 402 may obtain the first transmission protocol and call the first transmission protocol interface according to a preset configuration, and may also call according to actual requirements, that is, the processor 501 may further run an application program stored in the memory 502 to implement the following functions:
receiving an interface calling request sent by a service server, analyzing the interface calling request according to a preset analysis algorithm to determine interface information needing to be called, acquiring a corresponding acquired first transmission protocol according to the interface information, and calling a corresponding first transmission protocol interface according to the interface information.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, the proxy server in this embodiment may obtain the first transmission protocol, call the corresponding first transmission protocol interface, then receive the uplink data sent by the terminal through the first transmission protocol interface, and determine the corresponding service server and the second transmission protocol according to the transmission parameters carried by the uplink data, and then may analyze the uplink data by using the first transmission protocol, and encapsulate the analyzed uplink data by using the second transmission protocol, so as to transmit the uplink data to the service server; according to the scheme, the uplink data triggered by the webpage through the terminal can be received by calling the first transmission protocol interface, then the uplink data is encapsulated again and is sent to the service server through another transmission protocol, namely, through the scheme, the required protocol interface can be flexibly called according to actual requirements, and different protocols are flexibly converted, so that only one interface calling mode needs to be maintained for both the terminal and the service server, and compared with the existing scheme of maintaining multiple interface calling modes, the scheme is simpler to implement, and the development efficiency and the maintainability of products can be greatly improved.
Example seven,
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the network data transmission methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
the method comprises the steps of obtaining a first transmission protocol, calling a first transmission protocol interface, receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, carrying transmission parameters on the uplink data, determining a service server and a second transmission protocol corresponding to the transmission parameters according to the transmission parameters, analyzing the uplink data by adopting the first transmission protocol, packaging the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet, and sending the uplink data packet to the service server according to the second transmission protocol.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any network data transmission method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any network data transmission method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The network data transmission method, device, system and storage medium provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (9)
1. A method for network data transmission, comprising:
receiving an interface calling request;
analyzing the interface calling request according to a preset analysis algorithm to determine interface information needing to be called;
acquiring a first transmission protocol according to the interface information, and calling a first transmission protocol interface according to the interface information;
receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, wherein the uplink data carries transmission parameters;
acquiring service configuration information according to the transmission parameters; the service configuration information comprises a service server identification, a calling address of the service server, a second transmission protocol used by the service server, a protocol plug-in corresponding to the service server and the sequence of the protocol plug-in;
determining a service server and a second transmission protocol according to the acquired service configuration information;
analyzing the uplink data by adopting the first transmission protocol, and encapsulating the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet;
and sending the uplink data packet to the service server according to the second transmission protocol.
2. The method of claim 1, wherein the sending the uplink data packet to the service server according to the second transmission protocol comprises:
establishing a second transmission protocol channel according to the second transmission protocol;
and sending the uplink data packet to the service server through the second transmission protocol channel.
3. The method of claim 1, wherein after sending the uplink data packet to the service server, the method further comprises:
receiving downlink data returned by the service server according to the uplink data packet;
analyzing the downlink data by adopting the second transmission protocol, and encapsulating the analyzed downlink data by adopting the first transmission protocol to obtain a downlink data packet;
and sending the downlink data packet to the terminal through the first transmission protocol interface.
4. A network data transmission apparatus, comprising:
the calling unit is used for acquiring a first transmission protocol according to the interface information and calling a first transmission protocol interface according to the interface information;
an uplink receiving unit, configured to receive an interface call request; receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, wherein the uplink data carries transmission parameters;
the determining unit is used for acquiring service configuration information according to the transmission parameters and determining a service server and a second transmission protocol according to the acquired service configuration information; the service configuration information comprises a service server identification, a calling address of the service server, a second transmission protocol used by the service server, a protocol plug-in corresponding to the service server and the sequence of the protocol plug-in;
the processing unit is used for analyzing the interface calling request according to a preset analysis algorithm so as to determine interface information needing to be called; the uplink data is analyzed by adopting the first transmission protocol, and the analyzed uplink data is encapsulated by adopting the second transmission protocol to obtain an uplink data packet;
and the uplink sending unit is used for sending the uplink data packet to the service server according to the second transmission protocol.
5. The apparatus of claim 4,
the uplink sending unit is specifically configured to establish a second transmission protocol channel according to the second transmission protocol, and send the uplink data packet to the service server through the second transmission protocol channel.
6. The apparatus of claim 4, further comprising a downlink receiving unit and a downlink transmitting unit;
the downlink receiving unit is used for receiving downlink data returned by the service server according to the uplink data packet;
the processing unit is further configured to analyze the downlink data by using the second transmission protocol, and encapsulate the analyzed downlink data by using the first transmission protocol to obtain a downlink data packet;
and the downlink sending unit is configured to send the downlink data packet to the terminal through the first transport protocol interface.
7. A network data transmission system is characterized by comprising a terminal, a service server and a network data transmission device;
the service server is used for sending an interface calling request to the network data transmission device;
the network data transmission device is used for receiving an interface calling request sent by the service server, analyzing the interface calling request according to a preset analysis algorithm to determine interface information needing to be called, acquiring a first transmission protocol according to the interface information, and calling a first transmission protocol interface according to the interface information;
the terminal is used for sending uplink data to the network data transmission device through a webpage, and the uplink data carry transmission parameters;
the network data transmission device is also used for acquiring a first transmission protocol, calling a first transmission protocol interface, receiving uplink data triggered by a terminal through a webpage through the first transmission protocol interface, and acquiring service configuration information according to the transmission parameters; the service configuration information comprises a service server identification, a calling address of the service server, a second transmission protocol used by the service server, a protocol plug-in corresponding to the service server and the sequence of the protocol plug-in; determining a service server and a second transmission protocol according to the acquired service configuration information; analyzing the uplink data by adopting the first transmission protocol, encapsulating the analyzed uplink data by adopting the second transmission protocol to obtain an uplink data packet, and sending the uplink data packet to the service server according to the second transmission protocol;
and the service server is further configured to receive the uplink data packet sent by the network data transmission device.
8. The system of claim 7,
the service server is further configured to send downlink data to the network data transmission device according to the uplink data packet;
the network data transmission device is further configured to receive downlink data sent by the service server, analyze the downlink data by using the second transmission protocol, package the analyzed downlink data by using the first transmission protocol to obtain a downlink data packet, and send the downlink data packet to the terminal through the first transmission protocol interface;
the terminal is further configured to receive the downlink data packet sent by the network data transmission device.
9. A storage medium storing a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the steps of the network data transmission method according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638670.XA CN107332857B (en) | 2017-07-31 | 2017-07-31 | Network data transmission method, device, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638670.XA CN107332857B (en) | 2017-07-31 | 2017-07-31 | Network data transmission method, device, system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107332857A CN107332857A (en) | 2017-11-07 |
CN107332857B true CN107332857B (en) | 2021-01-08 |
Family
ID=60227598
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710638670.XA Active CN107332857B (en) | 2017-07-31 | 2017-07-31 | Network data transmission method, device, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107332857B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109560895A (en) * | 2018-12-27 | 2019-04-02 | 北京百佑科技有限公司 | Data transmission method and device |
CN112866182B (en) * | 2019-11-28 | 2023-05-23 | 浙江宇视科技有限公司 | Data docking method, device and computer readable storage medium |
CN111431664A (en) * | 2020-03-10 | 2020-07-17 | 浪潮通用软件有限公司 | Dispatching data packet download method and device based on JSON data protocol |
CN113382062B (en) * | 2021-06-08 | 2024-08-27 | 北京天空卫士网络安全技术有限公司 | Data transmission method, device and system |
CN113992641B (en) * | 2021-10-11 | 2024-09-20 | 北京达佳互联信息技术有限公司 | Data processing method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104901919A (en) * | 2014-03-03 | 2015-09-09 | 中辉世纪传媒发展有限公司 | Method for adaption of accessing of different terminals and device thereof |
CN106230805A (en) * | 2016-07-27 | 2016-12-14 | 厦门中控生物识别信息技术有限公司 | A kind of data processing method, server and data handling system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9094433B2 (en) * | 2012-06-27 | 2015-07-28 | Qualcomm Incorporated | Systems and methods for bearer independent protocol gateway optimization |
-
2017
- 2017-07-31 CN CN201710638670.XA patent/CN107332857B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104901919A (en) * | 2014-03-03 | 2015-09-09 | 中辉世纪传媒发展有限公司 | Method for adaption of accessing of different terminals and device thereof |
CN106230805A (en) * | 2016-07-27 | 2016-12-14 | 厦门中控生物识别信息技术有限公司 | A kind of data processing method, server and data handling system |
Also Published As
Publication number | Publication date |
---|---|
CN107332857A (en) | 2017-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107332857B (en) | Network data transmission method, device, system and storage medium | |
CN112769938B (en) | Kubernets cloud side communication system and method based on QUIC | |
CN113132376B (en) | Media data processing method, device and system, electronic equipment and storage medium | |
AlShahwan et al. | Providing soap web services and restful web services from mobile hosts | |
CN112104754B (en) | Network proxy method, system, device, equipment and storage medium | |
US10931762B2 (en) | Systems and methods for enabling access to third party services via a service layer | |
CN108200165B (en) | Request Transmission system, method, apparatus and storage medium | |
CN106936932B (en) | A way to access robot software packages via cloud service protocol | |
CN109067728A (en) | Access control method, device, server and the storage medium of application programming interfaces | |
CN110381093B (en) | Method and device for converting data protocol, system for transmitting data and electronic equipment | |
CN110417766A (en) | A kind of method and apparatus of protocol analysis | |
CN111294235B (en) | Data processing method, device, gateway and readable storage medium | |
CN112134866A (en) | Service access control method, device, system and computer readable storage medium | |
Ahn et al. | Development of an oneM2M-compliant IoT platform for wearable data collection | |
CN107800552A (en) | A kind of data interactive method and device | |
AlShahwan et al. | Mobile cloud computing for providing complex mobile web services | |
KR102094041B1 (en) | System having the Semantic Engine based on RDF Graph for Autonomous Interaction between IoT Devices in Real-Time | |
CN105827672A (en) | Remote call method and remote call device | |
CN109788251A (en) | Method for processing video frequency, device and storage medium | |
CN107888683A (en) | A kind of client exchange method and device | |
CN113065049B (en) | Data grabbing method and device, storage medium and electronic equipment | |
CN114036217A (en) | Data access method, device, electronic equipment and storage medium | |
CN112291202A (en) | Message data visualization method and device and computer readable storage medium | |
CN106534052B (en) | Communication processing method and electronic equipment | |
CN110311936A (en) | Communication method, device, electronic device and storage medium between clients |
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 |